@softpak/components 20.12.17 → 20.12.18

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.
@@ -143,7 +143,9 @@ class SpxConfirmEffects {
143
143
  }
144
144
  return [
145
145
  answerConfirm({ id: action.id }),
146
- spxSpinnerActions.hide({})
146
+ spxSpinnerActions.hide({
147
+ action: action.id,
148
+ })
147
149
  ];
148
150
  })));
149
151
  }
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-confirm.mjs","sources":["../../../../projects/softpak/components/spx-confirm/spx-confirm.component.ts","../../../../projects/softpak/components/spx-confirm/spx-confirm.component.html","../../../../projects/softpak/components/spx-confirm/spx-confirm-displayer/spx-confirm-displayer.component.ts","../../../../projects/softpak/components/spx-confirm/spx-confirm-displayer/spx-confirm-displayer.component.html","../../../../projects/softpak/components/spx-confirm/store/spx-confirm.actions.ts","../../../../projects/softpak/components/spx-confirm/store/spx-confirm.reducer.ts","../../../../projects/softpak/components/spx-confirm/store/spx-confirm.effects.ts","../../../../projects/softpak/components/spx-confirm/softpak-components-spx-confirm.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport { faTimes } from '@fortawesome/free-solid-svg-icons';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\n\n@Component({\n selector: 'spx-confirm',\n templateUrl: './spx-confirm.component.html',\n styleUrls: ['./spx-confirm.component.scss'],\n imports: [SpxButtonComponent, FaIconComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class SpxConfirmComponent {\n id = input.required<string>();\n spxCancel = output<string>();\n spxConfirm = output<string>();\n faTimes = faTimes;\n severityError = SpxSeverityEnum.error;\n severityInfo = SpxSeverityEnum.info;\n severitySuccess = SpxSeverityEnum.success;\n\n constructor() { }\n\n onCancel() {\n this.spxCancel.emit(this.id());\n }\n\n onConfirm() {\n if(this.id()) {}\n this.spxConfirm.emit(this.id());\n }\n\n}\n","<div class=\"block spx-confirm h-full mt-12\">\n <div class=\"bg-amber-400 flex gap-3 items-center px-3 py-1 rounded-t text-black\">\n <div class=\"grow font-bold\">\n <ng-content select=\"[confirm__title]\"></ng-content>\n </div>\n <spx-button (spxClick)=\"onCancel()\" [spxType]=\"'button'\" [spxSeverity]=\"severityInfo\"><fa-icon\n [icon]=\"faTimes\"></fa-icon>\n </spx-button>\n </div>\n <div class=\"flex flex-col gap-3 dark:bg-gray-700 bg-white p-3\">\n <ng-content select=\"[confirm__content]\"></ng-content>\n <div class=\"grid grid-cols-1 grid-rows-2 sm:grid-rows-1 sm:grid-cols-2 gap-3 grid-flow-row\">\n <spx-button (spxClick)=\"onCancel()\" [spxFullWidth]=\"true\" [spxType]=\"'button'\"\n [spxSeverity]=\"severityError\">\n <ng-content select=\"[confirm__btn_cancel]\"></ng-content>\n </spx-button>\n <spx-button #confirm (spxClick)=\"onConfirm()\" [spxFullWidth]=\"true\" [spxType]=\"'submit'\"\n [spxSeverity]=\"severitySuccess\">\n <ng-content select=\"[confirm__btn_confirm]\"></ng-content>\n </spx-button>\n </div>\n </div>\n</div>","import { ChangeDetectionStrategy, Component, OnDestroy, OnInit, signal } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { Subscription } from 'rxjs';\nimport { SpxConfirmComponent } from '../spx-confirm.component';\nimport { spxConfirmActions, spxConfirmReducer } from '../public-api';\n\n@Component({\n selector: 'spx-confirm-displayer',\n templateUrl: './spx-confirm-displayer.component.html',\n styleUrls: ['./spx-confirm-displayer.component.scss'],\n imports: [SpxConfirmComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class SpxConfirmDisplayerComponent implements OnInit, OnDestroy {\n confirms = signal<{\n content: string;\n id: string;\n title: string;\n cancelled?: boolean;\n confirmed?: boolean;\n noYesButton?: boolean;\n }[]>([]);\n\n private subscriptions: {\n confirmState?: Subscription;\n } = {};\n\n constructor(\n private readonly appStore: Store,\n ) { }\n\n ngOnInit() {\n this.subscriptions.confirmState = this.appStore.select(spxConfirmReducer.default.selectConfirms).subscribe(confirms => {\n if (confirms?.length === 0) {\n this.confirms.set([]);\n return;\n }\n\n this.confirms.set(confirms);\n });\n }\n\n ngOnDestroy() {\n this.subscriptions?.confirmState?.unsubscribe();\n }\n\n onCancel(id: string) {\n this.appStore.dispatch(spxConfirmActions.answer({\n cancel: true,\n id\n }));\n }\n\n onConfirm(id: string) {\n this.appStore.dispatch(spxConfirmActions.answer({\n confirm: true,\n id\n }));\n }\n\n}\n","@if (confirms().length > 0) {\n <div class=\"bg-black/75 block relative h-full\" style=\"z-index: 1000\">\n @for (confirm of confirms(); track confirm.id) {\n <spx-confirm [id]=\"confirm.id\" (spxCancel)=\"onCancel($event)\"\n (spxConfirm)=\"onConfirm($event)\">\n <ng-container confirm__title>{{ confirm.title }}</ng-container>\n <ng-container confirm__content>{{ confirm.content }}</ng-container>\n <ng-container confirm__btn_cancel>{{confirm.noYesButton ? 'NO' : 'Cancel'}}</ng-container>\n <ng-container confirm__btn_confirm>{{confirm.noYesButton ? 'YES' : 'OK'}}</ng-container>\n </spx-confirm>\n }\n </div>\n}","import { createAction, props, union } from '@ngrx/store';\nimport { SpxConfirmI } from './spx-confirm.reducer';\n\nexport const answer = createAction('[Confirm] Answer', props<{\n cancel?: boolean;\n confirm?: boolean;\n id: string;\n}>());\nexport const reset = createAction('[Confirm] Reset', props<Record<string, unknown>>());\nexport const show = createAction('[Confirm] Show', props<SpxConfirmI>());\n\nexport const answerConfirm = createAction('[Confirm] Answer Confirm', props<{\n id: string;\n}>());\n\nconst all = union({\n reset,\n show,\n answerConfirm,\n});\nexport type Actions = typeof all;\n","import * as actions from './spx-confirm.actions';\nimport { createFeature, createReducer, on } from '@ngrx/store';\n\nexport interface SpxConfirmI {\n content: string;\n id: string;\n title: string;\n noYesButton?: boolean;\n onOK?: () => void;\n onCancel?: () => void;\n}\n\nexport interface State {\n confirms: SpxConfirmI[];\n}\n\nconst initialState: State = {\n confirms: [],\n};\n\nexport default createFeature({\n name: 'spxConfirm',\n reducer: createReducer(\n initialState,\n on(\n actions.reset,\n (state: State, {}): State => ({\n ...state,\n })\n ),\n on(\n actions.show,\n (state: State, { content, id, title, noYesButton, onCancel, onOK }): State => {\n const confirms =\n state.confirms.filter((c) => c.id).length > 0\n ? state.confirms\n : [\n ...state.confirms,\n {\n content,\n id,\n title,\n noYesButton,\n onCancel,\n onOK,\n },\n ];\n return {\n ...state,\n confirms,\n };\n }\n ),\n on(\n actions.answerConfirm,\n (state: State, { id }): State => ({\n ...state,\n confirms: [\n ...state.confirms.filter((c) => c.id !== id),\n ],\n })\n )\n ),\n});\n","import { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Observable } from 'rxjs';\nimport { mergeMap, withLatestFrom } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\nimport * as actions from './spx-confirm.actions';\nimport { spxSpinnerActions } from '@softpak/components/spx-spinner';\nimport { Store } from '@ngrx/store';\nimport spxConfirmReducer from './spx-confirm.reducer';\n\n@Injectable()\nexport class SpxConfirmEffects {\n onAnswer$: Observable<any> = createEffect(() =>\n this.actions$.pipe(\n ofType(actions.answer),\n withLatestFrom(this.appStore.select(spxConfirmReducer.selectConfirms)),\n mergeMap(([action, confirms]) => {\n\n if (action.confirm) {\n confirms.find((c) => c.id === action.id)?.onOK?.();\n }\n if (action.cancel) {\n confirms.find((c) => c.id === action.id)?.onCancel?.();\n }\n return [\n actions.answerConfirm({id: action.id}),\n spxSpinnerActions.hide({})\n ];\n })\n )\n );\n\n constructor(\n private readonly actions$: Actions,\n private readonly appStore: Store,\n ) {}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["spxConfirmReducer.default","spxConfirmActions.answer","actions.reset","actions.show","actions.answerConfirm","actions.answer","spxConfirmReducer","i1","i2"],"mappings":";;;;;;;;;;;;;MAca,m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CAAC,CAAC,CACH,CACF;IAKE;8GAxBQ,iBAAiB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAG,IAAA,CAAA,OAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,EAAA,CAAA,KAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAjB,iBAAiB,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B;;;;;;;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-confirm.mjs","sources":["../../../../projects/softpak/components/spx-confirm/spx-confirm.component.ts","../../../../projects/softpak/components/spx-confirm/spx-confirm.component.html","../../../../projects/softpak/components/spx-confirm/spx-confirm-displayer/spx-confirm-displayer.component.ts","../../../../projects/softpak/components/spx-confirm/spx-confirm-displayer/spx-confirm-displayer.component.html","../../../../projects/softpak/components/spx-confirm/store/spx-confirm.actions.ts","../../../../projects/softpak/components/spx-confirm/store/spx-confirm.reducer.ts","../../../../projects/softpak/components/spx-confirm/store/spx-confirm.effects.ts","../../../../projects/softpak/components/spx-confirm/softpak-components-spx-confirm.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport { faTimes } from '@fortawesome/free-solid-svg-icons';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\n\n@Component({\n selector: 'spx-confirm',\n templateUrl: './spx-confirm.component.html',\n styleUrls: ['./spx-confirm.component.scss'],\n imports: [SpxButtonComponent, FaIconComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class SpxConfirmComponent {\n id = input.required<string>();\n spxCancel = output<string>();\n spxConfirm = output<string>();\n faTimes = faTimes;\n severityError = SpxSeverityEnum.error;\n severityInfo = SpxSeverityEnum.info;\n severitySuccess = SpxSeverityEnum.success;\n\n constructor() { }\n\n onCancel() {\n this.spxCancel.emit(this.id());\n }\n\n onConfirm() {\n if(this.id()) {}\n this.spxConfirm.emit(this.id());\n }\n\n}\n","<div class=\"block spx-confirm h-full mt-12\">\n <div class=\"bg-amber-400 flex gap-3 items-center px-3 py-1 rounded-t text-black\">\n <div class=\"grow font-bold\">\n <ng-content select=\"[confirm__title]\"></ng-content>\n </div>\n <spx-button (spxClick)=\"onCancel()\" [spxType]=\"'button'\" [spxSeverity]=\"severityInfo\"><fa-icon\n [icon]=\"faTimes\"></fa-icon>\n </spx-button>\n </div>\n <div class=\"flex flex-col gap-3 dark:bg-gray-700 bg-white p-3\">\n <ng-content select=\"[confirm__content]\"></ng-content>\n <div class=\"grid grid-cols-1 grid-rows-2 sm:grid-rows-1 sm:grid-cols-2 gap-3 grid-flow-row\">\n <spx-button (spxClick)=\"onCancel()\" [spxFullWidth]=\"true\" [spxType]=\"'button'\"\n [spxSeverity]=\"severityError\">\n <ng-content select=\"[confirm__btn_cancel]\"></ng-content>\n </spx-button>\n <spx-button #confirm (spxClick)=\"onConfirm()\" [spxFullWidth]=\"true\" [spxType]=\"'submit'\"\n [spxSeverity]=\"severitySuccess\">\n <ng-content select=\"[confirm__btn_confirm]\"></ng-content>\n </spx-button>\n </div>\n </div>\n</div>","import { ChangeDetectionStrategy, Component, OnDestroy, OnInit, signal } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { Subscription } from 'rxjs';\nimport { SpxConfirmComponent } from '../spx-confirm.component';\nimport { spxConfirmActions, spxConfirmReducer } from '../public-api';\n\n@Component({\n selector: 'spx-confirm-displayer',\n templateUrl: './spx-confirm-displayer.component.html',\n styleUrls: ['./spx-confirm-displayer.component.scss'],\n imports: [SpxConfirmComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class SpxConfirmDisplayerComponent implements OnInit, OnDestroy {\n confirms = signal<{\n content: string;\n id: string;\n title: string;\n cancelled?: boolean;\n confirmed?: boolean;\n noYesButton?: boolean;\n }[]>([]);\n\n private subscriptions: {\n confirmState?: Subscription;\n } = {};\n\n constructor(\n private readonly appStore: Store,\n ) { }\n\n ngOnInit() {\n this.subscriptions.confirmState = this.appStore.select(spxConfirmReducer.default.selectConfirms).subscribe(confirms => {\n if (confirms?.length === 0) {\n this.confirms.set([]);\n return;\n }\n\n this.confirms.set(confirms);\n });\n }\n\n ngOnDestroy() {\n this.subscriptions?.confirmState?.unsubscribe();\n }\n\n onCancel(id: string) {\n this.appStore.dispatch(spxConfirmActions.answer({\n cancel: true,\n id\n }));\n }\n\n onConfirm(id: string) {\n this.appStore.dispatch(spxConfirmActions.answer({\n confirm: true,\n id\n }));\n }\n\n}\n","@if (confirms().length > 0) {\n <div class=\"bg-black/75 block relative h-full\" style=\"z-index: 1000\">\n @for (confirm of confirms(); track confirm.id) {\n <spx-confirm [id]=\"confirm.id\" (spxCancel)=\"onCancel($event)\"\n (spxConfirm)=\"onConfirm($event)\">\n <ng-container confirm__title>{{ confirm.title }}</ng-container>\n <ng-container confirm__content>{{ confirm.content }}</ng-container>\n <ng-container confirm__btn_cancel>{{confirm.noYesButton ? 'NO' : 'Cancel'}}</ng-container>\n <ng-container confirm__btn_confirm>{{confirm.noYesButton ? 'YES' : 'OK'}}</ng-container>\n </spx-confirm>\n }\n </div>\n}","import { createAction, props, union } from '@ngrx/store';\nimport { SpxConfirmI } from './spx-confirm.reducer';\n\nexport const answer = createAction('[Confirm] Answer', props<{\n cancel?: boolean;\n confirm?: boolean;\n id: string;\n}>());\nexport const reset = createAction('[Confirm] Reset', props<Record<string, unknown>>());\nexport const show = createAction('[Confirm] Show', props<SpxConfirmI>());\n\nexport const answerConfirm = createAction('[Confirm] Answer Confirm', props<{\n id: string;\n}>());\n\nconst all = union({\n reset,\n show,\n answerConfirm,\n});\nexport type Actions = typeof all;\n","import * as actions from './spx-confirm.actions';\nimport { createFeature, createReducer, on } from '@ngrx/store';\n\nexport interface SpxConfirmI {\n content: string;\n id: string;\n title: string;\n noYesButton?: boolean;\n onOK?: () => void;\n onCancel?: () => void;\n}\n\nexport interface State {\n confirms: SpxConfirmI[];\n}\n\nconst initialState: State = {\n confirms: [],\n};\n\nexport default createFeature({\n name: 'spxConfirm',\n reducer: createReducer(\n initialState,\n on(\n actions.reset,\n (state: State, {}): State => ({\n ...state,\n })\n ),\n on(\n actions.show,\n (state: State, { content, id, title, noYesButton, onCancel, onOK }): State => {\n const confirms =\n state.confirms.filter((c) => c.id).length > 0\n ? state.confirms\n : [\n ...state.confirms,\n {\n content,\n id,\n title,\n noYesButton,\n onCancel,\n onOK,\n },\n ];\n return {\n ...state,\n confirms,\n };\n }\n ),\n on(\n actions.answerConfirm,\n (state: State, { id }): State => ({\n ...state,\n confirms: [\n ...state.confirms.filter((c) => c.id !== id),\n ],\n })\n )\n ),\n});\n","import * as actions from './spx-confirm.actions';\n\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { mergeMap, withLatestFrom } from 'rxjs/operators';\n\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { Store } from '@ngrx/store';\nimport spxConfirmReducer from './spx-confirm.reducer';\nimport { spxSpinnerActions } from '@softpak/components/spx-spinner';\n\n@Injectable()\nexport class SpxConfirmEffects {\n onAnswer$: Observable<any> = createEffect(() =>\n this.actions$.pipe(\n ofType(actions.answer),\n withLatestFrom(this.appStore.select(spxConfirmReducer.selectConfirms)),\n mergeMap(([action, confirms]) => {\n\n if (action.confirm) {\n confirms.find((c) => c.id === action.id)?.onOK?.();\n }\n if (action.cancel) {\n confirms.find((c) => c.id === action.id)?.onCancel?.();\n }\n return [\n actions.answerConfirm({id: action.id}),\n spxSpinnerActions.hide({\n action: action.id,\n })\n ];\n })\n )\n );\n\n constructor(\n private readonly actions$: Actions,\n private readonly appStore: Store,\n ) {}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["spxConfirmReducer.default","spxConfirmActions.answer","actions.reset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AAE,EAAC,CAAC;gBACtC,iBAAiB,CAAC,IAAI,CAAC;oBACrB,MAAM,EAAE,MAAM,CAAC,EAAE;iBAClB;aACF;QACH,CAAC,CAAC,CACH,CACF;IAKE;8GA1BQ,iBAAiB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAG,IAAA,CAAA,OAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,EAAA,CAAA,KAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAjB,iBAAiB,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B;;;;;;;;ACXD;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-redux.mjs","sources":["../../../../projects/softpak/components/spx-redux/src/spx-create-api-actions.ts","../../../../projects/softpak/components/spx-redux/src/spx-create-api-reducer.ts","../../../../projects/softpak/components/spx-redux/src/spx-create-initial-state.ts","../../../../projects/softpak/components/spx-redux/softpak-components-spx-redux.ts"],"sourcesContent":["import { ActionCreator, emptyProps, props } from \"@ngrx/store\";\n\nexport type WithProps<P extends object> = ActionCreator<string, (props: P) => P>;\nexport type WithoutProps = ActionCreator<string, () => object>;\n\nexport const spxCreateApiActions = <TQuery, TResult, TMsg = string>() => {\n return {\n Error: props<{ error: TMsg }>(),\n Load: props<{ query: TQuery }>(),\n Received: props<{ result: TResult }>(),\n Reset: emptyProps(),\n };\n}","import { WithProps, WithoutProps } from \"./spx-create-api-actions\";\nimport { createReducer, on } from \"@ngrx/store\";\n\nimport { SpxState } from \"./spx-state.interface\";\nimport { spxCreateInitialStateForReducer } from \"./spx-create-initial-state\";\n\nexport interface SpxApiActions<TQuery, TData, TError> {\n error: WithProps<{ error: TError }>;\n load: WithProps<{ query: TQuery }>;\n received: WithProps<{ result: TData }>;\n reset: WithoutProps;\n}\n\nexport function spxCreateApiReducer<TQuery, TData, TError>(\n actions: SpxApiActions<TQuery, TData, TError>,\n initialState: SpxState<TQuery, TData, TError>,\n) {\n return createReducer(\n initialState,\n\n on(actions.load, (state: SpxState<TQuery, TData, TError>, { query }): SpxState<TQuery, TData, TError> => ({\n ...state,\n loading: true,\n loaded: false,\n queryNext: query,\n })),\n\n on(actions.received, (state: SpxState<TQuery, TData, TError>, { result }): SpxState<TQuery, TData, TError> => ({\n ...state,\n data: result as TData,\n error: null,\n loading: false,\n loaded: true,\n query: state.queryNext,\n queryNext: null,\n })),\n\n on(actions.error, (state: SpxState<TQuery, TData, TError>, { error }): SpxState<TQuery, TData, TError> => ({\n ...state,\n error,\n data: null,\n loading: false,\n loaded: false,\n query: state.queryNext,\n queryNext: null,\n })),\n\n on(actions.reset, (): SpxState<TQuery, TData, TError> => initialState)\n );\n}","import { SpxState } from \"./spx-state.interface\";\n\nexport const spxCreateInitialStateForReducer = <TQuery, TData, TError>(): SpxState<TQuery, TData, TError> => ({\n data: null,\n error: null,\n loading: false,\n loaded: false,\n query: null,\n queryNext: null,\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAKO,MAAM,mBAAmB,GAAG,MAAqC;IACtE,OAAO;QACL,KAAK,EAAE,KAAK,EAAmB;QAC/B,IAAI,EAAE,KAAK,EAAqB;QAChC,QAAQ,EAAE,KAAK,EAAuB;QACtC,KAAK,EAAE,UAAU,EAAE;KACpB;AACH;;ACCM,SAAU,mBAAmB,CACjC,OAA6C,EAC7C,YAA6C,EAAA;AAE7C,IAAA,OAAO,aAAa,CAClB,YAAY,EAEZ,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,KAAsC,EAAE,EAAE,KAAK,EAAE,MAAuC;AACxG,QAAA,GAAG,KAAK;AACR,QAAA,OAAO,EAAE,IAAI;AACb,QAAA,MAAM,EAAE,KAAK;AACb,QAAA,SAAS,EAAE,KAAK;AACjB,KAAA,CAAC,CAAC,EAEH,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAsC,EAAE,EAAE,MAAM,EAAE,MAAuC;AAC7G,QAAA,GAAG,KAAK;AACR,QAAA,IAAI,EAAE,MAAe;AACrB,QAAA,KAAK,EAAE,IAAI;AACX,QAAA,OAAO,EAAE,KAAK;AACd,QAAA,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,KAAK,CAAC,SAAS;AACtB,QAAA,SAAS,EAAE,IAAI;AAChB,KAAA,CAAC,CAAC,EAEH,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,KAAsC,EAAE,EAAE,KAAK,EAAE,MAAuC;AACzG,QAAA,GAAG,KAAK;QACR,KAAK;AACL,QAAA,IAAI,EAAE,IAAI;AACV,QAAA,OAAO,EAAE,KAAK;AACd,QAAA,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,KAAK,CAAC,SAAS;AACtB,QAAA,SAAS,EAAE,IAAI;AAChB,KAAA,CAAC,CAAC,EAEH,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,MAAuC,YAAY,CAAC,CACvE;AACH;;AC/CO,MAAM,+BAA+B,GAAG,OAA+D;AAC5G,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,OAAO,EAAE,KAAK;AACd,IAAA,MAAM,EAAE,KAAK;AACb,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,SAAS,EAAE,IAAI;AAChB,CAAA;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-redux.mjs","sources":["../../../../projects/softpak/components/spx-redux/src/spx-create-api-actions.ts","../../../../projects/softpak/components/spx-redux/src/spx-create-api-reducer.ts","../../../../projects/softpak/components/spx-redux/src/spx-create-initial-state.ts","../../../../projects/softpak/components/spx-redux/softpak-components-spx-redux.ts"],"sourcesContent":["import { ActionCreator, emptyProps, props } from \"@ngrx/store\";\n\nexport type WithProps<P extends object> = ActionCreator<string, (props: P) => P>;\nexport type WithoutProps = ActionCreator<string, () => object>;\n\nexport const spxCreateApiActions = <TQuery, TResult, TMsg = string>() => {\n return {\n Error: props<{ error: TMsg }>(),\n Load: props<{ query: TQuery }>(),\n Received: props<{ result: TResult }>(),\n Reset: emptyProps(),\n };\n}","import { WithProps, WithoutProps } from \"./spx-create-api-actions\";\nimport { createReducer, on } from \"@ngrx/store\";\n\nimport { SpxState } from \"./spx-state.interface\";\n\nexport interface SpxApiActions<TQuery, TData, TError> {\n error: WithProps<{ error: TError }>;\n load: WithProps<{ query: TQuery }>;\n received: WithProps<{ result: TData }>;\n reset: WithoutProps;\n}\n\nexport function spxCreateApiReducer<TQuery, TData, TError>(\n actions: SpxApiActions<TQuery, TData, TError>,\n initialState: SpxState<TQuery, TData, TError>,\n) {\n return createReducer(\n initialState,\n\n on(actions.load, (state: SpxState<TQuery, TData, TError>, { query }): SpxState<TQuery, TData, TError> => ({\n ...state,\n loading: true,\n loaded: false,\n queryNext: query,\n })),\n\n on(actions.received, (state: SpxState<TQuery, TData, TError>, { result }): SpxState<TQuery, TData, TError> => ({\n ...state,\n data: result as TData,\n error: null,\n loading: false,\n loaded: true,\n query: state.queryNext,\n queryNext: null,\n })),\n\n on(actions.error, (state: SpxState<TQuery, TData, TError>, { error }): SpxState<TQuery, TData, TError> => ({\n ...state,\n error,\n data: null,\n loading: false,\n loaded: false,\n query: state.queryNext,\n queryNext: null,\n })),\n\n on(actions.reset, (): SpxState<TQuery, TData, TError> => initialState)\n );\n}","import { SpxState } from \"./spx-state.interface\";\n\nexport const spxCreateInitialStateForReducer = <TQuery, TData, TError>(): SpxState<TQuery, TData, TError> => ({\n data: null,\n error: null,\n loading: false,\n loaded: false,\n query: null,\n queryNext: null,\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAKO,MAAM,mBAAmB,GAAG,MAAqC;IACtE,OAAO;QACL,KAAK,EAAE,KAAK,EAAmB;QAC/B,IAAI,EAAE,KAAK,EAAqB;QAChC,QAAQ,EAAE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AAE,IAAI;AACX,IAAA,SAAS,EAAE,IAAI;AAChB,CAAA;;ACTD;;AAEG;;;;"}
@@ -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,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AAC,CAAC,GAAG,KAAK,CAAC,WAAW;AACrI,QAAA,MAAM,eAAe,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,eAAe,IAAI,KAAK,CAAC,eAAe,GAAG,CAAC,GAAG,KAAK,CAAC,eAAe,GAAG,CAAC,GAAG,CAAC,CAAC;QACrH,OAAO;AACH,YAAA,GAAG,KAAK;YACR,WAAW;YACX,eAAe;AACf,YAAA,IAAI,EAAE,WAAW,CAAC,MAAM,IAAI,CAAC,IAAI,eAAe,GAAG,CAAC,GAAG,IAAI,GAAG,KAAK;SACtE;IACL,CAAC,CAAC,EACF,EAAE,CAACC,KAAa,EAAE,CAAC,KAAa,KAAY;QACxC,OAAO;AACH,YAAA,GAAG,KAAK;AACR,YAAA,IAAI,EAAE,KAAK;AACX,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 { 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,C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K;YACR,WAAW;YACX,eAAe;AACf,YAAA,IAAI,EAAE,WAAW,CAAC,MAAM,IAAI,CAAC,IAAI,eAAe,GAAG,CAAC,GAAG,IAAI,GAAG,KAAK;SACtE;IACL,CAAC,CAAC,EACF,EAAE,CAACC,KAAa,EAAE,CAAC,KAAa,KAAY;QACxC,OAAO;AACH,YAAA,GAAG,KAAK;AACR,YAAA,IAAI,EAAE,KAAK;AACX,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;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softpak/components",
3
- "version": "20.12.17",
3
+ "version": "20.12.18",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "20.x.x",
@@ -40,18 +40,14 @@
40
40
  "types": "./spx-alert/index.d.ts",
41
41
  "default": "./fesm2022/softpak-components-spx-alert.mjs"
42
42
  },
43
- "./spx-app-expiry": {
44
- "types": "./spx-app-expiry/index.d.ts",
45
- "default": "./fesm2022/softpak-components-spx-app-expiry.mjs"
43
+ "./spx-app-configuration": {
44
+ "types": "./spx-app-configuration/index.d.ts",
45
+ "default": "./fesm2022/softpak-components-spx-app-configuration.mjs"
46
46
  },
47
47
  "./spx-button": {
48
48
  "types": "./spx-button/index.d.ts",
49
49
  "default": "./fesm2022/softpak-components-spx-button.mjs"
50
50
  },
51
- "./spx-app-configuration": {
52
- "types": "./spx-app-configuration/index.d.ts",
53
- "default": "./fesm2022/softpak-components-spx-app-configuration.mjs"
54
- },
55
51
  "./spx-capitalize": {
56
52
  "types": "./spx-capitalize/index.d.ts",
57
53
  "default": "./fesm2022/softpak-components-spx-capitalize.mjs"
@@ -60,69 +56,73 @@
60
56
  "types": "./spx-card/index.d.ts",
61
57
  "default": "./fesm2022/softpak-components-spx-card.mjs"
62
58
  },
63
- "./spx-check-digit": {
64
- "types": "./spx-check-digit/index.d.ts",
65
- "default": "./fesm2022/softpak-components-spx-check-digit.mjs"
59
+ "./spx-change-details": {
60
+ "types": "./spx-change-details/index.d.ts",
61
+ "default": "./fesm2022/softpak-components-spx-change-details.mjs"
66
62
  },
67
63
  "./spx-channel-selection": {
68
64
  "types": "./spx-channel-selection/index.d.ts",
69
65
  "default": "./fesm2022/softpak-components-spx-channel-selection.mjs"
70
66
  },
71
- "./spx-change-details": {
72
- "types": "./spx-change-details/index.d.ts",
73
- "default": "./fesm2022/softpak-components-spx-change-details.mjs"
67
+ "./spx-check-digit": {
68
+ "types": "./spx-check-digit/index.d.ts",
69
+ "default": "./fesm2022/softpak-components-spx-check-digit.mjs"
70
+ },
71
+ "./spx-app-expiry": {
72
+ "types": "./spx-app-expiry/index.d.ts",
73
+ "default": "./fesm2022/softpak-components-spx-app-expiry.mjs"
74
74
  },
75
75
  "./spx-confirm": {
76
76
  "types": "./spx-confirm/index.d.ts",
77
77
  "default": "./fesm2022/softpak-components-spx-confirm.mjs"
78
78
  },
79
- "./spx-helpers": {
80
- "types": "./spx-helpers/index.d.ts",
81
- "default": "./fesm2022/softpak-components-spx-helpers.mjs"
79
+ "./spx-form-view": {
80
+ "types": "./spx-form-view/index.d.ts",
81
+ "default": "./fesm2022/softpak-components-spx-form-view.mjs"
82
82
  },
83
83
  "./spx-form-section": {
84
84
  "types": "./spx-form-section/index.d.ts",
85
85
  "default": "./fesm2022/softpak-components-spx-form-section.mjs"
86
86
  },
87
- "./spx-form-view": {
88
- "types": "./spx-form-view/index.d.ts",
89
- "default": "./fesm2022/softpak-components-spx-form-view.mjs"
87
+ "./spx-helpers": {
88
+ "types": "./spx-helpers/index.d.ts",
89
+ "default": "./fesm2022/softpak-components-spx-helpers.mjs"
90
90
  },
91
91
  "./spx-inputs": {
92
92
  "types": "./spx-inputs/index.d.ts",
93
93
  "default": "./fesm2022/softpak-components-spx-inputs.mjs"
94
94
  },
95
- "./spx-number-check": {
96
- "types": "./spx-number-check/index.d.ts",
97
- "default": "./fesm2022/softpak-components-spx-number-check.mjs"
98
- },
99
95
  "./spx-navigation": {
100
96
  "types": "./spx-navigation/index.d.ts",
101
97
  "default": "./fesm2022/softpak-components-spx-navigation.mjs"
102
98
  },
103
- "./spx-patch": {
104
- "types": "./spx-patch/index.d.ts",
105
- "default": "./fesm2022/softpak-components-spx-patch.mjs"
106
- },
107
99
  "./spx-pagination": {
108
100
  "types": "./spx-pagination/index.d.ts",
109
101
  "default": "./fesm2022/softpak-components-spx-pagination.mjs"
110
102
  },
103
+ "./spx-patch": {
104
+ "types": "./spx-patch/index.d.ts",
105
+ "default": "./fesm2022/softpak-components-spx-patch.mjs"
106
+ },
111
107
  "./spx-pipes": {
112
108
  "types": "./spx-pipes/index.d.ts",
113
109
  "default": "./fesm2022/softpak-components-spx-pipes.mjs"
114
110
  },
115
- "./spx-progress-bar": {
116
- "types": "./spx-progress-bar/index.d.ts",
117
- "default": "./fesm2022/softpak-components-spx-progress-bar.mjs"
111
+ "./spx-number-check": {
112
+ "types": "./spx-number-check/index.d.ts",
113
+ "default": "./fesm2022/softpak-components-spx-number-check.mjs"
114
+ },
115
+ "./spx-spinner": {
116
+ "types": "./spx-spinner/index.d.ts",
117
+ "default": "./fesm2022/softpak-components-spx-spinner.mjs"
118
118
  },
119
119
  "./spx-redux": {
120
120
  "types": "./spx-redux/index.d.ts",
121
121
  "default": "./fesm2022/softpak-components-spx-redux.mjs"
122
122
  },
123
- "./spx-spinner": {
124
- "types": "./spx-spinner/index.d.ts",
125
- "default": "./fesm2022/softpak-components-spx-spinner.mjs"
123
+ "./spx-progress-bar": {
124
+ "types": "./spx-progress-bar/index.d.ts",
125
+ "default": "./fesm2022/softpak-components-spx-progress-bar.mjs"
126
126
  },
127
127
  "./spx-stock-info": {
128
128
  "types": "./spx-stock-info/index.d.ts",
@@ -144,10 +144,6 @@
144
144
  "types": "./spx-toggle/index.d.ts",
145
145
  "default": "./fesm2022/softpak-components-spx-toggle.mjs"
146
146
  },
147
- "./spx-toaster": {
148
- "types": "./spx-toaster/index.d.ts",
149
- "default": "./fesm2022/softpak-components-spx-toaster.mjs"
150
- },
151
147
  "./spx-translate": {
152
148
  "types": "./spx-translate/index.d.ts",
153
149
  "default": "./fesm2022/softpak-components-spx-translate.mjs"
@@ -156,6 +152,10 @@
156
152
  "types": "./spx-update/index.d.ts",
157
153
  "default": "./fesm2022/softpak-components-spx-update.mjs"
158
154
  },
155
+ "./spx-toaster": {
156
+ "types": "./spx-toaster/index.d.ts",
157
+ "default": "./fesm2022/softpak-components-spx-toaster.mjs"
158
+ },
159
159
  "./spx-validation": {
160
160
  "types": "./spx-validation/index.d.ts",
161
161
  "default": "./fesm2022/softpak-components-spx-validation.mjs"
@@ -9,20 +9,20 @@ declare class SpxSpinnerComponent {
9
9
  }
10
10
 
11
11
  declare const hide: _ngrx_store.ActionCreator<"[SPX / Spinner] Hide", (props: {
12
- action?: string;
12
+ action: string;
13
13
  }) => {
14
- action?: string;
14
+ action: string;
15
15
  } & _ngrx_store.Action<"[SPX / Spinner] Hide">>;
16
16
  declare const reset: _ngrx_store.ActionCreator<"[SPX / Spinner] Reset", (props: Record<string, unknown>) => Record<string, unknown> & _ngrx_store.Action<"[SPX / Spinner] Reset">>;
17
17
  declare const show: _ngrx_store.ActionCreator<"[SPX / Spinner] Show", (props: {
18
- action?: string;
18
+ action: string;
19
19
  }) => {
20
- action?: string;
20
+ action: string;
21
21
  } & _ngrx_store.Action<"[SPX / Spinner] Show">>;
22
22
  declare const all: ({
23
- action?: string;
23
+ action: string;
24
24
  } & _ngrx_store.Action<"[SPX / Spinner] Hide">) | ({
25
- action?: string;
25
+ action: string;
26
26
  } & _ngrx_store.Action<"[SPX / Spinner] Show">);
27
27
  type Actions = typeof all;
28
28