@softpak/components 21.2.0-capwesome.3 → 21.2.0-capwesome.5
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/fesm2022/softpak-components-spx-app-expiry.mjs +5 -5
- package/fesm2022/softpak-components-spx-app-expiry.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-channel-selection.mjs +40 -24
- package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-confirm.mjs +17 -25
- package/fesm2022/softpak-components-spx-confirm.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-helpers.mjs +9 -1
- package/fesm2022/softpak-components-spx-helpers.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-navigation.mjs +14 -21
- package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-spinner.mjs +12 -18
- package/fesm2022/softpak-components-spx-spinner.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-tabs.mjs +8 -11
- package/fesm2022/softpak-components-spx-tabs.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-toaster.mjs +22 -39
- package/fesm2022/softpak-components-spx-toaster.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-translate.mjs +41 -2
- package/fesm2022/softpak-components-spx-translate.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-update.mjs +109 -69
- package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-welcome.mjs +2 -2
- package/fesm2022/softpak-components-spx-welcome.mjs.map +1 -1
- package/package.json +1 -1
- package/tailwind.css +1 -1
- package/types/softpak-components-spx-channel-selection.d.ts +14 -7
- package/types/softpak-components-spx-confirm.d.ts +21 -33
- package/types/softpak-components-spx-helpers.d.ts +3 -1
- package/types/softpak-components-spx-navigation.d.ts +20 -36
- package/types/softpak-components-spx-spinner.d.ts +14 -27
- package/types/softpak-components-spx-tabs.d.ts +8 -17
- package/types/softpak-components-spx-toaster.d.ts +55 -91
- package/types/softpak-components-spx-translate.d.ts +27 -1
- package/types/softpak-components-spx-update.d.ts +46 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-navigation.mjs","sources":["../../../../projects/softpak/components/spx-navigation/spx-home-tile/spx-home-tiles.component.ts","../../../../projects/softpak/components/spx-navigation/spx-home-tile/spx-home-tiles.component.html","../../../../projects/softpak/components/spx-navigation/spx-home-tile/spx-home-tile.component.ts","../../../../projects/softpak/components/spx-navigation/spx-home-tile/spx-home-tile.component.html","../../../../projects/softpak/components/spx-navigation/store/spx-navigation/spx-navigation.actions.ts","../../../../projects/softpak/components/spx-navigation/store/spx-navigation/spx-navigation.initial.ts","../../../../projects/softpak/components/spx-navigation/store/spx-navigation/spx-navigation.reducer.ts","../../../../projects/softpak/components/spx-navigation/spx-navigation.component.ts","../../../../projects/softpak/components/spx-navigation/spx-navigation.component.html","../../../../projects/softpak/components/spx-navigation/softpak-components-spx-navigation.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\n@Component({\n selector: 'spx-home-tiles',\n standalone: true,\n templateUrl: './spx-home-tiles.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SpxHomeTilesComponent {\n readonly spxCols = input<1 | 2>(2);\n}\n","<div class=\"mx-auto max-w-lg grid gap-3\"\n [class.grid-cols-1]=\"this.spxCols() === 1\"\n [class.grid-cols-2]=\"this.spxCols() === 2\"><ng-content></ng-content></div>","import { NgClass } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ElementRef, input, viewChild } from '@angular/core';\n\n@Component({\n selector: 'spx-home-tile',\n imports: [\n NgClass\n ],\n templateUrl: './spx-home-tile.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SpxHomeTileComponent {\n readonly spxAutofocus = input<boolean>();\n readonly spxClass = input<string>();\n readonly spxSubtitle = input<string>();\n readonly spxTitle = input<string>();\n private buttonRef = viewChild<ElementRef<HTMLButtonElement>>('button');\n\n setFocus(): void {\n this.buttonRef()?.nativeElement.focus();\n }\n}\n","<button #button\n class=\"border border-transparent flex flex-col w-full px-4 py-2 relative rounded text-center focus:outline-none focus:ring-2 focus:ring-offset-2\"\n type=\"button\"\n part=\"button\"\n [attr.autofocus]=\"this.spxAutofocus() ? this.spxAutofocus() : undefined\"\n [class.bg-blue-600]=\"!this.spxClass()\"\n [class.focus:ring-blue-500]=\"!this.spxClass()\"\n [class.hover:bg-blue-800]=\"!this.spxClass()\"\n [class.text-white]=\"!this.spxClass()\"\n [ngClass]=\"this.spxClass() ? this.spxClass() : undefined\">\n <div class=\"flex gap-5 items-center\">\n <div class=\"fal my-2 self-center text-xl w-5\"><ng-content></ng-content></div>\n <div class=\"grow flex flex-col text-left\">\n <div class=\"text-lg font-bold text-ellipsis overflow-hidden\">{{ this.spxTitle() }}</div>\n @if (this.spxSubtitle()) {\n <div class=\"text-sm opacity-70 text-ellipsis overflow-hidden\">{{ this.spxSubtitle() }}</div>\n }\n </div>\n </div>\n </button>","import { createAction, props, union } from '@ngrx/store';\nimport { SpxNavigationItemI } from '../../spx-navigation-item.interface';\n\nexport const addPages = createAction('[SPX / Navigation] Add items', props<{\n navigationItems: SpxNavigationItemI[];\n}>());\nexport const initialize = createAction('[SPX / Navigation] Initialize', props<{\n navigationItems: SpxNavigationItemI[];\n}>());\nexport const update = createAction('[SPX / Navigation] Update', props<{\n accessList: string[];\n signedIn: boolean;\n}>());\n\nconst all = union({\n addPages,\n initialize,\n update\n});\n\nexport type Actions = typeof all;\n","import { StateI } from \"./spx-navigation.state\";\n\nexport const initialState: StateI = {\n accessList: [],\n navigationItems: [],\n menuItems: [],\n signedIn: false,\n tabs: [],\n};\n","\nimport * as actions from './spx-navigation.actions';\nimport { createFeature, createReducer, on } from '@ngrx/store';\nimport { StateI } from './spx-navigation.state';\nimport { initialState } from './spx-navigation.initial';\n\nexport default createFeature({\n name: 'spxNavigation',\n reducer: createReducer(\n initialState,\n on(actions.initialize, (state: StateI, { navigationItems }): StateI => ({\n ...state,\n navigationItems: navigationItems,\n menuItems: navigationItems.slice().filter(navigationItem => !navigationItem.signInRequired && (navigationItem.hasTile === undefined || navigationItem.hasTile)),\n tabs: navigationItems.slice().filter(navigationItem => !navigationItem.signInRequired && navigationItem.hasTab),\n })),\n on(actions.update, (state: StateI, { accessList, signedIn }): StateI => ({\n ...state,\n accessList,\n menuItems: state.navigationItems.slice().filter(navigationItem => (!navigationItem.signInRequired || signedIn) && navigationItem?.hasTile !== false).filter(item => item.accessKey === undefined || accessList.includes(item.accessKey)),\n signedIn,\n tabs: state.navigationItems.slice().filter(navigationItem => (!navigationItem.signInRequired || signedIn) && navigationItem.hasTab).filter(item => item.accessKey === undefined || accessList.includes(item.accessKey)),\n })),\n on(actions.addPages, (state: StateI, { navigationItems }): StateI => ({\n ...state,\n navigationItems: [...state.navigationItems.slice(), ...navigationItems],\n menuItems: [...state.menuItems.slice(), ...navigationItems.slice().filter(navigationItem => (!navigationItem.signInRequired || state.signedIn) && navigationItem?.hasTile !== false).filter(item => item.accessKey === undefined || state.accessList.includes(item.accessKey))],\n tabs: [...state.tabs.slice(), ...navigationItems.slice().filter(navigationItem => (!navigationItem.signInRequired || state.signedIn) && navigationItem.hasTab).filter(item => item.accessKey === undefined || state.accessList.includes(item.accessKey))],\n })),\n ),\n});\n","import { Component, input, OnDestroy, OnInit, output, signal, viewChildren } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { SpxHomeTilesComponent } from './spx-home-tile/spx-home-tiles.component';\nimport { SpxHomeTileComponent } from './spx-home-tile/spx-home-tile.component';\nimport { Store } from '@ngrx/store';\nimport spxNavigationReducer from './store/spx-navigation/spx-navigation.reducer';\nimport { AsyncPipe } from '@angular/common';\nimport { SpxNavigationItemI } from './spx-navigation-item.interface';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'spx-navigation',\n templateUrl: './spx-navigation.component.html',\n imports: [\n TranslateModule,\n FontAwesomeModule,\n SpxCapitalizePipe,\n SpxHomeTilesComponent,\n SpxHomeTileComponent\n ]\n})\nexport class SpxNavigationComponent implements OnInit, OnDestroy {\n readonly spxOverwriteNavItems = input<SpxNavigationItemI[]>();\n tiles = viewChildren<SpxHomeTileComponent>(\"tiles\");\n spxClick = output<string>();\n navItems = signal<SpxNavigationItemI[]>([]);\n menuItemsSubscription: Subscription | null = null;\n \n constructor(\n private readonly appStore: Store,\n ) { }\n\n ngOnInit() {\n this.menuItemsSubscription = this.appStore.select(spxNavigationReducer.selectMenuItems).subscribe((items) => {\n this.navItems.set(items);\n });\n }\n\n ngOnDestroy() {\n this.menuItemsSubscription?.unsubscribe();\n }\n\n setFocus(): void {\n this.tiles()[0]?.setFocus();\n }\n\n onNavigate(link: string) {\n this.spxClick.emit(link);\n }\n}\n","<spx-home-tiles [spxCols]=\"1\">\n @if (spxOverwriteNavItems() && spxOverwriteNavItems()?.length) {\n @for (item of spxOverwriteNavItems(); track item; let i = $index) {\n <spx-home-tile #tiles (click)=\"item.onClick ? item.onClick() : (item.routerLink ? onNavigate(item.routerLink) : null)\"\n [spxAutofocus]=\"i === 0\"\n [spxClass]=\"item.tileClasses ? item.tileClasses : undefined\"\n [spxTitle]=\"item.title | translate | capitalize\"\n [spxSubtitle]=\"item.subtite ? (item.subtite | translate | capitalize) : undefined\">\n <fa-icon [icon]=\"item.icon\"></fa-icon>\n </spx-home-tile>\n }\n }\n @else {\n @for (item of navItems(); track item; let i = $index) {\n <spx-home-tile #tiles (click)=\"item.onClick ? item.onClick() : (item.routerLink ? onNavigate(item.routerLink) : null)\"\n [spxAutofocus]=\"i === 0\"\n [spxClass]=\"item.tileClasses ? item.tileClasses : undefined\"\n [spxTitle]=\"item.title | translate | capitalize\"\n [spxSubtitle]=\"item.subtite ? (item.subtite | translate | capitalize) : undefined\">\n <fa-icon [icon]=\"item.icon\"></fa-icon>\n </spx-home-tile>\n }\n }\n</spx-home-tiles>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["actions.initialize","actions.update","actions.addPages","spxNavigationReducer"],"mappings":";;;;;;;;;;;MAQa,qBAAqB,CAAA;AANlC,IAAA,WAAA,GAAA;AAOW,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAQ,CAAC,mDAAC;AACnC,IAAA;8GAFY,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,oNCRlC,gLAE8E,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FDMjE,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBANjC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAAA,UAAA,EACd,IAAI,EAAA,eAAA,EAEC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,gLAAA,EAAA;;;MEMpC,oBAAoB,CAAA;AATjC,IAAA,WAAA,GAAA;QAUW,IAAA,CAAA,YAAY,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,cAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAW;QAC/B,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;QAC1B,IAAA,CAAA,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EA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AA;;2FAKR,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAXlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAAA,OAAA,EAEjB;wBACP,eAAe;wBACf,iBAAiB;wBACjB,iBAAiB;wBACjB,qBAAqB;wBACrB;AACD,qBAAA,EAAA,QAAA,EAAA,ssCAAA,EAAA;0OAI0C,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,UAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;;;AEzBpD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-navigation.mjs","sources":["../../../../projects/softpak/components/spx-navigation/spx-home-tile/spx-home-tiles.component.ts","../../../../projects/softpak/components/spx-navigation/spx-home-tile/spx-home-tiles.component.html","../../../../projects/softpak/components/spx-navigation/spx-home-tile/spx-home-tile.component.ts","../../../../projects/softpak/components/spx-navigation/spx-home-tile/spx-home-tile.component.html","../../../../projects/softpak/components/spx-navigation/store/spx-navigation/spx-navigation.initial.ts","../../../../projects/softpak/components/spx-navigation/store/spx-navigation/spx-navigation.actions.ts","../../../../projects/softpak/components/spx-navigation/store/spx-navigation/spx-navigation.reducer.ts","../../../../projects/softpak/components/spx-navigation/spx-navigation.component.ts","../../../../projects/softpak/components/spx-navigation/spx-navigation.component.html","../../../../projects/softpak/components/spx-navigation/softpak-components-spx-navigation.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\n@Component({\n selector: 'spx-home-tiles',\n standalone: true,\n templateUrl: './spx-home-tiles.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SpxHomeTilesComponent {\n readonly spxCols = input<1 | 2>(2);\n}\n","<div class=\"mx-auto max-w-lg grid gap-3\"\n [class.grid-cols-1]=\"this.spxCols() === 1\"\n [class.grid-cols-2]=\"this.spxCols() === 2\"><ng-content></ng-content></div>","import { NgClass } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ElementRef, input, viewChild } from '@angular/core';\n\n@Component({\n selector: 'spx-home-tile',\n imports: [\n NgClass\n ],\n templateUrl: './spx-home-tile.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SpxHomeTileComponent {\n readonly spxAutofocus = input<boolean>();\n readonly spxClass = input<string>();\n readonly spxSubtitle = input<string>();\n readonly spxTitle = input<string>();\n private buttonRef = viewChild<ElementRef<HTMLButtonElement>>('button');\n\n setFocus(): void {\n this.buttonRef()?.nativeElement.focus();\n }\n}\n","<button #button\n class=\"border border-transparent flex flex-col w-full px-4 py-2 relative rounded text-center focus:outline-none focus:ring-2 focus:ring-offset-2\"\n type=\"button\"\n part=\"button\"\n [attr.autofocus]=\"this.spxAutofocus() ? this.spxAutofocus() : undefined\"\n [class.bg-blue-600]=\"!this.spxClass()\"\n [class.focus:ring-blue-500]=\"!this.spxClass()\"\n [class.hover:bg-blue-800]=\"!this.spxClass()\"\n [class.text-white]=\"!this.spxClass()\"\n [ngClass]=\"this.spxClass() ? this.spxClass() : undefined\">\n <div class=\"flex gap-5 items-center\">\n <div class=\"fal my-2 self-center text-xl w-5\"><ng-content></ng-content></div>\n <div class=\"grow flex flex-col text-left\">\n <div class=\"text-lg font-bold text-ellipsis overflow-hidden\">{{ this.spxTitle() }}</div>\n @if (this.spxSubtitle()) {\n <div class=\"text-sm opacity-70 text-ellipsis overflow-hidden\">{{ this.spxSubtitle() }}</div>\n }\n </div>\n </div>\n </button>","import { StateI } from \"./spx-navigation.state\";\n\nexport const initialState: StateI = {\n accessList: [],\n navigationItems: [],\n menuItems: [],\n signedIn: false,\n tabs: [],\n};\n","import { createActionGroup, props } from '@ngrx/store';\n\nimport { SpxNavigationItemI } from '../../spx-navigation-item.interface';\n\nexport const spxNavigationActions = createActionGroup({\n source: 'SpxNavigation',\n events: {\n AddPages: props<{ navigationItems: SpxNavigationItemI[]; }>(),\n Initialize: props<{ navigationItems: SpxNavigationItemI[]; }>(),\n Update: props<{ accessList: string[]; signedIn: boolean; }>(),\n },\n});","import { createFeature, createReducer, on } from '@ngrx/store';\n\nimport { StateI } from './spx-navigation.state';\nimport { initialState } from './spx-navigation.initial';\nimport { spxNavigationActions } from './spx-navigation.actions';\n\nexport default createFeature({\n name: 'spxNavigation',\n reducer: createReducer(\n initialState,\n on(spxNavigationActions.initialize, (state: StateI, { navigationItems }): StateI => ({\n ...state,\n navigationItems: navigationItems,\n menuItems: navigationItems.slice().filter(navigationItem => !navigationItem.signInRequired && (navigationItem.hasTile === undefined || navigationItem.hasTile)),\n tabs: navigationItems.slice().filter(navigationItem => !navigationItem.signInRequired && navigationItem.hasTab),\n })),\n on(spxNavigationActions.update, (state: StateI, { accessList, signedIn }): StateI => ({\n ...state,\n accessList,\n menuItems: state.navigationItems.slice().filter(navigationItem => (!navigationItem.signInRequired || signedIn) && navigationItem?.hasTile !== false).filter(item => item.accessKey === undefined || accessList.includes(item.accessKey)),\n signedIn,\n tabs: state.navigationItems.slice().filter(navigationItem => (!navigationItem.signInRequired || signedIn) && navigationItem.hasTab).filter(item => item.accessKey === undefined || accessList.includes(item.accessKey)),\n })),\n on(spxNavigationActions.addPages, (state: StateI, { navigationItems }): StateI => ({\n ...state,\n navigationItems: [...state.navigationItems.slice(), ...navigationItems],\n menuItems: [...state.menuItems.slice(), ...navigationItems.slice().filter(navigationItem => (!navigationItem.signInRequired || state.signedIn) && navigationItem?.hasTile !== false).filter(item => item.accessKey === undefined || state.accessList.includes(item.accessKey))],\n tabs: [...state.tabs.slice(), ...navigationItems.slice().filter(navigationItem => (!navigationItem.signInRequired || state.signedIn) && navigationItem.hasTab).filter(item => item.accessKey === undefined || state.accessList.includes(item.accessKey))],\n })),\n ),\n});\n","import { Component, input, OnDestroy, OnInit, output, signal, viewChildren } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { SpxHomeTilesComponent } from './spx-home-tile/spx-home-tiles.component';\nimport { SpxHomeTileComponent } from './spx-home-tile/spx-home-tile.component';\nimport { Store } from '@ngrx/store';\nimport spxNavigationReducer from './store/spx-navigation/spx-navigation.reducer';\nimport { AsyncPipe } from '@angular/common';\nimport { SpxNavigationItemI } from './spx-navigation-item.interface';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'spx-navigation',\n templateUrl: './spx-navigation.component.html',\n imports: [\n TranslateModule,\n FontAwesomeModule,\n SpxCapitalizePipe,\n SpxHomeTilesComponent,\n SpxHomeTileComponent\n ]\n})\nexport class SpxNavigationComponent implements OnInit, OnDestroy {\n readonly spxOverwriteNavItems = input<SpxNavigationItemI[]>();\n tiles = viewChildren<SpxHomeTileComponent>(\"tiles\");\n spxClick = output<string>();\n navItems = signal<SpxNavigationItemI[]>([]);\n menuItemsSubscription: Subscription | null = null;\n \n constructor(\n private readonly appStore: Store,\n ) { }\n\n ngOnInit() {\n this.menuItemsSubscription = this.appStore.select(spxNavigationReducer.selectMenuItems).subscribe((items) => {\n this.navItems.set(items);\n });\n }\n\n ngOnDestroy() {\n this.menuItemsSubscription?.unsubscribe();\n }\n\n setFocus(): void {\n this.tiles()[0]?.setFocus();\n }\n\n onNavigate(link: string) {\n this.spxClick.emit(link);\n }\n}\n","<spx-home-tiles [spxCols]=\"1\">\n @if (spxOverwriteNavItems() && spxOverwriteNavItems()?.length) {\n @for (item of spxOverwriteNavItems(); track item; let i = $index) {\n <spx-home-tile #tiles (click)=\"item.onClick ? item.onClick() : (item.routerLink ? onNavigate(item.routerLink) : null)\"\n [spxAutofocus]=\"i === 0\"\n [spxClass]=\"item.tileClasses ? item.tileClasses : undefined\"\n [spxTitle]=\"item.title | translate | capitalize\"\n [spxSubtitle]=\"item.subtite ? (item.subtite | translate | capitalize) : undefined\">\n <fa-icon [icon]=\"item.icon\"></fa-icon>\n </spx-home-tile>\n }\n }\n @else {\n @for (item of navItems(); track item; let i = $index) {\n <spx-home-tile #tiles (click)=\"item.onClick ? item.onClick() : (item.routerLink ? onNavigate(item.routerLink) : null)\"\n [spxAutofocus]=\"i === 0\"\n [spxClass]=\"item.tileClasses ? item.tileClasses : undefined\"\n [spxTitle]=\"item.title | translate | capitalize\"\n [spxSubtitle]=\"item.subtite ? (item.subtite | translate | capitalize) : undefined\">\n <fa-icon [icon]=\"item.icon\"></fa-icon>\n </spx-home-tile>\n }\n }\n</spx-home-tiles>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["spxNavigationReducer"],"mappings":";;;;;;;;;;;MAQa,qBAAqB,CAAA;AANlC,IAAA,WAAA,GAAA;AAOW,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAQ,CAAC,mDAAC;AACnC,IAAA;8GAFY,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,oNCRlC,gLAE8E,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FDMjE,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBANjC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAAA,UAAA,EACd,IAAI,EAAA,eAAA,EAEC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,gLAAA,EAAA;;;MEMpC,oBAAoB,CAAA;AATjC,IAAA,WAAA,GAAA;QAUW,IAAA,CAAA,YAAY,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,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AA,cAAA,EAAA,UAAA,EAAA,aAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,IAAA,EAAA,WAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAFpB,iBAAiB,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAKR,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAXlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAAA,OAAA,EAEjB;wBACP,eAAe;wBACf,iBAAiB;wBACjB,iBAAiB;wBACjB,qBAAqB;wBACrB;AACD,qBAAA,EAAA,QAAA,EAAA,ssCAAA,EAAA;0OAI0C,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,UAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;;;AEzBpD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, Component } from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { createActionGroup, props, emptyProps, createFeature, createReducer, on } from '@ngrx/store';
|
|
4
4
|
|
|
5
5
|
class SpxSpinnerComponent {
|
|
6
6
|
constructor() {
|
|
@@ -15,19 +15,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
15
15
|
args: [{ selector: 'spx-spinner', imports: [], template: "<div class=\"spx-spinner__wrapper spx-spinner2\"\n [class.is-shown]=\"this.spxShow()\">\n <div class=\"rounded-xl bg-white text-black absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-[150px] h-[150px]\">\n <div class=\"spx-spinner__content\">\n <svg class=\"spx-spinner__image m-auto\" xmlns=\"http://www.w3.org/2000/svg\" width=\"100px\" height=\"100px\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\">\n <g transform=\"rotate(0 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.9166666666666666s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(30 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.8333333333333334s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(60 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.75s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(90 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.6666666666666666s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(120 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.5833333333333334s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(150 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.5s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(180 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.4166666666666667s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(210 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.3333333333333333s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(240 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.25s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(270 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.16666666666666666s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(300 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.08333333333333333s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(330 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"0s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n </svg>\n @if (this.spxLoaderText()) {\n <span class=\"text-black pb-2 block text-center\">{{this.spxLoaderText()}}</span>\n }\n </div>\n </div>\n </div>", styles: [":host{background-color:#00000059;color:#000;position:fixed;height:100%;inset:0;z-index:9}.is-shown{display:block!important;opacity:1;animation:fadeIn .2s forwards,fadeOut .2s forwards}.spx-spinner__wrapper{display:none;position:absolute;right:0;left:0;margin:0 auto;text-align:center;opacity:0;z-index:500000}.spx-spinner__wrapper.spx-spinner1{top:calc(50vh - 25px);width:200px;height:50px}.spx-spinner1 .spx-spinner__ball{display:inline-block;width:50px;height:50px;border-radius:100%;background-color:#0065a4;animation:bouncedelay 1.4s infinite ease-in-out both}.spx-spinner1 .spx-spinner__ball--1{animation-delay:-.32s}.spx-spinner1 .spx-spinner__ball--2{animation-delay:-.16s}.spx-spinner__wrapper.spx-spinner2{top:calc(50vh - 65px);width:100%;max-width:120px}.spx-spinner2 .spx-spinner__content{box-shadow:0 19px 38px #0000004d,0 15px 12px #00000038;border-radius:10px;height:100%;width:100%;margin:0 auto;animation:.2s fadeIn forwards;overflow:hidden}.spx-spinner2 .spx-spinner__image{display:block;margin:0 auto;border-radius:10px}.spx-spinner2 svg{margin:auto;background:#fff;display:block;shape-rendering:auto}.spx-spinner__wrapper.spx-spinner3{top:calc(50vh - 30px)}.spx-spinner3 .spx-spinner__box{animation:loader-rotate 2s infinite linear;display:block;width:60px;height:60px;margin:0 auto}.spx-spinner3 .spx-spinner__dot{animation:dot-bounce 2s infinite ease-in-out;display:inline-block;position:relative;top:0;width:50%;height:50%;border-radius:100%;background-color:#555}.spx-spinner3 .spx-spinner__dot--2{top:auto;bottom:0;animation-delay:-1s}@keyframes loader-rotate{to{transform:rotate(360deg)}}@keyframes dot-bounce{0%,to{transform:scale(0)}50%{transform:scale(1)}}@keyframes fadeIn{0%{opacity:0}30%{opacity:.4}to{opacity:1}}@keyframes bouncedelay{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}\n"] }]
|
|
16
16
|
}], propDecorators: { spxShow: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxShow", required: false }] }], spxLoaderText: [{ type: i0.Input, args: [{ isSignal: true, alias: "spxLoaderText", required: true }] }] } });
|
|
17
17
|
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
var spxSpinner_actions = /*#__PURE__*/Object.freeze({
|
|
27
|
-
__proto__: null,
|
|
28
|
-
hide: hide,
|
|
29
|
-
reset: reset,
|
|
30
|
-
show: show
|
|
18
|
+
const spxSpinnerActions = createActionGroup({
|
|
19
|
+
source: 'SpxSpinner',
|
|
20
|
+
events: {
|
|
21
|
+
Hide: props(),
|
|
22
|
+
Reset: emptyProps(),
|
|
23
|
+
Show: props(),
|
|
24
|
+
},
|
|
31
25
|
});
|
|
32
26
|
|
|
33
27
|
const initialState = {
|
|
@@ -43,7 +37,7 @@ var spxSpinner_initial = /*#__PURE__*/Object.freeze({
|
|
|
43
37
|
|
|
44
38
|
var spxSpinner_reducer = createFeature({
|
|
45
39
|
name: 'spxSpinner',
|
|
46
|
-
reducer: createReducer(initialState, on(hide, (state, { action }) => {
|
|
40
|
+
reducer: createReducer(initialState, on(spxSpinnerActions.hide, (state, { action }) => {
|
|
47
41
|
const loadActions = action ? [...state.loadActions.filter(a => { console.log(a, action); return a !== action; })] : state.loadActions;
|
|
48
42
|
const nrOfLoadActions = !action ? state.nrOfLoadActions : (state.nrOfLoadActions > 1 ? state.nrOfLoadActions - 1 : 0);
|
|
49
43
|
return {
|
|
@@ -52,14 +46,14 @@ var spxSpinner_reducer = createFeature({
|
|
|
52
46
|
nrOfLoadActions,
|
|
53
47
|
show: loadActions.length >= 1 || nrOfLoadActions > 1 ? true : false,
|
|
54
48
|
};
|
|
55
|
-
}), on(reset, (state) => {
|
|
49
|
+
}), on(spxSpinnerActions.reset, (state) => {
|
|
56
50
|
return {
|
|
57
51
|
...state,
|
|
58
52
|
show: false,
|
|
59
53
|
loadActions: [],
|
|
60
54
|
nrOfLoadActions: 0,
|
|
61
55
|
};
|
|
62
|
-
}), on(show, (state, { action }) => {
|
|
56
|
+
}), on(spxSpinnerActions.show, (state, { action }) => {
|
|
63
57
|
return {
|
|
64
58
|
...state,
|
|
65
59
|
show: true,
|
|
@@ -82,5 +76,5 @@ var spxSpinner_state = /*#__PURE__*/Object.freeze({
|
|
|
82
76
|
* Generated bundle index. Do not edit.
|
|
83
77
|
*/
|
|
84
78
|
|
|
85
|
-
export { SpxSpinnerComponent,
|
|
79
|
+
export { SpxSpinnerComponent, spxSpinnerActions, spxSpinner_initial as spxSpinnerInitial, spxSpinner_reducer$1 as spxSpinnerReducer, spxSpinner_state as spxSpinnerState };
|
|
86
80
|
//# sourceMappingURL=softpak-components-spx-spinner.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-spinner.mjs","sources":["../../../../projects/softpak/components/spx-spinner/spx-spinner.component.ts","../../../../projects/softpak/components/spx-spinner/spx-spinner.component.html","../../../../projects/softpak/components/spx-spinner/store/spx-spinner/spx-spinner.actions.ts","../../../../projects/softpak/components/spx-spinner/store/spx-spinner/spx-spinner.initial.ts","../../../../projects/softpak/components/spx-spinner/store/spx-spinner/spx-spinner.reducer.ts","../../../../projects/softpak/components/spx-spinner/softpak-components-spx-spinner.ts"],"sourcesContent":["\nimport { Component, input } from '@angular/core';\n\n@Component({\n selector: 'spx-spinner',\n imports: [],\n templateUrl: './spx-spinner.component.html',\n styleUrl: './spx-spinner.component.scss',\n})\nexport class SpxSpinnerComponent {\n readonly spxShow = input<boolean>(true);\n readonly spxLoaderText = input.required<string>();\n}\n","<div class=\"spx-spinner__wrapper spx-spinner2\"\n [class.is-shown]=\"this.spxShow()\">\n <div class=\"rounded-xl bg-white text-black absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-[150px] h-[150px]\">\n <div class=\"spx-spinner__content\">\n <svg class=\"spx-spinner__image m-auto\" xmlns=\"http://www.w3.org/2000/svg\" width=\"100px\" height=\"100px\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\">\n <g transform=\"rotate(0 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.9166666666666666s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(30 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.8333333333333334s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(60 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.75s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(90 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.6666666666666666s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(120 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.5833333333333334s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(150 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.5s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(180 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.4166666666666667s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(210 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.3333333333333333s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(240 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.25s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(270 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.16666666666666666s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(300 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.08333333333333333s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(330 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"0s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n </svg>\n @if (this.spxLoaderText()) {\n <span class=\"text-black pb-2 block text-center\">{{this.spxLoaderText()}}</span>\n }\n </div>\n </div>\n </div>","import { createAction, props, union } from '@ngrx/store';\n\nexport const hide = createAction('[SPX / Spinner] Hide', props<{ action: string; }>());\nexport const reset = createAction('[SPX / Spinner] Reset', props<Record<string, unknown>>());\nexport const show = createAction('[SPX / Spinner] Show', props<{ action: string; }>());\n\nconst all = union({\n hide,\n show,\n});\n\nexport type Actions = typeof all;\n","import { StateI } from \"./spx-spinner.state\";\n\nexport const initialState: StateI = {\n loadActions: [],\n nrOfLoadActions: 0,\n show: false,\n};\n","import * as actions from './spx-spinner.actions';\n\nimport { createFeature, createReducer, on } from '@ngrx/store';\n\nimport { StateI } from './spx-spinner.state';\nimport { initialState } from './spx-spinner.initial';\n\nexport default createFeature({\n name: 'spxSpinner',\n reducer: createReducer(\n initialState,\n on(actions.hide, (state: StateI, { action }): StateI => {\n const loadActions = action ? [...state.loadActions.filter(a => { console.log(a, action); return a !== action; })] : state.loadActions;\n const nrOfLoadActions = !action ? state.nrOfLoadActions : (state.nrOfLoadActions > 1 ? state.nrOfLoadActions - 1 : 0);\n return {\n ...state,\n loadActions,\n nrOfLoadActions,\n show: loadActions.length >= 1 || nrOfLoadActions > 1 ? true : false,\n };\n }),\n on(actions.reset, (state: StateI): StateI => {\n return {\n ...state,\n show: false,\n loadActions: [],\n nrOfLoadActions: 0,\n };\n }),\n on(actions.show, (state: StateI, { action }): StateI => {\n return {\n ...state,\n show: true,\n loadActions: action ? (state.loadActions.find(a => a === action) ? state.loadActions : [...state.loadActions, action]) : state.loadActions,\n nrOfLoadActions: action ? state.nrOfLoadActions : (state.nrOfLoadActions + 1),\n };\n }),\n ),\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["actions.hide","actions.reset","actions.show"],"mappings":";;;;MASa,mBAAmB,CAAA;AANhC,IAAA,WAAA,GAAA;AAOW,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAU,IAAI,mDAAC;AAC9B,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,QAAQ,wDAAU;AAClD,IAAA;8GAHY,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,gWCThC,kuJAuEQ,EAAA,MAAA,EAAA,CAAA,gyDAAA,CAAA,EAAA,CAAA,CAAA;;2FD9DK,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,WACd,EAAE,EAAA,QAAA,EAAA,kuJAAA,EAAA,MAAA,EAAA,CAAA,gyDAAA,CAAA,EAAA;;;AEHR,MAAM,IAAI,GAAG,YAAY,CAAC,sBAAsB,EAAE,KAAK,EA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YAAA,WAAW,EAAE,EAAE;AACf,YAAA,eAAe,EAAE,CAAC;SACrB;AACL,IAAA,CAAC,CAAC,EACF,EAAE,CAACC,IAAY,EAAE,CAAC,KAAa,EAAE,EAAE,MAAM,EAAE,KAAY;QACnD,OAAO;AACH,YAAA,GAAG,KAAK;AACR,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,WAAW,EAAE,MAAM,IAAI,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,GAAG,KAAK,CAAC,WAAW,GAAG,CAAC,GAAG,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,IAAI,KAAK,CAAC,WAAW;AAC1I,YAAA,eAAe,EAAE,MAAM,GAAG,KAAK,CAAC,eAAe,IAAI,KAAK,CAAC,eAAe,GAAG,CAAC,CAAC;SAChF;AACL,IAAA,CAAC,CAAC,CACL;AACJ,CAAA,CAAC;;;;;;;;;;;ACtCF;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-spinner.mjs","sources":["../../../../projects/softpak/components/spx-spinner/spx-spinner.component.ts","../../../../projects/softpak/components/spx-spinner/spx-spinner.component.html","../../../../projects/softpak/components/spx-spinner/store/spx-spinner/spx-spinner.actions.ts","../../../../projects/softpak/components/spx-spinner/store/spx-spinner/spx-spinner.initial.ts","../../../../projects/softpak/components/spx-spinner/store/spx-spinner/spx-spinner.reducer.ts","../../../../projects/softpak/components/spx-spinner/softpak-components-spx-spinner.ts"],"sourcesContent":["\nimport { Component, input } from '@angular/core';\n\n@Component({\n selector: 'spx-spinner',\n imports: [],\n templateUrl: './spx-spinner.component.html',\n styleUrl: './spx-spinner.component.scss',\n})\nexport class SpxSpinnerComponent {\n readonly spxShow = input<boolean>(true);\n readonly spxLoaderText = input.required<string>();\n}\n","<div class=\"spx-spinner__wrapper spx-spinner2\"\n [class.is-shown]=\"this.spxShow()\">\n <div class=\"rounded-xl bg-white text-black absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-[150px] h-[150px]\">\n <div class=\"spx-spinner__content\">\n <svg class=\"spx-spinner__image m-auto\" xmlns=\"http://www.w3.org/2000/svg\" width=\"100px\" height=\"100px\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\">\n <g transform=\"rotate(0 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.9166666666666666s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(30 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.8333333333333334s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(60 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.75s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(90 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.6666666666666666s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(120 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.5833333333333334s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(150 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.5s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(180 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.4166666666666667s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(210 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.3333333333333333s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(240 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.25s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(270 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.16666666666666666s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(300 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"-0.08333333333333333s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n <g transform=\"rotate(330 50 50)\">\n <rect x=\"47.5\" y=\"23.5\" rx=\"2.5\" ry=\"2.75\" width=\"5\" height=\"11\" fill=\"#00457c\">\n <animate attributeName=\"opacity\" values=\"1;0\" keyTimes=\"0;1\" dur=\"1s\" begin=\"0s\" repeatCount=\"indefinite\"></animate>\n </rect>\n </g>\n </svg>\n @if (this.spxLoaderText()) {\n <span class=\"text-black pb-2 block text-center\">{{this.spxLoaderText()}}</span>\n }\n </div>\n </div>\n </div>","import { createActionGroup, emptyProps, props } from '@ngrx/store';\n\nexport const spxSpinnerActions = createActionGroup({\n source: 'SpxSpinner',\n events: {\n Hide: props<{ action: string; }>(),\n Reset: emptyProps(),\n Show: props<{ action: string; }>(),\n },\n});\n","import { StateI } from \"./spx-spinner.state\";\n\nexport const initialState: StateI = {\n loadActions: [],\n nrOfLoadActions: 0,\n show: false,\n};\n","import { createFeature, createReducer, on } from '@ngrx/store';\n\nimport { StateI } from './spx-spinner.state';\nimport { initialState } from './spx-spinner.initial';\nimport { spxSpinnerActions } from './spx-spinner.actions';\n\nexport default createFeature({\n name: 'spxSpinner',\n reducer: createReducer(\n initialState,\n on(spxSpinnerActions.hide, (state: StateI, { action }): StateI => {\n const loadActions = action ? [...state.loadActions.filter(a => { console.log(a, action); return a !== action; })] : state.loadActions;\n const nrOfLoadActions = !action ? state.nrOfLoadActions : (state.nrOfLoadActions > 1 ? state.nrOfLoadActions - 1 : 0);\n return {\n ...state,\n loadActions,\n nrOfLoadActions,\n show: loadActions.length >= 1 || nrOfLoadActions > 1 ? true : false,\n };\n }),\n on(spxSpinnerActions.reset, (state: StateI): StateI => {\n return {\n ...state,\n show: false,\n loadActions: [],\n nrOfLoadActions: 0,\n };\n }),\n on(spxSpinnerActions.show, (state: StateI, { action }): StateI => {\n return {\n ...state,\n show: true,\n loadActions: action ? (state.loadActions.find(a => a === action) ? state.loadActions : [...state.loadActions, action]) : state.loadActions,\n nrOfLoadActions: action ? state.nrOfLoadActions : (state.nrOfLoadActions + 1),\n };\n }),\n ),\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MASa,mBAAmB,CAAA;AANhC,IAAA,WAAA,GAAA;AAOW,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAU,IAAI,mDAAC;AAC9B,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,QAAQ,wDAAU;AAClD,IAAA;8GAHY,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,gWCThC,kuJAuEQ,EAAA,MAAA,EAAA,CAAA,gyDAAA,CAAA,EAAA,CAAA,CAAA;;2FD9DK,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,WACd,EAAE,EAAA,QAAA,EAAA,kuJAAA,EAAA,MAAA,EAAA,CAAA,gyDAAA,CAAA,EAAA;;;AEHR,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AACjD,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,MAAM,EAAE;QACN,IAAI,EAAE,KAAK,EAAuB;QAClC,KAAK,EAAE,UAAU,EAAE;QACnB,IAAI,EAAE,KAAK,EAAuB;AACnC,KAAA;AACF,CAAA;;ACPM,MAAM,YAAY,GAAW;AAChC,IAAA,WAAW,EAAE,EAAE;AACf,IAAA,eAAe,EAAE,CAAC;AAClB,IAAA,IAAI,EAAE,KAA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C,KAAK,MAAM,CAAC,GAAG,KAAK,CAAC,WAAW,GAAG,CAAC,GAAG,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,IAAI,KAAK,CAAC,WAAW;AAC1I,YAAA,eAAe,EAAE,MAAM,GAAG,KAAK,CAAC,eAAe,IAAI,KAAK,CAAC,eAAe,GAAG,CAAC,CAAC;SAChF;AACL,IAAA,CAAC,CAAC,CACL;AACJ,CAAA,CAAC;;;;;;;;;;;ACrCF;;AAEG;;;;"}
|
|
@@ -7,16 +7,13 @@ import { unsubscribeSubscriptions } from '@softpak/components/spx-helpers';
|
|
|
7
7
|
import { spxNavigationReducer } from '@softpak/components/spx-navigation';
|
|
8
8
|
import { NgClass } from '@angular/common';
|
|
9
9
|
import * as i1 from '@ngrx/store';
|
|
10
|
-
import {
|
|
10
|
+
import { createActionGroup, props, createFeature, createReducer, on } from '@ngrx/store';
|
|
11
11
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var spxShortcuts_actions = /*#__PURE__*/Object.freeze({
|
|
18
|
-
__proto__: null,
|
|
19
|
-
ctrl: ctrl
|
|
12
|
+
const spxShortcutsActions = createActionGroup({
|
|
13
|
+
source: 'SpxShortcuts',
|
|
14
|
+
events: {
|
|
15
|
+
Ctrl: props(),
|
|
16
|
+
},
|
|
20
17
|
});
|
|
21
18
|
|
|
22
19
|
const initialState = {
|
|
@@ -24,7 +21,7 @@ const initialState = {
|
|
|
24
21
|
};
|
|
25
22
|
var spxShortCutsReducer$1 = createFeature({
|
|
26
23
|
name: 'spxShortcuts',
|
|
27
|
-
reducer: createReducer(initialState, on(ctrl, (state, { keyIsDown }) => ({
|
|
24
|
+
reducer: createReducer(initialState, on(spxShortcutsActions.ctrl, (state, { keyIsDown }) => ({
|
|
28
25
|
...state,
|
|
29
26
|
ctrlIsDown: keyIsDown,
|
|
30
27
|
})))
|
|
@@ -86,5 +83,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
86
83
|
* Generated bundle index. Do not edit.
|
|
87
84
|
*/
|
|
88
85
|
|
|
89
|
-
export { SpxTabsComponent,
|
|
86
|
+
export { SpxTabsComponent, spxShortcuts_reducer as spxShortCutsReducer, spxShortcutsActions };
|
|
90
87
|
//# sourceMappingURL=softpak-components-spx-tabs.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-tabs.mjs","sources":["../../../../projects/softpak/components/spx-tabs/store/spx-shortcuts.actions.ts","../../../../projects/softpak/components/spx-tabs/store/spx-shortcuts.reducer.ts","../../../../projects/softpak/components/spx-tabs/src/spx-tabs.component.ts","../../../../projects/softpak/components/spx-tabs/src/spx-tabs.component.html","../../../../projects/softpak/components/spx-tabs/softpak-components-spx-tabs.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-tabs.mjs","sources":["../../../../projects/softpak/components/spx-tabs/store/spx-shortcuts.actions.ts","../../../../projects/softpak/components/spx-tabs/store/spx-shortcuts.reducer.ts","../../../../projects/softpak/components/spx-tabs/src/spx-tabs.component.ts","../../../../projects/softpak/components/spx-tabs/src/spx-tabs.component.html","../../../../projects/softpak/components/spx-tabs/softpak-components-spx-tabs.ts"],"sourcesContent":["import { createActionGroup, props } from '@ngrx/store';\n\nexport const spxShortcutsActions = createActionGroup({\n source: 'SpxShortcuts',\n events: {\n Ctrl: props<{ keyIsDown: boolean; }>(),\n },\n});\n","import { createFeature, createReducer, on } from '@ngrx/store';\n\nimport { spxShortcutsActions } from './spx-shortcuts.actions';\n\nexport interface StateI {\n ctrlIsDown: boolean;\n}\n\nexport const initialState: StateI = {\n ctrlIsDown: false,\n};\n\nexport default createFeature({\n name: 'spxShortcuts',\n reducer: createReducer(\n initialState,\n on(spxShortcutsActions.ctrl, (state: StateI, { keyIsDown }): StateI => ({\n ...state,\n ctrlIsDown: keyIsDown,\n })),\n )}\n);","import { ChangeDetectionStrategy, Component, computed, input, OnInit, signal } from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\nimport { FaIconComponent } from \"@fortawesome/angular-fontawesome\";\nimport { IonTabBar, IonTabButton, IonTabs } from \"@ionic/angular/standalone\";\nimport { Store } from \"@ngrx/store\";\nimport { unsubscribeSubscriptions } from \"@softpak/components/spx-helpers\";\nimport { SpxNavigationItemI, spxNavigationReducer } from \"@softpak/components/spx-navigation\";\nimport { Subscription } from \"rxjs\";\nimport { NgClass } from \"@angular/common\";\nimport spxShortCutsReducer from '../store/spx-shortcuts.reducer';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'spx-tabs',\n standalone: true,\n imports: [\n IonTabs, \n FormsModule,\n IonTabBar,\n IonTabButton,\n FaIconComponent,\n NgClass\n ],\n templateUrl: './spx-tabs.component.html',\n styleUrl: './spx-tabs.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SpxTabsComponent implements OnInit {\n navItems = signal<SpxNavigationItemI[]>([]);\n shownNavItems = computed(() => {\n const show = this.optionalNavItemBool();\n return this.navItems().filter((navItem) => {\n return !navItem.currentSettingsRequired || (navItem.currentSettingsRequired && show);\n });\n });\n\n showShortcuts = signal<boolean>(false);\n optionalNavItemBool = input<boolean>(true);\n private subscription: {\n ctrlState?: Subscription;\n menuState?: Subscription;\n } = {};\n\n constructor(\n private readonly store: Store,\n ) { }\n\n ngOnInit() {\n this.listenToMenuState();\n this.listenToCtrlState();\n }\n\n ngOnDestroy() {\n unsubscribeSubscriptions(this.subscription);\n }\n\n private listenToCtrlState(): void {\n this.subscription.ctrlState = this.store.select(spxShortCutsReducer.selectCtrlIsDown).subscribe(ctrlIsDown => {\n this.showShortcuts.set(ctrlIsDown);\n });\n }\n\n private listenToMenuState(): void {\n this.subscription.menuState = this.store.select(spxNavigationReducer.default.selectTabs).subscribe((tabs) => {\n this.navItems.set(tabs);\n });\n }\n\n}","<ion-tabs #tabs select=\"home\">\n <ion-tab-bar slot=\"bottom\" class=\"border-t border-gray-200\">\n @for (item of shownNavItems(); track item.title) {\n <ion-tab-button [ngClass]=\"'ion-tab-button--' + item.code\" [tab]=\"item.code\"\n [attr.data-e2e]=\"'tab--' + item.code\">\n <fa-icon class=\"text-xl\" [icon]=\"showShortcuts() ? item.iconShortcut! : item.iconTab!\"></fa-icon>\n </ion-tab-button>\n }\n </ion-tab-bar>\n</ion-tabs>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["spxShortCutsReducer"],"mappings":";;;;;;;;;;;AAEO,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AACnD,IAAA,MAAM,EAAE,cAAc;AACtB,IAAA,MAAM,EAAE;QACN,IAAI,EAAE,KAAK,EAA2B;AACvC,KAAA;AACF,CAAA;;ACCM,MAAM,YAAY,GAAW;AAClC,IAAA,UAAU,EAAE,KAAK;CAClB;AAED,4BAAe,aAAa,CAAC;AAC3B,IAAA,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE,aAAa,CACpB,YAAY,EACZ,EAAE,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC,KAAa,EAAE,EAAE,SAAS,EAAE,MAAc;AACpE,QAAA,GAAG,KAAK;AACR,QAAA,UAAU,EAAE,SAAS;AACxB,KAAA,CAAC,CAAC;AACH,CAAA,CACH;;;;;;;;MCMY,gBAAgB,CAAA;AAgB3B,IAAA,WAAA,CACmB,KAAY,EAAA;QAAZ,IAAA,CAAA,KAAK,GAAL,KAAK;AAhBxB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAuB,EAAE,oDAAC;AAC3C,QAAA,IAAA,CAAA,aAAa,GAAG,QAAQ,CAAC,MAAK;AAC5B,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,mBAAmB,EAAE;YACvC,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC,OAAO,KAAI;AACxC,gBAAA,OAAO,CAAC,OAAO,CAAC,uBAAuB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;wBACZ,eAAe;wBACf;qBACD,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,sdAAA,EAAA,MAAA,EAAA,CAAA,qzBAAA,CAAA,EAAA;;;AEzBnD;;AAEG;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, output, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import { SpxAlertComponent } from '@softpak/components/spx-alert';
|
|
4
|
-
import {
|
|
4
|
+
import { createActionGroup, props, emptyProps, createFeature, createReducer, on } from '@ngrx/store';
|
|
5
5
|
import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
|
|
6
6
|
|
|
7
7
|
var SpxToasterSeverityEnum;
|
|
@@ -74,35 +74,18 @@ class SpxToasterMessageI {
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
clearMessage,
|
|
90
|
-
createError,
|
|
91
|
-
createInfo,
|
|
92
|
-
createSuccess,
|
|
93
|
-
createWarning,
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
var spxToaster_actions = /*#__PURE__*/Object.freeze({
|
|
97
|
-
__proto__: null,
|
|
98
|
-
clearAll: clearAll,
|
|
99
|
-
clearAllErrors: clearAllErrors,
|
|
100
|
-
clearAllErrorsAndWarnings: clearAllErrorsAndWarnings,
|
|
101
|
-
clearMessage: clearMessage,
|
|
102
|
-
createError: createError,
|
|
103
|
-
createInfo: createInfo,
|
|
104
|
-
createSuccess: createSuccess,
|
|
105
|
-
createWarning: createWarning
|
|
77
|
+
const spxToasterActions = createActionGroup({
|
|
78
|
+
source: 'SpxToaster',
|
|
79
|
+
events: {
|
|
80
|
+
ClearAll: emptyProps(),
|
|
81
|
+
ClearAllErrors: emptyProps(),
|
|
82
|
+
ClearAllErrorsAndWarnings: emptyProps(),
|
|
83
|
+
ClearMessage: props(),
|
|
84
|
+
CreateError: props(),
|
|
85
|
+
CreateInfo: props(),
|
|
86
|
+
CreateSuccess: props(),
|
|
87
|
+
CreateWarning: props(),
|
|
88
|
+
},
|
|
106
89
|
});
|
|
107
90
|
|
|
108
91
|
const initialState = {
|
|
@@ -124,28 +107,28 @@ function addMessage(currentMessages, newMessage) {
|
|
|
124
107
|
}
|
|
125
108
|
var spxToaster_reducer = createFeature({
|
|
126
109
|
name: 'spxToaster',
|
|
127
|
-
reducer: createReducer(initialState, on(clearAll, (state) => {
|
|
110
|
+
reducer: createReducer(initialState, on(spxToasterActions.clearAll, (state) => {
|
|
128
111
|
return {
|
|
129
112
|
...state,
|
|
130
113
|
messages: []
|
|
131
114
|
};
|
|
132
|
-
}), on(clearAllErrors, (state) => {
|
|
115
|
+
}), on(spxToasterActions.clearAllErrors, (state) => {
|
|
133
116
|
return {
|
|
134
117
|
...state,
|
|
135
118
|
messages: [...state.messages.filter(msg => msg.severity !== SpxSeverityEnum.error)]
|
|
136
119
|
};
|
|
137
|
-
}), on(clearAllErrorsAndWarnings, (state) => {
|
|
120
|
+
}), on(spxToasterActions.clearAllErrorsAndWarnings, (state) => {
|
|
138
121
|
return {
|
|
139
122
|
...state,
|
|
140
123
|
messages: [...state.messages.filter(msg => msg.severity !== SpxSeverityEnum.error &&
|
|
141
124
|
msg.severity !== SpxSeverityEnum.warning)]
|
|
142
125
|
};
|
|
143
|
-
}), on(clearMessage, (state, action) => {
|
|
126
|
+
}), on(spxToasterActions.clearMessage, (state, action) => {
|
|
144
127
|
return {
|
|
145
128
|
...state,
|
|
146
129
|
messages: [...state.messages.filter(msg => msg.id !== action.id)]
|
|
147
130
|
};
|
|
148
|
-
}), on(createError, (state, action) => {
|
|
131
|
+
}), on(spxToasterActions.createError, (state, action) => {
|
|
149
132
|
return {
|
|
150
133
|
...state,
|
|
151
134
|
messages: addMessage(state.messages, {
|
|
@@ -158,7 +141,7 @@ var spxToaster_reducer = createFeature({
|
|
|
158
141
|
}),
|
|
159
142
|
nextId: state.nextId + 1
|
|
160
143
|
};
|
|
161
|
-
}), on(createInfo, (state, action) => {
|
|
144
|
+
}), on(spxToasterActions.createInfo, (state, action) => {
|
|
162
145
|
return {
|
|
163
146
|
...state,
|
|
164
147
|
messages: addMessage(state.messages, {
|
|
@@ -171,7 +154,7 @@ var spxToaster_reducer = createFeature({
|
|
|
171
154
|
}),
|
|
172
155
|
nextId: state.nextId + 1
|
|
173
156
|
};
|
|
174
|
-
}), on(createSuccess, (state, action) => {
|
|
157
|
+
}), on(spxToasterActions.createSuccess, (state, action) => {
|
|
175
158
|
return {
|
|
176
159
|
...state,
|
|
177
160
|
messages: addMessage(state.messages, {
|
|
@@ -184,7 +167,7 @@ var spxToaster_reducer = createFeature({
|
|
|
184
167
|
}),
|
|
185
168
|
nextId: state.nextId + 1
|
|
186
169
|
};
|
|
187
|
-
}), on(createWarning, (state, action) => {
|
|
170
|
+
}), on(spxToasterActions.createWarning, (state, action) => {
|
|
188
171
|
return {
|
|
189
172
|
...state,
|
|
190
173
|
messages: addMessage(state.messages, {
|
|
@@ -214,5 +197,5 @@ var spxToaster_state = /*#__PURE__*/Object.freeze({
|
|
|
214
197
|
* Generated bundle index. Do not edit.
|
|
215
198
|
*/
|
|
216
199
|
|
|
217
|
-
export { SpxToasterAutoCloseSpeedEnum, SpxToasterComponent, SpxToasterMessageI, SpxToasterSeverityEnum,
|
|
200
|
+
export { SpxToasterAutoCloseSpeedEnum, SpxToasterComponent, SpxToasterMessageI, SpxToasterSeverityEnum, spxToasterActions, spxToaster_initial as spxToasterInitial, spxToaster_reducer$1 as spxToasterReducer, spxToaster_state as spxToasterState, toasterAutocloseSpeed };
|
|
218
201
|
//# sourceMappingURL=softpak-components-spx-toaster.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-toaster.mjs","sources":["../../../../projects/softpak/components/spx-toaster/src/spx-toaster-autoclose-speed.ts","../../../../projects/softpak/components/spx-toaster/src/spx-toaster.component.ts","../../../../projects/softpak/components/spx-toaster/src/spx-toaster.component.html","../../../../projects/softpak/components/spx-toaster/src/spx-toaster-message.interface.ts","../../../../projects/softpak/components/spx-toaster/store/spx-toaster/spx-toaster.actions.ts","../../../../projects/softpak/components/spx-toaster/store/spx-toaster/spx-toaster.initial.ts","../../../../projects/softpak/components/spx-toaster/store/spx-toaster/spx-toaster.reducer.ts","../../../../projects/softpak/components/spx-toaster/softpak-components-spx-toaster.ts"],"sourcesContent":["export enum SpxToasterSeverityEnum {\n ERROR = 'error',\n INFO = 'info',\n SUCCESS = 'success',\n WARNING = 'warning',\n}\n\nexport enum SpxToasterAutoCloseSpeedEnum {\n DEFAULT = -1,\n SLOW = -2,\n}\n\nexport function toasterAutocloseSpeed(autoCloseSpeed: SpxToasterAutoCloseSpeedEnum, messageText: string) {\n const messageLength = messageText?.length ?? 0;\n switch (autoCloseSpeed) {\n case SpxToasterAutoCloseSpeedEnum.DEFAULT:\n return Math.min(Math.max(messageLength * 50, 2000), 7000);\n case SpxToasterAutoCloseSpeedEnum.SLOW:\n return Math.min(Math.max(messageLength * 60, 3000), 10000);\n default:\n return autoCloseSpeed;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n effect,\n input,\n output,\n} from '@angular/core';\nimport { SpxToasterMessageI } from './spx-toaster-message.interface';\nimport { SpxAlertComponent } from '@softpak/components/spx-alert';\n\n@Component({\n selector: 'spx-toaster',\n standalone: true,\n imports: [SpxAlertComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrl: './spx-toaster.component.scss',\n templateUrl: './spx-toaster.component.html',\n host: {\n class: 'spx-toasts-displayer',\n },\n})\nexport class SpxToasterComponent {\n messages = input.required<SpxToasterMessageI[]>();\n readonly spxAutoclose = input<number>();\n spxClose = output<number>();\n constructor() {\n effect(() => {\n this.messages().forEach((message) => {\n if (message.autoClose) {\n setTimeout(() => {\n this.handleClose(message.id);\n }, message.autoClose);\n }\n });\n });\n }\n\n public handleClose(id: number) {\n this.spxClose.emit(id);\n }\n}\n","\n@if (messages().length > 0) {\n <div\n class=\"flex flex-col gap-2 fixed bottom-16 left-0 right-0 mx-auto px-3 z-50\">\n @for (message of messages(); track message) {\n <spx-alert\n [spxAutoclose]=\"message.autoClose\"\n [spxCloseable]=\"message.closeable\"\n [spxSeverity]=\"message.severity\"\n [spxTitle]=\"message.title\"\n (spxClose)=\"handleClose(message.id)\"\n (click)=\"handleClose(message.id)\"\n [id]=\"message.id\"\n >{{message.message}}\n </spx-alert>\n }\n </div>\n}","import { SpxSeverityEnum } from \"@softpak/components/spx-helpers\";\nimport { SpxToasterAutoCloseSpeedEnum, toasterAutocloseSpeed } from \"./spx-toaster-autoclose-speed\";\n\nexport class SpxToasterMessageI {\n private _autoClose?: number;\n title?: string;\n closeable?: boolean;\n id!: number;\n message!: string;\n severity!: SpxSeverityEnum;\n uniqueIdentifier?: string;\n\n constructor(message: string, id: number, severity: SpxSeverityEnum, autoClose?: SpxToasterAutoCloseSpeedEnum, closeable?: boolean) {\n this.autoClose = autoClose;\n this.message = message || '';\n this.id = id;\n this.severity = severity;\n this.closeable = closeable;\n }\n\n get autoClose(): number | undefined {\n return this._autoClose;\n }\n\n set autoClose(value: number | undefined) {\n if (value && value !== this._autoClose) {\n this._autoClose = toasterAutocloseSpeed(value, this.message);\n }\n }\n\n}\n","import { createAction, props, union } from '@ngrx/store';\nimport { SpxToasterAutoCloseSpeedEnum } from '../../src/spx-toaster-autoclose-speed';\n\nexport const clearAll = createAction('[SPX / Toaster] Clear all', props<Record<string, unknown>>());\nexport const clearAllErrors = createAction('[SPX / Toaster] Clear all errors', props<Record<string, unknown>>());\nexport const clearAllErrorsAndWarnings = createAction('[SPX / Toaster] Clear all errors and warnings', props<Record<string, unknown>>());\nexport const clearMessage = createAction('[SPX / Toaster] Clear message', props<{ id: number }>());\nexport const createError = createAction('[SPX / Toaster] Create error', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\nexport const createInfo = createAction('[SPX / Toaster] Create info', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\nexport const createSuccess = createAction('[SPX / Toaster] Create success', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\nexport const createWarning = createAction('[SPX / Toaster] Create warning', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\n\nconst all = union({\n clearAll,\n clearAllErrors,\n clearAllErrorsAndWarnings,\n clearMessage,\n createError,\n createInfo,\n createSuccess,\n createWarning,\n});\n\nexport type Actions = typeof all;\n","import { StateI } from \"./spx-toaster.state\";\n\nexport const initialState: StateI = {\n messages: [],\n nextId: 1,\n};\n","\nimport * as actions from './spx-toaster.actions';\nimport { createFeature, createReducer, on } from '@ngrx/store';\nimport { StateI } from './spx-toaster.state';\nimport { initialState } from './spx-toaster.initial';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\nimport { toasterAutocloseSpeed } from '../../src/spx-toaster-autoclose-speed';\nimport { SpxToasterMessageI } from '../../src/spx-toaster-message.interface';\n \nexport function addMessage(\n currentMessages: SpxToasterMessageI[], newMessage: SpxToasterMessageI): SpxToasterMessageI[] {\n const messages = [new SpxToasterMessageI(\n newMessage.message,\n newMessage.id,\n newMessage.severity,\n newMessage.autoClose ? newMessage.autoClose : undefined,\n newMessage.closeable ? newMessage.closeable : true,\n ), ...currentMessages];\n if (messages.length > 5) {\n messages.length = 5;\n }\n return messages;\n}\n\nexport default createFeature({\n name: 'spxToaster',\n reducer: createReducer(\n initialState,\n on(actions.clearAll, (state: StateI): StateI => {\n return {\n ...state,\n messages: []\n };\n }),\n on(actions.clearAllErrors, (state: StateI): StateI => {\n return {\n ...state,\n messages: [...state.messages.filter(msg => msg.severity !== SpxSeverityEnum.error)]\n };\n }),\n on(actions.clearAllErrorsAndWarnings, (state: StateI): StateI => {\n return {\n ...state,\n messages: [...state.messages.filter(msg => msg.severity !== SpxSeverityEnum.error &&\n msg.severity !== SpxSeverityEnum.warning)]\n };\n }),\n on(actions.clearMessage, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: [...state.messages.filter(msg => msg.id !== action.id)]\n };\n }),\n on(actions.createError, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.error,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n on(actions.createInfo, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.info,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n on(actions.createSuccess, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.success,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n on(actions.createWarning, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.warning,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n ),\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["actions.clearAll","actions.clearAllErrors","actions.clearAllErrorsAndWarnings","actions.clearMessage","actions.createError","actions.createInfo","actions.createSuccess","actions.createWarning"],"mappings":";;;;;;IAAY;AAAZ,CAAA,UAAY,sBAAsB,EAAA;AAC9B,IAAA,sBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,sBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,sBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,sBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACvB,CAAC,EALW,sBAAsB,KAAtB,sBAAsB,GAAA,EAAA,CAAA,CAAA;IAOtB;AAAZ,CAAA,UAAY,4BAA4B,EAAA;AACpC,IAAA,4BAAA,CAAA,4BAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,CAAA,GAAA,SAAY;AACZ,IAAA,4BAAA,CAAA,4BAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,CAAA,GAAA,MAAS;AACb,CAAC,EAHW,4BAA4B,KAA5B,4BAA4B,GAAA,EAAA,CAAA,CAAA;AAKlC,SAAU,qBAAqB,CAAC,cAA4C,EAAE,WAAmB,EAAA;AACnG,IAAA,MAAM,aAAa,GAAG,WAAW,EAAE,MAAM,IAAI,CAAC;IAC9C,QAAQ,cAAc;QAClB,KAAK,4BAA4B,CAAC,OAAO;AACrC,YAAA,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,GAAG,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC;QAC7D,KAAK,4BAA4B,CAAC,IAAI;AAClC,YAAA,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,GAAG,EAAE,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC;AAC9D,QAAA;AACI,YAAA,OAAO,cAAc;;AAEjC;;MCDa,mBAAmB,CAAA;AAI9B,IAAA,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sources":["../../../../projects/softpak/components/spx-toaster/src/spx-toaster-autoclose-speed.ts","../../../../projects/softpak/components/spx-toaster/src/spx-toaster.component.ts","../../../../projects/softpak/components/spx-toaster/src/spx-toaster.component.html","../../../../projects/softpak/components/spx-toaster/src/spx-toaster-message.interface.ts","../../../../projects/softpak/components/spx-toaster/store/spx-toaster/spx-toaster.actions.ts","../../../../projects/softpak/components/spx-toaster/store/spx-toaster/spx-toaster.initial.ts","../../../../projects/softpak/components/spx-toaster/store/spx-toaster/spx-toaster.reducer.ts","../../../../projects/softpak/components/spx-toaster/softpak-components-spx-toaster.ts"],"sourcesContent":["export enum SpxToasterSeverityEnum {\n ERROR = 'error',\n INFO = 'info',\n SUCCESS = 'success',\n WARNING = 'warning',\n}\n\nexport enum SpxToasterAutoCloseSpeedEnum {\n DEFAULT = -1,\n SLOW = -2,\n}\n\nexport function toasterAutocloseSpeed(autoCloseSpeed: SpxToasterAutoCloseSpeedEnum, messageText: string) {\n const messageLength = messageText?.length ?? 0;\n switch (autoCloseSpeed) {\n case SpxToasterAutoCloseSpeedEnum.DEFAULT:\n return Math.min(Math.max(messageLength * 50, 2000), 7000);\n case SpxToasterAutoCloseSpeedEnum.SLOW:\n return Math.min(Math.max(messageLength * 60, 3000), 10000);\n default:\n return autoCloseSpeed;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n effect,\n input,\n output,\n} from '@angular/core';\nimport { SpxToasterMessageI } from './spx-toaster-message.interface';\nimport { SpxAlertComponent } from '@softpak/components/spx-alert';\n\n@Component({\n selector: 'spx-toaster',\n standalone: true,\n imports: [SpxAlertComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrl: './spx-toaster.component.scss',\n templateUrl: './spx-toaster.component.html',\n host: {\n class: 'spx-toasts-displayer',\n },\n})\nexport class SpxToasterComponent {\n messages = input.required<SpxToasterMessageI[]>();\n readonly spxAutoclose = input<number>();\n spxClose = output<number>();\n constructor() {\n effect(() => {\n this.messages().forEach((message) => {\n if (message.autoClose) {\n setTimeout(() => {\n this.handleClose(message.id);\n }, message.autoClose);\n }\n });\n });\n }\n\n public handleClose(id: number) {\n this.spxClose.emit(id);\n }\n}\n","\n@if (messages().length > 0) {\n <div\n class=\"flex flex-col gap-2 fixed bottom-16 left-0 right-0 mx-auto px-3 z-50\">\n @for (message of messages(); track message) {\n <spx-alert\n [spxAutoclose]=\"message.autoClose\"\n [spxCloseable]=\"message.closeable\"\n [spxSeverity]=\"message.severity\"\n [spxTitle]=\"message.title\"\n (spxClose)=\"handleClose(message.id)\"\n (click)=\"handleClose(message.id)\"\n [id]=\"message.id\"\n >{{message.message}}\n </spx-alert>\n }\n </div>\n}","import { SpxSeverityEnum } from \"@softpak/components/spx-helpers\";\nimport { SpxToasterAutoCloseSpeedEnum, toasterAutocloseSpeed } from \"./spx-toaster-autoclose-speed\";\n\nexport class SpxToasterMessageI {\n private _autoClose?: number;\n title?: string;\n closeable?: boolean;\n id!: number;\n message!: string;\n severity!: SpxSeverityEnum;\n uniqueIdentifier?: string;\n\n constructor(message: string, id: number, severity: SpxSeverityEnum, autoClose?: SpxToasterAutoCloseSpeedEnum, closeable?: boolean) {\n this.autoClose = autoClose;\n this.message = message || '';\n this.id = id;\n this.severity = severity;\n this.closeable = closeable;\n }\n\n get autoClose(): number | undefined {\n return this._autoClose;\n }\n\n set autoClose(value: number | undefined) {\n if (value && value !== this._autoClose) {\n this._autoClose = toasterAutocloseSpeed(value, this.message);\n }\n }\n\n}\n","import { createActionGroup, emptyProps, props } from '@ngrx/store';\n\nimport { SpxToasterAutoCloseSpeedEnum } from '../../src/spx-toaster-autoclose-speed';\n\nexport const spxToasterActions = createActionGroup({\n source: 'SpxToaster',\n events: {\n ClearAll: emptyProps(),\n ClearAllErrors: emptyProps(),\n ClearAllErrorsAndWarnings: emptyProps(),\n ClearMessage: props<{ id: number; }>(),\n CreateError: props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum; closeable?: boolean; messageText: string; title?: string; }>(),\n CreateInfo: props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum; closeable?: boolean; messageText: string; title?: string; }>(),\n CreateSuccess: props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum; closeable?: boolean; messageText: string; title?: string; }>(),\n CreateWarning: props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum; closeable?: boolean; messageText: string; title?: string; }>(),\n },\n});\n","import { StateI } from \"./spx-toaster.state\";\n\nexport const initialState: StateI = {\n messages: [],\n nextId: 1,\n};\n","import { createFeature, createReducer, on } from '@ngrx/store';\n\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\nimport { SpxToasterMessageI } from '../../src/spx-toaster-message.interface';\nimport { StateI } from './spx-toaster.state';\nimport { initialState } from './spx-toaster.initial';\nimport { spxToasterActions } from './spx-toaster.actions';\nimport { toasterAutocloseSpeed } from '../../src/spx-toaster-autoclose-speed';\n\nexport function addMessage(\n currentMessages: SpxToasterMessageI[], newMessage: SpxToasterMessageI): SpxToasterMessageI[] {\n const messages = [new SpxToasterMessageI(\n newMessage.message,\n newMessage.id,\n newMessage.severity,\n newMessage.autoClose ? newMessage.autoClose : undefined,\n newMessage.closeable ? newMessage.closeable : true,\n ), ...currentMessages];\n if (messages.length > 5) {\n messages.length = 5;\n }\n return messages;\n}\n\nexport default createFeature({\n name: 'spxToaster',\n reducer: createReducer(\n initialState,\n on(spxToasterActions.clearAll, (state: StateI): StateI => {\n return {\n ...state,\n messages: []\n };\n }),\n on(spxToasterActions.clearAllErrors, (state: StateI): StateI => {\n return {\n ...state,\n messages: [...state.messages.filter(msg => msg.severity !== SpxSeverityEnum.error)]\n };\n }),\n on(spxToasterActions.clearAllErrorsAndWarnings, (state: StateI): StateI => {\n return {\n ...state,\n messages: [...state.messages.filter(msg => msg.severity !== SpxSeverityEnum.error &&\n msg.severity !== SpxSeverityEnum.warning)]\n };\n }),\n on(spxToasterActions.clearMessage, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: [...state.messages.filter(msg => msg.id !== action.id)]\n };\n }),\n on(spxToasterActions.createError, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.error,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n on(spxToasterActions.createInfo, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.info,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n on(spxToasterActions.createSuccess, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.success,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n on(spxToasterActions.createWarning, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.warning,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n ),\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;IAAY;AAAZ,CAAA,UAAY,sBAAsB,EAAA;AAC9B,IAAA,sBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,sBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,sBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,sB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MAAM,KAAY;QAClE,OAAO;AACH,YAAA,GAAG,KAAK;AACR,YAAA,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC,QAAQ,EAAE;gBACjC,SAAS,EAAE,MAAM,CAAC,SAAS,GAAG,qBAAqB,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,GAAG,SAAS;AACrG,gBAAA,SAAS,EAAE,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI;gBACrD,EAAE,EAAE,KAAK,CAAC,MAAM;gBAChB,OAAO,EAAE,MAAM,CAAC,WAAW;gBAC3B,QAAQ,EAAE,eAAe,CAAC,OAAO;gBACjC,KAAK,EAAE,MAAM,CAAC,KAAK;aACtB,CAAC;AACF,YAAA,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG;SAC1B;AACL,IAAA,CAAC,CAAC,CACL;AACJ,CAAA,CAAC;;;;;;;;;;;;AC9GF;;AAEG;;;;"}
|
|
@@ -26,6 +26,19 @@ const spxTextChooseValidMonth = "spxTextChooseValidMonth";
|
|
|
26
26
|
const spxTextDateMayNotBeFuture = "spxTextDateMayNotBeFuture";
|
|
27
27
|
const spxTextDateMayNotBePast = "spxTextDateMayNotBePast";
|
|
28
28
|
const spxTextInvalidCode = "spxTextInvalidCode";
|
|
29
|
+
const spxTextLiveUpdateChannelSetFailed = "spxTextLiveUpdateChannelSetFailed";
|
|
30
|
+
const spxTextLiveUpdateCheckFailed = "spxTextLiveUpdateCheckFailed";
|
|
31
|
+
const spxTextUpdateAppVersion = "spxTextUpdateAppVersion";
|
|
32
|
+
const spxTextUpdateBinaryVersionGroup = "spxTextUpdateBinaryVersionGroup";
|
|
33
|
+
const spxTextUpdateBuildVersion = "spxTextUpdateBuildVersion";
|
|
34
|
+
const spxTextUpdateLiveBundle = "spxTextUpdateLiveBundle";
|
|
35
|
+
const spxTextUpdateLiveChannel = "spxTextUpdateLiveChannel";
|
|
36
|
+
const spxTextUpdateStatus = "spxTextUpdateStatus";
|
|
37
|
+
const spxTextUpdateStatusCompleted = "spxTextUpdateStatusCompleted";
|
|
38
|
+
const spxTextUpdateStatusFailed = "spxTextUpdateStatusFailed";
|
|
39
|
+
const spxTextUpdateStatusPreparing = "spxTextUpdateStatusPreparing";
|
|
40
|
+
const spxTextUpdateStatusSyncing = "spxTextUpdateStatusSyncing";
|
|
41
|
+
const spxTextUpdateVersionInfo = "spxTextUpdateVersionInfo";
|
|
29
42
|
|
|
30
43
|
const SpxTranslateEn = {
|
|
31
44
|
[spxTextCheckingForUpdates]: 'checking for updates',
|
|
@@ -56,6 +69,19 @@ const SpxTranslateEn = {
|
|
|
56
69
|
[spxTextDateMayNotBeFuture]: "The selected date may not be in the future.",
|
|
57
70
|
[spxTextDateMayNotBePast]: "The selected date may not be in the past.",
|
|
58
71
|
[spxTextInvalidCode]: "The {{codeName}} code {{codeCode}} does not exist.",
|
|
72
|
+
[spxTextLiveUpdateChannelSetFailed]: "Channel selected, but live update channel could not be set.",
|
|
73
|
+
[spxTextLiveUpdateCheckFailed]: "Unable to check for updates right now. Please try again later.",
|
|
74
|
+
[spxTextUpdateStatus]: "status",
|
|
75
|
+
[spxTextUpdateStatusPreparing]: "preparing update check",
|
|
76
|
+
[spxTextUpdateStatusSyncing]: "synchronizing update information",
|
|
77
|
+
[spxTextUpdateStatusCompleted]: "update check completed",
|
|
78
|
+
[spxTextUpdateStatusFailed]: "update check failed",
|
|
79
|
+
[spxTextUpdateVersionInfo]: "version information",
|
|
80
|
+
[spxTextUpdateAppVersion]: "app version",
|
|
81
|
+
[spxTextUpdateBuildVersion]: "build version",
|
|
82
|
+
[spxTextUpdateBinaryVersionGroup]: "binary version group",
|
|
83
|
+
[spxTextUpdateLiveChannel]: "live update channel",
|
|
84
|
+
[spxTextUpdateLiveBundle]: "downloaded live bundle",
|
|
59
85
|
};
|
|
60
86
|
|
|
61
87
|
const SpxTranslateNl = {
|
|
@@ -86,12 +112,25 @@ const SpxTranslateNl = {
|
|
|
86
112
|
[spxTextChooseFuture]: "Kies een jaar tussen het huidige jaar en 2050.",
|
|
87
113
|
[spxTextChooseValidMonth]: "Kies een geldige maand (een waarde tussen 01 en 12).",
|
|
88
114
|
[spxTextDateMayNotBeFuture]: "De geselecteerde datum mag niet in de toekomst liggen.",
|
|
89
|
-
[spxTextDateMayNotBePast]: "De geselecteerde datum mag niet in het verleden liggen."
|
|
115
|
+
[spxTextDateMayNotBePast]: "De geselecteerde datum mag niet in het verleden liggen.",
|
|
116
|
+
[spxTextLiveUpdateChannelSetFailed]: "Kanaal geselecteerd, maar het live update kanaal kon niet worden ingesteld.",
|
|
117
|
+
[spxTextLiveUpdateCheckFailed]: "Kan nu niet op updates controleren. Probeer het later opnieuw.",
|
|
118
|
+
[spxTextUpdateStatus]: "status",
|
|
119
|
+
[spxTextUpdateStatusPreparing]: "updatecontrole voorbereiden",
|
|
120
|
+
[spxTextUpdateStatusSyncing]: "update-informatie synchroniseren",
|
|
121
|
+
[spxTextUpdateStatusCompleted]: "updatecontrole voltooid",
|
|
122
|
+
[spxTextUpdateStatusFailed]: "updatecontrole mislukt",
|
|
123
|
+
[spxTextUpdateVersionInfo]: "versie-informatie",
|
|
124
|
+
[spxTextUpdateAppVersion]: "app-versie",
|
|
125
|
+
[spxTextUpdateBuildVersion]: "build-versie",
|
|
126
|
+
[spxTextUpdateBinaryVersionGroup]: "binaire versiegroep",
|
|
127
|
+
[spxTextUpdateLiveChannel]: "live update kanaal",
|
|
128
|
+
[spxTextUpdateLiveBundle]: "gedownloade live bundle",
|
|
90
129
|
};
|
|
91
130
|
|
|
92
131
|
/**
|
|
93
132
|
* Generated bundle index. Do not edit.
|
|
94
133
|
*/
|
|
95
134
|
|
|
96
|
-
export { SpxTranslateEn, SpxTranslateNl, spxText404PageNotFound, spxTextChange, spxTextChannel, spxTextCheckingForUpdates, spxTextChooseFuture, spxTextChoosePast, spxTextChooseValidMonth, spxTextCompany, spxTextDateMayNotBeFuture, spxTextDateMayNotBePast, spxTextGoHome, spxTextInvalidCode, spxTextOneMomentPlease, spxTextOpenAppStore, spxTextPageNotFound, spxTextPageNotFoundDescription, spxTextPatchAvailable, spxTextPatternNotValid, spxTextReadyToBeInstalled, spxTextRequired, spxTextSelect, spxTextSelectYourCompany, spxTextTooHigh, spxTextTooLong, spxTextTooLow, spxTextTooShort, spxTextUpdate, spxTextUpdateAvailable };
|
|
135
|
+
export { SpxTranslateEn, SpxTranslateNl, spxText404PageNotFound, spxTextChange, spxTextChannel, spxTextCheckingForUpdates, spxTextChooseFuture, spxTextChoosePast, spxTextChooseValidMonth, spxTextCompany, spxTextDateMayNotBeFuture, spxTextDateMayNotBePast, spxTextGoHome, spxTextInvalidCode, spxTextLiveUpdateChannelSetFailed, spxTextLiveUpdateCheckFailed, spxTextOneMomentPlease, spxTextOpenAppStore, spxTextPageNotFound, spxTextPageNotFoundDescription, spxTextPatchAvailable, spxTextPatternNotValid, spxTextReadyToBeInstalled, spxTextRequired, spxTextSelect, spxTextSelectYourCompany, spxTextTooHigh, spxTextTooLong, spxTextTooLow, spxTextTooShort, spxTextUpdate, spxTextUpdateAppVersion, spxTextUpdateAvailable, spxTextUpdateBinaryVersionGroup, spxTextUpdateBuildVersion, spxTextUpdateLiveBundle, spxTextUpdateLiveChannel, spxTextUpdateStatus, spxTextUpdateStatusCompleted, spxTextUpdateStatusFailed, spxTextUpdateStatusPreparing, spxTextUpdateStatusSyncing, spxTextUpdateVersionInfo };
|
|
97
136
|
//# sourceMappingURL=softpak-components-spx-translate.mjs.map
|