mirror of https://github.com/abpframework/abp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
6.2 KiB
1 line
6.2 KiB
{"version":3,"file":"abp-ng.setting-management.js","sources":["ng://@abp/ng.setting-management/lib/actions/setting-management.actions.ts","ng://@abp/ng.setting-management/lib/states/setting-management.state.ts","ng://@abp/ng.setting-management/lib/components/setting-management.component.ts","ng://@abp/ng.setting-management/lib/setting-management-routing.module.ts","ng://@abp/ng.setting-management/lib/setting-management.module.ts"],"sourcesContent":["import { SettingTab } from '@abp/ng.theme.shared';\n\nexport class SetSelectedSettingTab {\n static readonly type = '[SettingManagement] Set Selected Tab';\n constructor(public payload: SettingTab) {}\n}\n","import { Action, Selector, State, StateContext } from '@ngxs/store';\nimport { SetSelectedSettingTab } from '../actions/setting-management.actions';\nimport { SettingManagement } from '../models/setting-management';\n\n@State<SettingManagement.State>({\n name: 'SettingManagementState',\n defaults: { selectedTab: {} } as SettingManagement.State,\n})\nexport class SettingManagementState {\n @Selector()\n static getSelectedTab({ selectedTab }: SettingManagement.State) {\n return selectedTab;\n }\n\n @Action(SetSelectedSettingTab)\n settingManagementAction({ patchState }: StateContext<SettingManagement.State>, { payload }: SetSelectedSettingTab) {\n patchState({\n selectedTab: payload,\n });\n }\n}\n","import { Component, TrackByFunction, OnInit } from '@angular/core';\nimport { SettingTab, getSettingTabs } from '@abp/ng.theme.shared';\nimport { Router } from '@angular/router';\nimport { Store } from '@ngxs/store';\nimport { ConfigState } from '@abp/ng.core';\nimport { SettingManagementState } from '../states/setting-management.state';\nimport { SetSelectedSettingTab } from '../actions/setting-management.actions';\nimport { RouterState } from '@ngxs/router-plugin';\n\n@Component({\n selector: 'abp-setting-management',\n templateUrl: './setting-management.component.html',\n})\nexport class SettingManagementComponent implements OnInit {\n settings: SettingTab[] = [];\n\n set selected(value: SettingTab) {\n this.store.dispatch(new SetSelectedSettingTab(value));\n }\n get selected(): SettingTab {\n const value = this.store.selectSnapshot(SettingManagementState.getSelectedTab);\n\n if ((!value || !value.component) && this.settings.length) {\n return this.settings[0];\n }\n\n return value;\n }\n\n trackByFn: TrackByFunction<SettingTab> = (_, item) => item.name;\n\n constructor(private router: Router, private store: Store) {}\n\n ngOnInit() {\n this.settings = getSettingTabs()\n .filter(setting => this.store.selectSnapshot(ConfigState.getGrantedPolicy(setting.requiredPolicy)))\n .sort((a, b) => a.order - b.order);\n\n if (!this.selected && this.settings.length) {\n this.selected = this.settings[0];\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { SettingManagementComponent } from './components/setting-management.component';\nimport { DynamicLayoutComponent } from '@abp/ng.core';\n\nconst routes: Routes = [\n {\n path: '',\n component: DynamicLayoutComponent,\n children: [{ path: '', component: SettingManagementComponent }],\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class SettingManagementRoutingModule {}\n","import { CoreModule } from '@abp/ng.core';\nimport { ThemeSharedModule } from '@abp/ng.theme.shared';\nimport { NgModule } from '@angular/core';\nimport { SettingManagementRoutingModule } from './setting-management-routing.module';\nimport { SettingManagementComponent } from './components/setting-management.component';\nimport { NgxsModule } from '@ngxs/store';\nimport { SettingManagementState } from './states/setting-management.state';\n\n@NgModule({\n declarations: [SettingManagementComponent],\n imports: [\n SettingManagementRoutingModule,\n CoreModule,\n ThemeSharedModule,\n NgxsModule.forFeature([SettingManagementState]),\n ],\n})\nexport class SettingManagementModule {}\n"],"names":["tslib_1.__decorate"],"mappings":";;;;;;;;;;;AAEA,MAAa,qBAAqB;;;;IAEhC,YAAmB,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;KAAI;;AAD1B,0BAAI,GAAG,sCAAsC,CAAC;;;IAA9D,2BAA8D;;IAClD,wCAA0B;;;;;;;ICI3B,sBAAsB,SAAtB,sBAAsB;;;;;IAEjC,OAAO,cAAc,CAAC,EAAE,WAAW,EAA2B;QAC5D,OAAO,WAAW,CAAC;KAC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