@yelon/bis 15.0.0-beta.2 → 15.0.0-beta.4

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.
Files changed (83) hide show
  1. package/esm2020/layout/bis.config.mjs +11 -0
  2. package/esm2020/layout/icon/style-icons.mjs +796 -0
  3. package/esm2020/layout/layout-basic/index.mjs +4 -0
  4. package/esm2020/layout/layout-basic/interface.mjs +7 -0
  5. package/esm2020/layout/layout-basic/layout-basic.component.mjs +320 -0
  6. package/esm2020/layout/layout-basic/layout-display.service.mjs +87 -0
  7. package/esm2020/layout/layout-nav/index.mjs +5 -0
  8. package/esm2020/layout/layout-nav/layout-nav-application.component.mjs +262 -0
  9. package/esm2020/{src → layout}/layout-nav/layout-nav-group.component.mjs +1 -1
  10. package/esm2020/{src → layout}/layout-nav/layout-nav-tile.component.mjs +1 -1
  11. package/esm2020/layout/layout-nav/types.mjs +7 -0
  12. package/esm2020/layout/layout.mjs +5 -0
  13. package/esm2020/layout/public_api.mjs +11 -0
  14. package/esm2020/layout/widgets/index.mjs +7 -0
  15. package/esm2020/{src → layout}/widgets/yunzai-clear-storage.component.mjs +1 -1
  16. package/esm2020/{src → layout}/widgets/yunzai-fullscreen.component.mjs +1 -1
  17. package/esm2020/{src → layout}/widgets/yunzai-i18n.component.mjs +1 -1
  18. package/esm2020/layout/widgets/yunzai-notify.component.mjs +183 -0
  19. package/esm2020/layout/widgets/yunzai-theme-btn.component.mjs +195 -0
  20. package/esm2020/{src → layout}/widgets/yunzai-user.component.mjs +1 -1
  21. package/esm2020/layout/yunzai-act.guard.mjs +107 -0
  22. package/esm2020/layout/yunzai-auth.service.mjs +153 -0
  23. package/esm2020/layout/yunzai-default.interceptor.mjs +207 -0
  24. package/esm2020/layout/yunzai-i18n.service.mjs +94 -0
  25. package/esm2020/layout/yunzai-layout.module.mjs +76 -0
  26. package/esm2020/layout/yunzai-startup.service.mjs +157 -0
  27. package/esm2020/public_api.mjs +2 -2
  28. package/fesm2015/bis.mjs +1 -2960
  29. package/fesm2015/bis.mjs.map +1 -1
  30. package/fesm2015/layout.mjs +2971 -0
  31. package/fesm2015/layout.mjs.map +1 -0
  32. package/fesm2020/bis.mjs +1 -2968
  33. package/fesm2020/bis.mjs.map +1 -1
  34. package/fesm2020/layout.mjs +2979 -0
  35. package/fesm2020/layout.mjs.map +1 -0
  36. package/{src → layout}/bis.config.d.ts +0 -0
  37. package/{src → layout}/icon/style-icons.d.ts +0 -0
  38. package/layout/index.d.ts +5 -0
  39. package/{src → layout}/layout-basic/index.d.ts +0 -0
  40. package/{src → layout}/layout-basic/interface.d.ts +0 -0
  41. package/{src → layout}/layout-basic/layout-basic.component.d.ts +4 -3
  42. package/{src → layout}/layout-basic/layout-display.service.d.ts +0 -0
  43. package/{src → layout}/layout-nav/index.d.ts +0 -0
  44. package/{src → layout}/layout-nav/layout-nav-application.component.d.ts +0 -0
  45. package/{src → layout}/layout-nav/layout-nav-group.component.d.ts +0 -0
  46. package/{src → layout}/layout-nav/layout-nav-tile.component.d.ts +0 -0
  47. package/{src → layout}/layout-nav/types.d.ts +0 -0
  48. package/{src/index.d.ts → layout/public_api.d.ts} +0 -1
  49. package/layout/style/index.less +154 -0
  50. package/{src → layout}/widgets/index.d.ts +0 -0
  51. package/{src → layout}/widgets/yunzai-clear-storage.component.d.ts +0 -0
  52. package/{src → layout}/widgets/yunzai-fullscreen.component.d.ts +0 -0
  53. package/{src → layout}/widgets/yunzai-i18n.component.d.ts +0 -0
  54. package/{src → layout}/widgets/yunzai-notify.component.d.ts +0 -0
  55. package/{src → layout}/widgets/yunzai-theme-btn.component.d.ts +0 -0
  56. package/{src → layout}/widgets/yunzai-user.component.d.ts +0 -0
  57. package/{src → layout}/yunzai-act.guard.d.ts +0 -0
  58. package/{src → layout}/yunzai-auth.service.d.ts +0 -0
  59. package/{src → layout}/yunzai-default.interceptor.d.ts +0 -0
  60. package/{src → layout}/yunzai-i18n.service.d.ts +1 -1
  61. package/{src → layout}/yunzai-layout.module.d.ts +1 -1
  62. package/{src → layout}/yunzai-startup.service.d.ts +0 -0
  63. package/package.json +19 -11
  64. package/public_api.d.ts +2 -1
  65. package/esm2020/src/bis.config.mjs +0 -11
  66. package/esm2020/src/icon/style-icons.mjs +0 -796
  67. package/esm2020/src/index.mjs +0 -12
  68. package/esm2020/src/layout-basic/index.mjs +0 -4
  69. package/esm2020/src/layout-basic/interface.mjs +0 -7
  70. package/esm2020/src/layout-basic/layout-basic.component.mjs +0 -312
  71. package/esm2020/src/layout-basic/layout-display.service.mjs +0 -87
  72. package/esm2020/src/layout-nav/index.mjs +0 -5
  73. package/esm2020/src/layout-nav/layout-nav-application.component.mjs +0 -262
  74. package/esm2020/src/layout-nav/types.mjs +0 -7
  75. package/esm2020/src/widgets/index.mjs +0 -7
  76. package/esm2020/src/widgets/yunzai-notify.component.mjs +0 -183
  77. package/esm2020/src/widgets/yunzai-theme-btn.component.mjs +0 -195
  78. package/esm2020/src/yunzai-act.guard.mjs +0 -107
  79. package/esm2020/src/yunzai-auth.service.mjs +0 -153
  80. package/esm2020/src/yunzai-default.interceptor.mjs +0 -207
  81. package/esm2020/src/yunzai-i18n.service.mjs +0 -94
  82. package/esm2020/src/yunzai-layout.module.mjs +0 -76
  83. package/esm2020/src/yunzai-startup.service.mjs +0 -157
@@ -0,0 +1,2971 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Component, ChangeDetectionStrategy, HostListener, Inject, Input, Optional, NgModule, APP_INITIALIZER } from '@angular/core';
3
+ import { BehaviorSubject, Subject, tap, forkJoin, map, takeUntil, of, mergeMap, mergeAll, throwError, filter, take, switchMap, catchError } from 'rxjs';
4
+ import * as i1$3 from '@yelon/util';
5
+ import { getUrlParam, resizeWindow, WINDOW, log as log$1, deepCopy, YunzaiConfigService } from '@yelon/util';
6
+ import * as i1$4 from '@yelon/cache';
7
+ import { CacheService } from '@yelon/cache';
8
+ import * as i3$3 from '@yelon/socket';
9
+ import * as i4$3 from '@angular/router';
10
+ import { Router, RouterModule } from '@angular/router';
11
+ import * as i4$1 from '@angular/common';
12
+ import { registerLocaleData, DOCUMENT, CommonModule } from '@angular/common';
13
+ import * as i6$1 from '@yelon/abc/reuse-tab';
14
+ import * as i7$2 from '@yelon/theme/layout-default';
15
+ import * as i3 from 'ng-zorro-antd/core/transition-patch';
16
+ import * as i6 from 'ng-zorro-antd/menu';
17
+ import * as i7 from 'ng-zorro-antd/dropdown';
18
+ import * as i8 from 'ng-zorro-antd/icon';
19
+ import * as i9 from 'ng-zorro-antd/avatar';
20
+ import * as i1 from 'ng-zorro-antd/modal';
21
+ import * as i1$1 from 'ng-zorro-antd/message';
22
+ import * as i1$2 from '@yelon/theme';
23
+ import { zh_CN as zh_CN$1, zh_TW as zh_TW$1, en_US as en_US$1, YunzaiI18nBaseService, YUNZAI_I18N_TOKEN, _HttpClient } from '@yelon/theme';
24
+ import screenfull from 'screenfull';
25
+ import { __decorate } from 'tslib';
26
+ import { InputBoolean } from '@yelon/util/decorator';
27
+ import ngEn from '@angular/common/locales/en';
28
+ import ngZh from '@angular/common/locales/zh';
29
+ import ngZhTw from '@angular/common/locales/zh-Hant';
30
+ import { zhCN, zhTW, enUS } from 'date-fns/locale';
31
+ import * as i2 from 'ng-zorro-antd/i18n';
32
+ import { zh_CN, zh_TW, en_US } from 'ng-zorro-antd/i18n';
33
+ import * as i3$1 from '@angular/cdk/platform';
34
+ import * as i4 from '@yelon/util/config';
35
+ import { YunzaiConfigService as YunzaiConfigService$1 } from '@yelon/util/config';
36
+ import { formatDistanceToNow } from 'date-fns';
37
+ import { log } from '@yelon/util/other';
38
+ import * as i4$2 from '@yelon/abc/notice-icon';
39
+ import { YUNZAI_THEME_BTN_KEYS } from '@yelon/theme/theme-btn';
40
+ import * as i3$2 from '@angular/cdk/bidi';
41
+ import * as i8$1 from 'ng-zorro-antd/tooltip';
42
+ import { YA_SERVICE_TOKEN, ALLOW_ANONYMOUS } from '@yelon/auth';
43
+ import * as i5 from '@angular/forms';
44
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
45
+ import * as i7$1 from 'ng-zorro-antd/grid';
46
+ import * as i9$1 from 'ng-zorro-antd/input';
47
+ import * as i8$2 from 'ng-zorro-antd/tabs';
48
+ import { HttpErrorResponse, HttpResponse, HttpResponseBase, HttpClientModule } from '@angular/common/http';
49
+ import { NzNotificationService } from 'ng-zorro-antd/notification';
50
+ import { YunzaiSharedYelonModule, YunzaiSharedZorroModule } from '@yelon/bcs';
51
+ import { AccountBookTwoTone, AccountBookFill, AccountBookOutline, AlertTwoTone, AlertFill, AlibabaOutline, AimOutline, AlipayCircleFill, AlertOutline, AlignCenterOutline, AlipayCircleOutline, AlipayOutline, AlignLeftOutline, AlignRightOutline, AmazonOutline, AliwangwangOutline, AliyunOutline, AlipaySquareFill, AmazonCircleFill, AndroidFill, AliwangwangFill, AntCloudOutline, AmazonSquareFill, AndroidOutline, ApartmentOutline, ApiTwoTone, ApiFill, ApiOutline, AntDesignOutline, AppstoreAddOutline, AppstoreFill, AppleOutline, AppstoreOutline, ArrowDownOutline, AppleFill, ArrowsAltOutline, AppstoreTwoTone, ArrowUpOutline, AreaChartOutline, ArrowLeftOutline, AudioFill, ArrowRightOutline, AudioTwoTone, AuditOutline, AudioMutedOutline, BackwardFill, AudioOutline, BackwardOutline, BankFill, BarcodeOutline, BellFill, BankTwoTone, BarsOutline, BankOutline, BehanceCircleFill, BehanceSquareFill, BoldOutline, BellOutline, BehanceOutline, BlockOutline, BehanceSquareOutline, BgColorsOutline, BellTwoTone, BarChartOutline, BookTwoTone, BookFill, BorderOuterOutline, BorderLeftOutline, BorderBottomOutline, BorderHorizontalOutline, BorderTopOutline, BorderOutline, BorderInnerOutline, BorderRightOutline, BoxPlotOutline, BoxPlotFill, BoxPlotTwoTone, BookOutline, BorderlessTableOutline, BorderVerticleOutline, BuildTwoTone, BuildOutline, BugFill, BugOutline, BugTwoTone, BulbFill, BulbTwoTone, BuildFill, BulbOutline, CalculatorFill, CalculatorTwoTone, CalendarFill, CalendarOutline, CalculatorOutline, CalendarTwoTone, CameraOutline, CameraFill, CameraTwoTone, CarTwoTone, CaretDownOutline, CarOutline, CaretLeftFill, CarFill, CaretRightOutline, CaretDownFill, CaretUpOutline, CaretRightFill, CarryOutFill, CarryOutOutline, CaretLeftOutline, CaretUpFill, BranchesOutline, CarryOutTwoTone, CheckCircleFill, CheckCircleOutline, CheckSquareOutline, CheckCircleTwoTone, CiCircleTwoTone, CheckOutline, CheckSquareTwoTone, CiOutline, CheckSquareFill, CiTwoTone, ChromeOutline, ClockCircleOutline, CiCircleOutline, ChromeFill, ClearOutline, CloseCircleTwoTone, CiCircleFill, CloseCircleOutline, ClockCircleFill, CloseCircleFill, ClockCircleTwoTone, CloseOutline, CloseSquareOutline, CloseSquareFill, CloudFill, CloseSquareTwoTone, CloudDownloadOutline, CloudTwoTone, CloudServerOutline, CloudUploadOutline, CloudSyncOutline, ClusterOutline, CodeSandboxCircleFill, CodeFill, CodepenCircleOutline, CloudOutline, CodeSandboxOutline, CodeOutline, CodeSandboxSquareFill, CodeTwoTone, CodepenSquareFill, CodepenOutline, CoffeeOutline, ColumnWidthOutline, CompressOutline, ColumnHeightOutline, CodepenCircleFill, CompassTwoTone, CommentOutline, ContainerFill, CompassOutline, ConsoleSqlOutline, ContactsOutline, ContainerTwoTone, ContactsFill, ContactsTwoTone, ContainerOutline, ControlFill, CopyFill, CopyOutline, CompassFill, CopyTwoTone, CopyrightOutline, CopyrightCircleOutline, ControlTwoTone, ControlOutline, CreditCardFill, CopyrightTwoTone, CrownFill, CopyrightCircleFill, CrownOutline, CustomerServiceTwoTone, CreditCardOutline, CustomerServiceOutline, DashboardTwoTone, CrownTwoTone, CreditCardTwoTone, CustomerServiceFill, DashboardFill, DashOutline, DatabaseOutline, DatabaseTwoTone, DatabaseFill, DashboardOutline, DeleteTwoTone, DeleteRowOutline, DeleteColumnOutline, DeliveredProcedureOutline, DeleteOutline, CopyrightCircleTwoTone, DesktopOutline, DeleteFill, DiffOutline, DiffFill, DeploymentUnitOutline, DiffTwoTone, DingtalkOutline, DollarCircleFill, DislikeFill, DingtalkSquareFill, DisconnectOutline, DollarCircleTwoTone, DollarOutline, DingtalkCircleFill, DislikeTwoTone, DollarTwoTone, DownCircleFill, DislikeOutline, DollarCircleOutline, DoubleLeftOutline, DownSquareFill, DownOutline, DownSquareOutline, DownSquareTwoTone, DownCircleTwoTone, DoubleRightOutline, DownCircleOutline, DownloadOutline, DotChartOutline, DribbbleCircleFill, DribbbleOutline, DribbbleSquareOutline, DropboxCircleFill, DingdingOutline, EditOutline, DribbbleSquareFill, DropboxSquareFill, EllipsisOutline, EnvironmentFill, EditFill, EnterOutline, EuroCircleFill, EuroTwoTone, EuroCircleOutline, EditTwoTone, EuroOutline, EnvironmentTwoTone, ExclamationCircleFill, ExpandAltOutline, EuroCircleTwoTone, ExclamationCircleTwoTone, EnvironmentOutline, ExperimentOutline, ExperimentFill, ExpandOutline, ExceptionOutline, ExportOutline, ExperimentTwoTone, ExclamationCircleOutline, ExclamationOutline, EyeFill, EyeInvisibleFill, EyeInvisibleTwoTone, DropboxOutline, DragOutline, FacebookOutline, FacebookFill, EyeTwoTone, EyeOutline, FastForwardFill, FieldBinaryOutline, FieldNumberOutline, FastBackwardOutline, FileAddFill, FastBackwardFill, FileExcelFill, FastForwardOutline, FieldStringOutline, FileDoneOutline, FileAddTwoTone, FileExcelTwoTone, FileExclamationFill, FileAddOutline, FileExclamationOutline, FieldTimeOutline, FileImageTwoTone, FileExcelOutline, FileExclamationTwoTone, FileImageFill, FileGifOutline, FileFill, FileMarkdownTwoTone, FileMarkdownOutline, FallOutline, FileImageOutline, EyeInvisibleOutline, FilePdfOutline, FileSearchOutline, FilePptTwoTone, FilePdfTwoTone, FileJpgOutline, FileTextFill, FilePptOutline, FileSyncOutline, FilePptFill, FileUnknownOutline, FileProtectOutline, FileTextTwoTone, FileWordFill, FileUnknownTwoTone, FileWordTwoTone, FileUnknownFill, FileTextOutline, FileZipFill, FilterTwoTone, FilterFill, FileWordOutline, FireOutline, FireTwoTone, FileZipOutline, FilterOutline, FlagTwoTone, FileTwoTone, FilePdfFill, FileOutline, FileMarkdownFill, FileZipTwoTone, FlagOutline, FolderAddTwoTone, FolderOpenFill, FireFill, FlagFill, FolderOutline, FolderViewOutline, FolderTwoTone, FontColorsOutline, FolderOpenTwoTone, FolderFill, ForwardOutline, FolderOpenOutline, ForkOutline, ForwardFill, FormatPainterOutline, FormatPainterFill, FormOutline, FrownFill, FrownTwoTone, FullscreenOutline, FontSizeOutline, FundFill, FunctionOutline, FundViewOutline, FullscreenExitOutline, GifOutline, FundProjectionScreenOutline, FundTwoTone, FolderAddFill, FunnelPlotTwoTone, GiftOutline, FunnelPlotFill, FundOutline, FrownOutline, GithubOutline, GoldFill, FolderAddOutline, GitlabFill, GiftFill, GitlabOutline, GoldTwoTone, GoogleCircleFill, GiftTwoTone, GooglePlusCircleFill, GoldOutline, GithubFill, GoogleOutline, GooglePlusOutline, GoogleSquareFill, GoldenFill, HddTwoTone, GooglePlusSquareFill, GlobalOutline, HeartOutline, HeartTwoTone, GroupOutline, HeartFill, HeatMapOutline, GatewayOutline, FunnelPlotOutline, HddFill, HomeFill, HighlightFill, HomeOutline, HistoryOutline, HighlightOutline, HddOutline, HourglassFill, HomeTwoTone, HourglassTwoTone, Html5Outline, Html5Fill, IdcardFill, Html5TwoTone, HourglassOutline, IdcardTwoTone, IdcardOutline, IeOutline, IeCircleFill, IeSquareFill, InboxOutline, ImportOutline, InfoCircleOutline, InfoCircleTwoTone, InsertRowAboveOutline, InsertRowRightOutline, InfoCircleFill, InfoOutline, InsertRowBelowOutline, HighlightTwoTone, InsuranceFill, InstagramFill, InteractionFill, InsertRowLeftOutline, InstagramOutline, InteractionOutline, ItalicOutline, InteractionTwoTone, LayoutOutline, IssuesCloseOutline, LayoutFill, LaptopOutline, LeftCircleFill, LayoutTwoTone, KeyOutline, LeftOutline, LeftCircleOutline, LeftSquareOutline, LeftSquareFill, LeftCircleTwoTone, LikeFill, LeftSquareTwoTone, LineOutline, LikeTwoTone, LinkedinOutline, LineChartOutline, LineHeightOutline, LinkedinFill, LinkOutline, LikeOutline, InsuranceOutline, Loading3QuartersOutline, LockFill, InsuranceTwoTone, MacCommandOutline, LockTwoTone, LoadingOutline, MailOutline, LoginOutline, MedicineBoxOutline, MailFill, MailTwoTone, MacCommandFill, ManOutline, MedicineBoxFill, MedicineBoxTwoTone, MediumCircleFill, MediumOutline, MehFill, MediumWorkmarkOutline, MenuFoldOutline, MehOutline, MediumSquareFill, MessageTwoTone, MehTwoTone, MergeCellsOutline, MinusCircleFill, MenuOutline, MenuUnfoldOutline, MessageFill, MinusCircleTwoTone, LockOutline, MinusOutline, MinusCircleOutline, LogoutOutline, MessageOutline, MoneyCollectFill, MinusSquareOutline, MinusSquareTwoTone, MobileOutline, MobileTwoTone, MoneyCollectOutline, MoreOutline, NotificationFill, NotificationOutline, MoneyCollectTwoTone, NodeIndexOutline, NodeExpandOutline, MonitorOutline, OrderedListOutline, NodeCollapseOutline, NumberOutline, PaperClipOutline, NotificationTwoTone, PauseCircleFill, PartitionOutline, PauseOutline, OneToOneOutline, PayCircleOutline, PayCircleFill, MinusSquareFill, PauseCircleOutline, PauseCircleTwoTone, PicCenterOutline, PicRightOutline, PercentageOutline, MobileFill, PictureOutline, PictureFill, PhoneTwoTone, PhoneFill, PieChartFill, PictureTwoTone, PieChartOutline, PlaySquareFill, PlayCircleTwoTone, PlayCircleFill, PlusCircleFill, PlaySquareTwoTone, PlaySquareOutline, PlayCircleOutline, PieChartTwoTone, PlusCircleOutline, PlusSquareFill, PoundCircleFill, PlusSquareOutline, PlusOutline, PoundOutline, PoundCircleOutline, PlusSquareTwoTone, PlusCircleTwoTone, PoweroffOutline, PoundCircleTwoTone, PhoneOutline, PrinterFill, PicLeftOutline, ProjectTwoTone, PrinterOutline, ProjectFill, ProfileOutline, ProfileTwoTone, ProjectOutline, PropertySafetyFill, PullRequestOutline, PropertySafetyOutline, PushpinOutline, PushpinTwoTone, PropertySafetyTwoTone, PushpinFill, QqOutline, QqCircleFill, QrcodeOutline, QqSquareFill, QuestionCircleTwoTone, QuestionCircleFill, RadarChartOutline, RadiusUprightOutline, QuestionCircleOutline, QuestionOutline, ReadFill, RadiusUpleftOutline, RadiusBottomleftOutline, RadiusSettingOutline, RadiusBottomrightOutline, ProfileFill, PrinterTwoTone, ReadOutline, ReconciliationFill, ReloadOutline, ReconciliationOutline, RedEnvelopeTwoTone, RedditCircleFill, RedoOutline, RedEnvelopeFill, RedditOutline, RestTwoTone, RightCircleOutline, RestOutline, RedditSquareFill, RestFill, RightCircleTwoTone, RightOutline, RightSquareFill, RightCircleFill, RightSquareOutline, RetweetOutline, RiseOutline, RightSquareTwoTone, RobotFill, RocketOutline, RobotOutline, RocketTwoTone, RocketFill, RedEnvelopeOutline, RollbackOutline, RotateRightOutline, RotateLeftOutline, ReconciliationTwoTone, SafetyCertificateTwoTone, SaveOutline, SafetyOutline, SaveFill, SaveTwoTone, ScheduleFill, SafetyCertificateOutline, ScanOutline, ScheduleTwoTone, SearchOutline, ScheduleOutline, SecurityScanTwoTone, SecurityScanOutline, ScissorOutline, SelectOutline, SecurityScanFill, SendOutline, SettingOutline, SettingTwoTone, SettingFill, ShareAltOutline, ShopOutline, ShopFill, ShopTwoTone, ShrinkOutline, ShakeOutline, ShoppingOutline, ShoppingCartOutline, ShoppingFill, SisternodeOutline, ShoppingTwoTone, SafetyCertificateFill, SkinOutline, SignalFill, SketchOutline, SkinTwoTone, SketchSquareFill, SkypeFill, SkinFill, SlackCircleFill, SlackSquareFill, SlidersTwoTone, SkypeOutline, SlidersFill, SlackSquareOutline, SmallDashOutline, SmileTwoTone, SlidersOutline, SnippetsFill, SnippetsOutline, SmileOutline, SolutionOutline, SlackOutline, SnippetsTwoTone, SoundTwoTone, SortAscendingOutline, SoundFill, SortDescendingOutline, SmileFill, SoundOutline, SplitCellsOutline, SketchCircleFill, StarOutline, StockOutline, StarTwoTone, StepForwardFill, StarFill, StepBackwardFill, StepForwardOutline, StopFill, SubnodeOutline, SwapLeftOutline, StopOutline, StopTwoTone, SwapRightOutline, SwapOutline, SwitcherTwoTone, SwitcherOutline, SyncOutline, StrikethroughOutline, SwitcherFill, TagOutline, TabletTwoTone, TabletOutline, TabletFill, TableOutline, TagsFill, TagFill, TagsTwoTone, TaobaoCircleOutline, StepBackwardOutline, TagsOutline, TagTwoTone, TaobaoOutline, ThunderboltOutline, TaobaoSquareFill, TeamOutline, TaobaoCircleFill, ThunderboltTwoTone, ToolFill, ThunderboltFill, ToTopOutline, ToolOutline, ToolTwoTone, TrademarkCircleFill, TrophyFill, TrademarkCircleTwoTone, TransactionOutline, TrademarkCircleOutline, TranslationOutline, TwitterCircleFill, TrophyOutline, TrademarkOutline, TrophyTwoTone, TwitterSquareFill, UnlockFill, TwitterOutline, UnderlineOutline, UndoOutline, UpCircleFill, UngroupOutline, UnlockTwoTone, UnlockOutline, UpOutline, UsbFill, UpCircleOutline, UnorderedListOutline, UpCircleTwoTone, UpSquareFill, UpSquareOutline, UserAddOutline, UsbTwoTone, UsergroupDeleteOutline, UpSquareTwoTone, UserOutline, UsbOutline, UserDeleteOutline, UserSwitchOutline, VerticalLeftOutline, VerticalAlignBottomOutline, VerifiedOutline, UsergroupAddOutline, UploadOutline, VerticalAlignMiddleOutline, VerticalAlignTopOutline, VerticalRightOutline, VideoCameraOutline, VideoCameraAddOutline, VideoCameraTwoTone, VideoCameraFill, WalletOutline, WalletFill, WarningFill, WarningOutline, WechatOutline, WalletTwoTone, WeiboCircleFill, WarningTwoTone, WeiboSquareFill, WeiboOutline, WeiboSquareOutline, WeiboCircleOutline, WechatFill, WhatsAppOutline, WifiOutline, WomanOutline, YoutubeFill, YahooOutline, WindowsFill, WindowsOutline, YoutubeOutline, YuqueOutline, ZhihuCircleFill, YuqueFill, ZhihuOutline, ZhihuSquareFill, ZoomInOutline, ZoomOutOutline, YahooFill } from '@ant-design/icons-angular/icons';
52
+ import * as i3$4 from '@yelon/acl';
53
+
54
+ var NavType;
55
+ (function (NavType) {
56
+ NavType["APPLICATION"] = "application";
57
+ NavType["GROUP"] = "group";
58
+ NavType["TILE"] = "tile";
59
+ })(NavType || (NavType = {}));
60
+
61
+ class LayoutDisplayService {
62
+ constructor() {
63
+ this.displayNav = new BehaviorSubject(true);
64
+ this.displayAside = new BehaviorSubject(true);
65
+ this.displayReuseTab = new BehaviorSubject(true);
66
+ this.destroy$ = new Subject();
67
+ if (getUrlParam(window.location.href, 'displayNav') !== null) {
68
+ this.hide('nav');
69
+ }
70
+ else {
71
+ this.display('nav');
72
+ }
73
+ if (getUrlParam(window.location.href, 'displayAside') !== null) {
74
+ this.hide('aside');
75
+ }
76
+ else {
77
+ this.display('aside');
78
+ }
79
+ if (getUrlParam(window.location.href, 'displayReuseTab') !== null) {
80
+ this.hide('reuseTab');
81
+ }
82
+ else {
83
+ this.display('reuseTab');
84
+ }
85
+ }
86
+ display(component) {
87
+ switch (component) {
88
+ case 'nav':
89
+ this.displayNav.next(true);
90
+ break;
91
+ case 'aside':
92
+ this.displayAside.next(true);
93
+ break;
94
+ case 'reuseTab':
95
+ this.displayReuseTab.next(true);
96
+ break;
97
+ }
98
+ resizeWindow();
99
+ }
100
+ hide(component) {
101
+ switch (component) {
102
+ case 'nav':
103
+ this.displayNav.next(false);
104
+ break;
105
+ case 'aside':
106
+ this.displayAside.next(false);
107
+ break;
108
+ case 'reuseTab':
109
+ this.displayReuseTab.next(false);
110
+ break;
111
+ }
112
+ resizeWindow();
113
+ }
114
+ listen(component, callback) {
115
+ this.displayNav.pipe(tap(this.destroy$)).subscribe(display => {
116
+ if (component === 'nav') {
117
+ callback(display);
118
+ }
119
+ });
120
+ this.displayAside.pipe(tap(this.destroy$)).subscribe(display => {
121
+ if (component === 'aside') {
122
+ callback(display);
123
+ }
124
+ });
125
+ this.displayReuseTab.pipe(tap(this.destroy$)).subscribe(display => {
126
+ if (component === 'reuseTab') {
127
+ callback(display);
128
+ }
129
+ });
130
+ }
131
+ ngOnDestroy() {
132
+ this.destroy$.complete();
133
+ }
134
+ }
135
+ LayoutDisplayService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LayoutDisplayService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
136
+ LayoutDisplayService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LayoutDisplayService, providedIn: 'root' });
137
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LayoutDisplayService, decorators: [{
138
+ type: Injectable,
139
+ args: [{
140
+ providedIn: 'root'
141
+ }]
142
+ }], ctorParameters: function () { return []; } });
143
+
144
+ class YunzaiClearStorageComponent {
145
+ constructor(modalSrv, messageSrv) {
146
+ this.modalSrv = modalSrv;
147
+ this.messageSrv = messageSrv;
148
+ }
149
+ _click() {
150
+ this.modalSrv.confirm({
151
+ nzTitle: 'Make sure clear all local storage?',
152
+ nzOnOk: () => {
153
+ localStorage.clear();
154
+ this.messageSrv.success('Clear Finished!');
155
+ }
156
+ });
157
+ }
158
+ }
159
+ YunzaiClearStorageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiClearStorageComponent, deps: [{ token: i1.NzModalService }, { token: i1$1.NzMessageService }], target: i0.ɵɵFactoryTarget.Component });
160
+ YunzaiClearStorageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: YunzaiClearStorageComponent, selector: "yunzai-clearstorage", host: { listeners: { "click": "_click()" }, properties: { "class.d-block": "true" } }, ngImport: i0, template: `
161
+ <i nz-icon nzType="tool"></i>
162
+ {{ 'menu.clear.local.storage' | i18n }}
163
+ `, isInline: true, dependencies: [{ kind: "directive", type: i3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "pipe", type: i1$2.I18nPipe, name: "i18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiClearStorageComponent, decorators: [{
165
+ type: Component,
166
+ args: [{
167
+ selector: 'yunzai-clearstorage',
168
+ template: `
169
+ <i nz-icon nzType="tool"></i>
170
+ {{ 'menu.clear.local.storage' | i18n }}
171
+ `,
172
+ host: {
173
+ '[class.d-block]': 'true'
174
+ },
175
+ changeDetection: ChangeDetectionStrategy.OnPush
176
+ }]
177
+ }], ctorParameters: function () { return [{ type: i1.NzModalService }, { type: i1$1.NzMessageService }]; }, propDecorators: { _click: [{
178
+ type: HostListener,
179
+ args: ['click']
180
+ }] } });
181
+
182
+ class YunzaiFullScreenComponent {
183
+ constructor() {
184
+ this.status = false;
185
+ }
186
+ _resize() {
187
+ this.status = screenfull.isFullscreen;
188
+ }
189
+ _click() {
190
+ if (screenfull.isEnabled) {
191
+ screenfull.toggle();
192
+ }
193
+ }
194
+ }
195
+ YunzaiFullScreenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiFullScreenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
196
+ YunzaiFullScreenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: YunzaiFullScreenComponent, selector: "yunzai-fullscreen", host: { listeners: { "window:resize": "_resize()", "click": "_click()" }, properties: { "class.d-block": "true" } }, ngImport: i0, template: `
197
+ <i nz-icon [nzType]="status ? 'fullscreen-exit' : 'fullscreen'"></i>
198
+ {{ (status ? 'menu.fullscreen.exit' : 'menu.fullscreen') | i18n }}
199
+ `, isInline: true, dependencies: [{ kind: "directive", type: i3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "pipe", type: i1$2.I18nPipe, name: "i18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
200
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiFullScreenComponent, decorators: [{
201
+ type: Component,
202
+ args: [{
203
+ selector: 'yunzai-fullscreen',
204
+ template: `
205
+ <i nz-icon [nzType]="status ? 'fullscreen-exit' : 'fullscreen'"></i>
206
+ {{ (status ? 'menu.fullscreen.exit' : 'menu.fullscreen') | i18n }}
207
+ `,
208
+ host: {
209
+ '[class.d-block]': 'true'
210
+ },
211
+ changeDetection: ChangeDetectionStrategy.OnPush
212
+ }]
213
+ }], propDecorators: { _resize: [{
214
+ type: HostListener,
215
+ args: ['window:resize']
216
+ }], _click: [{
217
+ type: HostListener,
218
+ args: ['click']
219
+ }] } });
220
+
221
+ const DEFAULT = 'zh-CN';
222
+ const LANGS = {
223
+ 'zh-CN': {
224
+ text: '简体中文',
225
+ ng: ngZh,
226
+ zorro: zh_CN,
227
+ date: zhCN,
228
+ yelon: zh_CN$1,
229
+ abbr: '🇨🇳'
230
+ },
231
+ 'zh-TW': {
232
+ text: '繁体中文',
233
+ ng: ngZhTw,
234
+ zorro: zh_TW,
235
+ date: zhTW,
236
+ yelon: zh_TW$1,
237
+ abbr: '🇭🇰'
238
+ },
239
+ 'en-US': {
240
+ text: 'English',
241
+ ng: ngEn,
242
+ zorro: en_US,
243
+ date: enUS,
244
+ yelon: en_US$1,
245
+ abbr: '🇬🇧'
246
+ }
247
+ };
248
+ class YunzaiI18NService extends YunzaiI18nBaseService {
249
+ constructor(http, settings, nzI18nService, yelonLocaleService, platform, cogSrv) {
250
+ super(cogSrv);
251
+ this.http = http;
252
+ this.settings = settings;
253
+ this.nzI18nService = nzI18nService;
254
+ this.yelonLocaleService = yelonLocaleService;
255
+ this.platform = platform;
256
+ this._defaultLang = DEFAULT;
257
+ this._langs = Object.keys(LANGS).map(code => {
258
+ const item = LANGS[code];
259
+ return { code, text: item.text, abbr: item.abbr };
260
+ });
261
+ const defaultLang = this.getDefaultLang();
262
+ this._defaultLang = this._langs.findIndex(w => w.code === defaultLang) === -1 ? DEFAULT : defaultLang;
263
+ }
264
+ getDefaultLang() {
265
+ if (!this.platform.isBrowser) {
266
+ return DEFAULT;
267
+ }
268
+ if (this.settings.layout.lang) {
269
+ return this.settings.layout.lang;
270
+ }
271
+ let res = (navigator.languages ? navigator.languages[0] : null) || navigator.language;
272
+ const arr = res.split('-');
273
+ return arr.length <= 1 ? res : `${arr[0]}-${arr[1].toUpperCase()}`;
274
+ }
275
+ loadLangData(lang) {
276
+ return this.http.get(`assets/tmp/i18n/${lang}.json`);
277
+ }
278
+ use(lang, data) {
279
+ if (this._currentLang === lang)
280
+ return;
281
+ this._data = this.flatData(data, []);
282
+ const item = LANGS[lang];
283
+ registerLocaleData(item.ng);
284
+ this.nzI18nService.setLocale(item.zorro);
285
+ this.nzI18nService.setDateLocale(item.date);
286
+ this.yelonLocaleService.setLocale(item.yelon);
287
+ this._currentLang = lang;
288
+ this._change$.next(lang);
289
+ }
290
+ getLangs() {
291
+ return this._langs;
292
+ }
293
+ }
294
+ YunzaiI18NService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiI18NService, deps: [{ token: i1$2._HttpClient }, { token: i1$2.SettingsService }, { token: i2.NzI18nService }, { token: i1$2.YelonLocaleService }, { token: i3$1.Platform }, { token: i4.YunzaiConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
295
+ YunzaiI18NService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiI18NService, providedIn: 'root' });
296
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiI18NService, decorators: [{
297
+ type: Injectable,
298
+ args: [{ providedIn: 'root' }]
299
+ }], ctorParameters: function () { return [{ type: i1$2._HttpClient }, { type: i1$2.SettingsService }, { type: i2.NzI18nService }, { type: i1$2.YelonLocaleService }, { type: i3$1.Platform }, { type: i4.YunzaiConfigService }]; } });
300
+
301
+ class YunzaiI18NComponent {
302
+ get langs() {
303
+ return this.i18n.getLangs();
304
+ }
305
+ get curLangCode() {
306
+ return this.settings.layout.lang;
307
+ }
308
+ constructor(settings, i18n, doc) {
309
+ this.settings = settings;
310
+ this.i18n = i18n;
311
+ this.doc = doc;
312
+ /** Whether to display language text */
313
+ this.showLangText = true;
314
+ }
315
+ change(lang) {
316
+ const spinEl = this.doc.createElement('div');
317
+ spinEl.setAttribute('class', `page-loading ant-spin ant-spin-lg ant-spin-spinning`);
318
+ spinEl.innerHTML = `<span class="ant-spin-dot ant-spin-dot-spin"><i></i><i></i><i></i><i></i></span>`;
319
+ this.doc.body.appendChild(spinEl);
320
+ this.i18n.loadLangData(lang).subscribe(res => {
321
+ this.i18n.use(lang, res);
322
+ this.settings.setLayout('lang', lang);
323
+ setTimeout(() => this.doc.location.reload());
324
+ });
325
+ }
326
+ }
327
+ YunzaiI18NComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiI18NComponent, deps: [{ token: i1$2.SettingsService }, { token: YUNZAI_I18N_TOKEN }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
328
+ YunzaiI18NComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: YunzaiI18NComponent, selector: "yunzai-i18n", inputs: { showLangText: "showLangText" }, ngImport: i0, template: `
329
+ <div *ngIf="showLangText" nz-dropdown [nzDropdownMenu]="langMenu" nzPlacement="bottomRight">
330
+ <i nz-icon nzType="global"></i>
331
+ {{ 'menu.lang' | i18n }}
332
+ <i nz-icon nzType="down"></i>
333
+ </div>
334
+ <i
335
+ *ngIf="!showLangText"
336
+ nz-dropdown
337
+ [nzDropdownMenu]="langMenu"
338
+ nzPlacement="bottomRight"
339
+ nz-icon
340
+ nzType="global"
341
+ ></i>
342
+ <nz-dropdown-menu #langMenu="nzDropdownMenu">
343
+ <ul nz-menu>
344
+ <li
345
+ nz-menu-item
346
+ *ngFor="let item of langs"
347
+ [nzSelected]="item.code === curLangCode"
348
+ (click)="change(item.code)"
349
+ >
350
+ <span role="img" [attr.aria-label]="item.text" class="pr-xs">{{ item.abbr }}</span>
351
+ {{ item.text }}
352
+ </li>
353
+ </ul>
354
+ </nz-dropdown-menu>
355
+ `, isInline: true, dependencies: [{ kind: "directive", type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i6.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "directive", type: i6.NzMenuItemDirective, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i7.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "component", type: i7.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "directive", type: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "pipe", type: i1$2.I18nPipe, name: "i18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
356
+ __decorate([
357
+ InputBoolean()
358
+ ], YunzaiI18NComponent.prototype, "showLangText", void 0);
359
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiI18NComponent, decorators: [{
360
+ type: Component,
361
+ args: [{
362
+ selector: 'yunzai-i18n',
363
+ template: `
364
+ <div *ngIf="showLangText" nz-dropdown [nzDropdownMenu]="langMenu" nzPlacement="bottomRight">
365
+ <i nz-icon nzType="global"></i>
366
+ {{ 'menu.lang' | i18n }}
367
+ <i nz-icon nzType="down"></i>
368
+ </div>
369
+ <i
370
+ *ngIf="!showLangText"
371
+ nz-dropdown
372
+ [nzDropdownMenu]="langMenu"
373
+ nzPlacement="bottomRight"
374
+ nz-icon
375
+ nzType="global"
376
+ ></i>
377
+ <nz-dropdown-menu #langMenu="nzDropdownMenu">
378
+ <ul nz-menu>
379
+ <li
380
+ nz-menu-item
381
+ *ngFor="let item of langs"
382
+ [nzSelected]="item.code === curLangCode"
383
+ (click)="change(item.code)"
384
+ >
385
+ <span role="img" [attr.aria-label]="item.text" class="pr-xs">{{ item.abbr }}</span>
386
+ {{ item.text }}
387
+ </li>
388
+ </ul>
389
+ </nz-dropdown-menu>
390
+ `,
391
+ changeDetection: ChangeDetectionStrategy.OnPush
392
+ }]
393
+ }], ctorParameters: function () {
394
+ return [{ type: i1$2.SettingsService }, { type: YunzaiI18NService, decorators: [{
395
+ type: Inject,
396
+ args: [YUNZAI_I18N_TOKEN]
397
+ }] }, { type: undefined, decorators: [{
398
+ type: Inject,
399
+ args: [DOCUMENT]
400
+ }] }];
401
+ }, propDecorators: { showLangText: [{
402
+ type: Input
403
+ }] } });
404
+
405
+ class YunzaiNotifyComponent {
406
+ constructor(injector, msg, y18n, nzI18n, cdr, httpClient) {
407
+ this.injector = injector;
408
+ this.msg = msg;
409
+ this.y18n = y18n;
410
+ this.nzI18n = nzI18n;
411
+ this.cdr = cdr;
412
+ this.httpClient = httpClient;
413
+ this.data = [
414
+ {
415
+ key: 'msg',
416
+ title: this.y18n.fanyi('notify.message'),
417
+ list: [],
418
+ emptyText: this.y18n.fanyi('notify.message.emptyText'),
419
+ emptyImage: './assets/tmp/img/message.svg',
420
+ clearText: this.y18n.fanyi('notify.message.clearText')
421
+ },
422
+ {
423
+ key: 'todo',
424
+ title: this.y18n.fanyi('notify.todo'),
425
+ list: [],
426
+ emptyText: this.y18n.fanyi('notify.todo.emptyText'),
427
+ emptyImage: './assets/tmp/img/todo.svg',
428
+ clearText: this.y18n.fanyi('notify.todo.clearText')
429
+ },
430
+ {
431
+ key: 'notice',
432
+ title: this.y18n.fanyi('notify.notice'),
433
+ list: [],
434
+ emptyText: this.y18n.fanyi('notify.notice.emptyText'),
435
+ emptyImage: './assets/tmp/img/notice.svg',
436
+ clearText: this.y18n.fanyi('notify.notice.clearText')
437
+ }
438
+ ];
439
+ this.loading = false;
440
+ this.count = 0;
441
+ this.subs = [];
442
+ }
443
+ ngOnInit() {
444
+ this.loadData();
445
+ }
446
+ loadData() {
447
+ this.count = 0;
448
+ this.loading = true;
449
+ this.subs.push(forkJoin(this.loadTodo(), this.loadMessage()).subscribe(() => {
450
+ this.loading = false;
451
+ this.cdr.detectChanges();
452
+ }));
453
+ }
454
+ loadMessage() {
455
+ log('notify.component: ', 'fetch message list');
456
+ const formatMessageStatus = (status) => {
457
+ switch (status) {
458
+ case '0':
459
+ return { extra: this.y18n.fanyi('notify.unread'), color: 'red' };
460
+ case '1':
461
+ return { extra: this.y18n.fanyi('notify.readed'), color: 'green' };
462
+ default:
463
+ return { extra: this.y18n.fanyi('notify.nostatus'), color: 'primary' };
464
+ }
465
+ };
466
+ return this.httpClient
467
+ .post(`/message-center-3/my-msg-and-todo/msg-list`, {
468
+ pageNum: 1,
469
+ pageSize: 10,
470
+ status: '0'
471
+ })
472
+ .pipe(map((response) => {
473
+ const viewMessage = this.data.filter(d => d.key === 'msg')[0];
474
+ viewMessage.list = response.data.list.map((m) => {
475
+ return Object.assign(Object.assign({}, m), { avatar: (m === null || m === void 0 ? void 0 : m.imgUrl) || './assets/tmp/img/message.png', title: m.systemName, description: m.content, extra: formatMessageStatus(m.status).extra, color: formatMessageStatus(m.status).color, datetime: formatDistanceToNow(new Date(m.date), { locale: this.nzI18n.getDateLocale() }) });
476
+ });
477
+ this.count += viewMessage.list.length;
478
+ }));
479
+ }
480
+ loadTodo() {
481
+ log('notify.component: ', 'fetch todo list');
482
+ const formatTodoStatus = (status) => {
483
+ switch (status) {
484
+ case '0':
485
+ return { extra: this.y18n.fanyi('notify.unstart'), color: 'red' };
486
+ case '1':
487
+ return { extra: this.y18n.fanyi('notify.started'), color: 'green' };
488
+ default:
489
+ return { extra: this.y18n.fanyi('notify.nostatus'), color: 'primary' };
490
+ }
491
+ };
492
+ return this.httpClient
493
+ .post(`/message-center-3/my-msg-and-todo/todo-list`, {
494
+ pageNum: 1,
495
+ pageSize: 10,
496
+ status: '0'
497
+ })
498
+ .pipe(map((response) => {
499
+ const viewTodo = this.data.filter(d => d.key === 'todo')[0];
500
+ viewTodo.list = response.data.list.map((t) => {
501
+ return Object.assign(Object.assign({}, t), { avatar: (t === null || t === void 0 ? void 0 : t.imgUrl) || './assets/tmp/img/todo.png', title: t.systemName, description: t.content, datetime: formatDistanceToNow(new Date(t.date), { locale: this.nzI18n.getDateLocale() }), extra: formatTodoStatus(t.status).extra, color: formatTodoStatus(t.status).color });
502
+ });
503
+ this.count += viewTodo.list.length;
504
+ }));
505
+ }
506
+ clear(type) {
507
+ const t = this.data.filter(d => d.title === type)[0];
508
+ if (t.key == 'msg' || t.key == 'notice') {
509
+ this.subs.push(this.httpClient.post(`/message-center-3/my-msg-and-todo/msg-clear`, {}).subscribe(_ => {
510
+ this.msg.success(`${this.y18n.fanyi('notify.clear')} ${type}`);
511
+ this.loadData();
512
+ }));
513
+ }
514
+ if (t.key == 'todo') {
515
+ this.loadData();
516
+ }
517
+ }
518
+ select(res) {
519
+ this.injector.get(WINDOW).open(res.item.url);
520
+ this.loadData();
521
+ }
522
+ ngOnDestroy() {
523
+ this.subs.forEach(a => a.unsubscribe());
524
+ }
525
+ }
526
+ YunzaiNotifyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiNotifyComponent, deps: [{ token: i0.Injector }, { token: i1$1.NzMessageService }, { token: YUNZAI_I18N_TOKEN }, { token: i2.NzI18nService }, { token: i0.ChangeDetectorRef }, { token: i1$2._HttpClient }], target: i0.ɵɵFactoryTarget.Component });
527
+ YunzaiNotifyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: YunzaiNotifyComponent, selector: "yunzai-notify", ngImport: i0, template: `
528
+ <notice-icon
529
+ [data]="data"
530
+ [count]="count"
531
+ [loading]="loading"
532
+ btnClass="yunzai-default__nav-item"
533
+ btnIconClass="yunzai-default__nav-item-icon"
534
+ (select)="select($event)"
535
+ (clear)="clear($event)"
536
+ ></notice-icon>
537
+ `, isInline: true, dependencies: [{ kind: "component", type: i4$2.NoticeIconComponent, selector: "notice-icon", inputs: ["data", "count", "loading", "popoverVisible", "btnClass", "btnIconClass", "centered"], outputs: ["select", "clear", "popoverVisibleChange"], exportAs: ["noticeIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
538
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiNotifyComponent, decorators: [{
539
+ type: Component,
540
+ args: [{
541
+ selector: 'yunzai-notify',
542
+ template: `
543
+ <notice-icon
544
+ [data]="data"
545
+ [count]="count"
546
+ [loading]="loading"
547
+ btnClass="yunzai-default__nav-item"
548
+ btnIconClass="yunzai-default__nav-item-icon"
549
+ (select)="select($event)"
550
+ (clear)="clear($event)"
551
+ ></notice-icon>
552
+ `,
553
+ changeDetection: ChangeDetectionStrategy.OnPush
554
+ }]
555
+ }], ctorParameters: function () {
556
+ return [{ type: i0.Injector }, { type: i1$1.NzMessageService }, { type: YunzaiI18NService, decorators: [{
557
+ type: Inject,
558
+ args: [YUNZAI_I18N_TOKEN]
559
+ }] }, { type: i2.NzI18nService }, { type: i0.ChangeDetectorRef }, { type: i1$2._HttpClient }];
560
+ } });
561
+
562
+ class YunzaiThemBtnComponent {
563
+ constructor(renderer, configSrv, platform, doc, directionality, KEYS) {
564
+ this.renderer = renderer;
565
+ this.configSrv = configSrv;
566
+ this.platform = platform;
567
+ this.doc = doc;
568
+ this.directionality = directionality;
569
+ this.KEYS = KEYS;
570
+ this.theme = 'default';
571
+ this.types = [
572
+ { key: 'default', text: 'theme.default', color: '#2163ff' },
573
+ { key: 'compact', text: 'theme.compact', color: '#2163ff' },
574
+ { key: 'dark', text: 'theme.dark', color: '#020202' },
575
+ { key: 'yuhong', text: 'theme.yuhong', color: '#C04851' },
576
+ { key: 'danjuhuang', text: 'theme.danjuhuang', color: '#FBA414' },
577
+ { key: 'xinghuang', text: 'theme.xinghuang', color: '#F28E16' },
578
+ { key: 'shilv', text: 'theme.shilv', color: '#57C3C2' },
579
+ { key: 'zhulv', text: 'theme.zhulv', color: '#1BA784' },
580
+ { key: 'youlan', text: 'theme.youlan', color: '#1781B5' },
581
+ { key: 'dianqing', text: 'theme.dianqing', color: '#1661AB' },
582
+ { key: 'shangengzi', text: 'theme.shangengzi', color: '#61649F' },
583
+ { key: 'shuiniuhui', text: 'theme.shuiniuhui', color: '#2F2F35' }
584
+ ];
585
+ this.devTips = `When the dark.css file can't be found, you need to run it once: npm run theme`;
586
+ this.deployUrl = '';
587
+ this.destroy$ = new Subject();
588
+ this.dir = 'ltr';
589
+ }
590
+ ngOnInit() {
591
+ var _a;
592
+ this.dir = this.directionality.value;
593
+ (_a = this.directionality.change) === null || _a === void 0 ? void 0 : _a.pipe(takeUntil(this.destroy$)).subscribe((direction) => {
594
+ this.dir = direction;
595
+ });
596
+ this.initTheme();
597
+ }
598
+ initTheme() {
599
+ if (!this.platform.isBrowser) {
600
+ return;
601
+ }
602
+ this.theme = localStorage.getItem(this.KEYS) || 'default';
603
+ this.updateChartTheme();
604
+ this.onThemeChange(this.theme);
605
+ }
606
+ updateChartTheme() {
607
+ this.configSrv.set('chart', { theme: this.theme === 'dark' ? 'dark' : '' });
608
+ }
609
+ onThemeChange(theme) {
610
+ if (!this.platform.isBrowser) {
611
+ return;
612
+ }
613
+ this.theme = theme;
614
+ this.renderer.setAttribute(this.doc.body, 'data-theme', theme);
615
+ const dom = this.doc.getElementById(this.KEYS);
616
+ if (dom) {
617
+ dom.remove();
618
+ }
619
+ localStorage.removeItem(this.KEYS);
620
+ if (theme !== 'default') {
621
+ const el = this.doc.createElement('link');
622
+ el.type = 'text/css';
623
+ el.rel = 'stylesheet';
624
+ el.id = this.KEYS;
625
+ el.href = `${this.deployUrl}assets/style.${theme}.css`;
626
+ localStorage.setItem(this.KEYS, theme);
627
+ this.doc.body.append(el);
628
+ }
629
+ this.updateChartTheme();
630
+ }
631
+ ngOnDestroy() {
632
+ const el = this.doc.getElementById(this.KEYS);
633
+ if (el != null) {
634
+ this.doc.body.removeChild(el);
635
+ }
636
+ this.destroy$.next();
637
+ this.destroy$.complete();
638
+ }
639
+ }
640
+ YunzaiThemBtnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiThemBtnComponent, deps: [{ token: i0.Renderer2 }, { token: i4.YunzaiConfigService }, { token: i3$1.Platform }, { token: DOCUMENT }, { token: i3$2.Directionality, optional: true }, { token: YUNZAI_THEME_BTN_KEYS }], target: i0.ɵɵFactoryTarget.Component });
641
+ YunzaiThemBtnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: YunzaiThemBtnComponent, selector: "yunzai-theme-btn", inputs: { types: "types", devTips: "devTips", deployUrl: "deployUrl" }, ngImport: i0, template: `
642
+ <div
643
+ class="yunzai-default__nav-item"
644
+ nz-dropdown
645
+ [nzDropdownMenu]="iconMenu"
646
+ nzTrigger="click"
647
+ nzPlacement="bottomRight"
648
+ >
649
+ <svg nz-tooltip class="anticon" role="img" width="21" height="21" viewBox="0 0 21 21" fill="currentColor">
650
+ <g fill-rule="evenodd">
651
+ <g fill-rule="nonzero">
652
+ <path
653
+ d="M7.02 3.635l12.518 12.518a1.863 1.863 0 010 2.635l-1.317 1.318a1.863 1.863 0 01-2.635 0L3.068 7.588A2.795 2.795 0 117.02 3.635zm2.09 14.428a.932.932 0 110 1.864.932.932 0 010-1.864zm-.043-9.747L7.75 9.635l9.154 9.153 1.318-1.317-9.154-9.155zM3.52 12.473c.514 0 .931.417.931.931v.932h.932a.932.932 0 110 1.864h-.932v.931a.932.932 0 01-1.863 0l-.001-.931h-.93a.932.932 0 010-1.864h.93v-.932c0-.514.418-.931.933-.931zm15.374-3.727a1.398 1.398 0 110 2.795 1.398 1.398 0 010-2.795zM4.385 4.953a.932.932 0 000 1.317l2.046 2.047L7.75 7 5.703 4.953a.932.932 0 00-1.318 0zM14.701.36a.932.932 0 01.931.932v.931h.932a.932.932 0 010 1.864h-.933l.001.932a.932.932 0 11-1.863 0l-.001-.932h-.93a.932.932 0 110-1.864h.93v-.931a.932.932 0 01.933-.932z"
654
+ ></path>
655
+ </g>
656
+ </g>
657
+ </svg>
658
+ </div>
659
+ <nz-dropdown-menu #iconMenu="nzDropdownMenu">
660
+ <ul nz-menu>
661
+ <li
662
+ nz-menu-item
663
+ *ngFor="let theme of types"
664
+ (click)="onThemeChange(theme.key)"
665
+ [style]="{ color: theme.color }"
666
+ >
667
+ <i nz-icon nzType="bg-colors"></i>
668
+ {{ theme.text | i18n }}
669
+ </li>
670
+ </ul>
671
+ <!-- <div nz-menu class="wd-xl animated jello">-->
672
+ <!-- <div nz-row [nzJustify]="'space-between'" [nzAlign]="'middle'" class="app-icons">-->
673
+ <!-- <div nz-col [nzSpan]="4" *ngFor="let theme of types" (click)="onThemeChange(theme.key)">-->
674
+ <!-- <i nz-icon nzType="bg-colors" class="text-white" [style]="{ backgroundColor: theme.color }"></i>-->
675
+ <!-- <span [ngStyle]="{ color: theme.color }">{{ theme.text | i18n }}</span>-->
676
+ <!-- </div>-->
677
+ <!-- </div>-->
678
+ <!-- </div>-->
679
+ </nz-dropdown-menu>
680
+ `, isInline: true, dependencies: [{ kind: "directive", type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i6.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "directive", type: i6.NzMenuItemDirective, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i7.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "component", type: i7.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "directive", type: i8$1.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "directive", type: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "pipe", type: i1$2.I18nPipe, name: "i18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
681
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiThemBtnComponent, decorators: [{
682
+ type: Component,
683
+ args: [{
684
+ selector: 'yunzai-theme-btn',
685
+ template: `
686
+ <div
687
+ class="yunzai-default__nav-item"
688
+ nz-dropdown
689
+ [nzDropdownMenu]="iconMenu"
690
+ nzTrigger="click"
691
+ nzPlacement="bottomRight"
692
+ >
693
+ <svg nz-tooltip class="anticon" role="img" width="21" height="21" viewBox="0 0 21 21" fill="currentColor">
694
+ <g fill-rule="evenodd">
695
+ <g fill-rule="nonzero">
696
+ <path
697
+ d="M7.02 3.635l12.518 12.518a1.863 1.863 0 010 2.635l-1.317 1.318a1.863 1.863 0 01-2.635 0L3.068 7.588A2.795 2.795 0 117.02 3.635zm2.09 14.428a.932.932 0 110 1.864.932.932 0 010-1.864zm-.043-9.747L7.75 9.635l9.154 9.153 1.318-1.317-9.154-9.155zM3.52 12.473c.514 0 .931.417.931.931v.932h.932a.932.932 0 110 1.864h-.932v.931a.932.932 0 01-1.863 0l-.001-.931h-.93a.932.932 0 010-1.864h.93v-.932c0-.514.418-.931.933-.931zm15.374-3.727a1.398 1.398 0 110 2.795 1.398 1.398 0 010-2.795zM4.385 4.953a.932.932 0 000 1.317l2.046 2.047L7.75 7 5.703 4.953a.932.932 0 00-1.318 0zM14.701.36a.932.932 0 01.931.932v.931h.932a.932.932 0 010 1.864h-.933l.001.932a.932.932 0 11-1.863 0l-.001-.932h-.93a.932.932 0 110-1.864h.93v-.931a.932.932 0 01.933-.932z"
698
+ ></path>
699
+ </g>
700
+ </g>
701
+ </svg>
702
+ </div>
703
+ <nz-dropdown-menu #iconMenu="nzDropdownMenu">
704
+ <ul nz-menu>
705
+ <li
706
+ nz-menu-item
707
+ *ngFor="let theme of types"
708
+ (click)="onThemeChange(theme.key)"
709
+ [style]="{ color: theme.color }"
710
+ >
711
+ <i nz-icon nzType="bg-colors"></i>
712
+ {{ theme.text | i18n }}
713
+ </li>
714
+ </ul>
715
+ <!-- <div nz-menu class="wd-xl animated jello">-->
716
+ <!-- <div nz-row [nzJustify]="'space-between'" [nzAlign]="'middle'" class="app-icons">-->
717
+ <!-- <div nz-col [nzSpan]="4" *ngFor="let theme of types" (click)="onThemeChange(theme.key)">-->
718
+ <!-- <i nz-icon nzType="bg-colors" class="text-white" [style]="{ backgroundColor: theme.color }"></i>-->
719
+ <!-- <span [ngStyle]="{ color: theme.color }">{{ theme.text | i18n }}</span>-->
720
+ <!-- </div>-->
721
+ <!-- </div>-->
722
+ <!-- </div>-->
723
+ </nz-dropdown-menu>
724
+ `,
725
+ changeDetection: ChangeDetectionStrategy.OnPush
726
+ }]
727
+ }], ctorParameters: function () {
728
+ return [{ type: i0.Renderer2 }, { type: i4.YunzaiConfigService }, { type: i3$1.Platform }, { type: undefined, decorators: [{
729
+ type: Inject,
730
+ args: [DOCUMENT]
731
+ }] }, { type: i3$2.Directionality, decorators: [{
732
+ type: Optional
733
+ }] }, { type: undefined, decorators: [{
734
+ type: Inject,
735
+ args: [YUNZAI_THEME_BTN_KEYS]
736
+ }] }];
737
+ }, propDecorators: { types: [{
738
+ type: Input
739
+ }], devTips: [{
740
+ type: Input
741
+ }], deployUrl: [{
742
+ type: Input
743
+ }] } });
744
+
745
+ const BUSINESS_DEFAULT_CONFIG = {
746
+ baseUrl: '/backstage',
747
+ systemCode: 'portal',
748
+ loginForm: null,
749
+ refreshTokenEnabled: true,
750
+ refreshTokenType: 're-request'
751
+ };
752
+ function mergeBisConfig(srv) {
753
+ return srv.merge('bis', BUSINESS_DEFAULT_CONFIG);
754
+ }
755
+
756
+ class YunzaiUserComponent {
757
+ constructor(injector, msg, tokenService,
758
+ // @ts-ignore
759
+ configService, cacheService) {
760
+ this.injector = injector;
761
+ this.msg = msg;
762
+ this.tokenService = tokenService;
763
+ this.configService = configService;
764
+ this.cacheService = cacheService;
765
+ this.icon = '';
766
+ this.username = '';
767
+ this.menus = [];
768
+ this.config = mergeBisConfig(configService);
769
+ }
770
+ ngOnInit() {
771
+ const projectInfo = this.cacheService.get('_yz_project_info', { mode: 'none' });
772
+ const user = this.cacheService.get('_yz_user', { mode: 'none' });
773
+ this.username = user.realname ? user.realname : '未命名';
774
+ this.icon = user.avatarId
775
+ ? `${this.config.baseUrl}/filecenter/file/${user.avatarId}`
776
+ : `./assets/tmp/img/avatar.jpg`;
777
+ this.menus = projectInfo.profileList;
778
+ }
779
+ logout() {
780
+ localStorage.clear();
781
+ this.tokenService.clear();
782
+ this.injector.get(WINDOW).location.href = `${this.config.baseUrl}/cas-proxy/app/logout`;
783
+ }
784
+ to(href) {
785
+ if (href) {
786
+ this.injector.get(WINDOW).open(href);
787
+ }
788
+ else {
789
+ this.msg.error('该菜单没有配置链接!');
790
+ }
791
+ }
792
+ }
793
+ YunzaiUserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiUserComponent, deps: [{ token: i0.Injector }, { token: i1$1.NzMessageService }, { token: YA_SERVICE_TOKEN }, { token: i1$3.YunzaiConfigService }, { token: i1$4.CacheService }], target: i0.ɵɵFactoryTarget.Component });
794
+ YunzaiUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: YunzaiUserComponent, selector: "yunzai-user", ngImport: i0, template: `
795
+ <div
796
+ class="yunzai-default__nav-item d-flex align-items-center px-sm"
797
+ nz-dropdown
798
+ nzPlacement="bottomRight"
799
+ [nzDropdownMenu]="userMenu"
800
+ >
801
+ <div class="yz-user-name">
802
+ <nz-avatar [nzSrc]="icon" nzSize="small" class="mr-sm"></nz-avatar>
803
+ {{ username }}
804
+ </div>
805
+ </div>
806
+ <nz-dropdown-menu #userMenu="nzDropdownMenu">
807
+ <div nz-menu class="width-sm">
808
+ <div nz-menu-item *ngFor="let m of menus" (click)="to(m.url)">
809
+ <i nz-icon [nzType]="m.icon" class="mr-sm"></i>
810
+ {{ m.name | i18n }}
811
+ </div>
812
+ <li nz-menu-divider></li>
813
+ <div nz-menu-item (click)="logout()">
814
+ <i nz-icon nzType="logout" class="mr-sm"></i>
815
+ {{ 'menu.account.logout' | i18n }}
816
+ </div>
817
+ </div>
818
+ </nz-dropdown-menu>
819
+ `, isInline: true, dependencies: [{ kind: "directive", type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i6.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "directive", type: i6.NzMenuItemDirective, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i6.NzMenuDividerDirective, selector: "[nz-menu-divider]", exportAs: ["nzMenuDivider"] }, { kind: "directive", type: i7.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "component", type: i7.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "directive", type: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: i9.NzAvatarComponent, selector: "nz-avatar", inputs: ["nzShape", "nzSize", "nzGap", "nzText", "nzSrc", "nzSrcSet", "nzAlt", "nzIcon"], outputs: ["nzError"], exportAs: ["nzAvatar"] }, { kind: "pipe", type: i1$2.I18nPipe, name: "i18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
820
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiUserComponent, decorators: [{
821
+ type: Component,
822
+ args: [{
823
+ selector: 'yunzai-user',
824
+ template: `
825
+ <div
826
+ class="yunzai-default__nav-item d-flex align-items-center px-sm"
827
+ nz-dropdown
828
+ nzPlacement="bottomRight"
829
+ [nzDropdownMenu]="userMenu"
830
+ >
831
+ <div class="yz-user-name">
832
+ <nz-avatar [nzSrc]="icon" nzSize="small" class="mr-sm"></nz-avatar>
833
+ {{ username }}
834
+ </div>
835
+ </div>
836
+ <nz-dropdown-menu #userMenu="nzDropdownMenu">
837
+ <div nz-menu class="width-sm">
838
+ <div nz-menu-item *ngFor="let m of menus" (click)="to(m.url)">
839
+ <i nz-icon [nzType]="m.icon" class="mr-sm"></i>
840
+ {{ m.name | i18n }}
841
+ </div>
842
+ <li nz-menu-divider></li>
843
+ <div nz-menu-item (click)="logout()">
844
+ <i nz-icon nzType="logout" class="mr-sm"></i>
845
+ {{ 'menu.account.logout' | i18n }}
846
+ </div>
847
+ </div>
848
+ </nz-dropdown-menu>
849
+ `,
850
+ changeDetection: ChangeDetectionStrategy.OnPush
851
+ }]
852
+ }], ctorParameters: function () {
853
+ return [{ type: i0.Injector }, { type: i1$1.NzMessageService }, { type: undefined, decorators: [{
854
+ type: Inject,
855
+ args: [YA_SERVICE_TOKEN]
856
+ }] }, { type: i1$3.YunzaiConfigService }, { type: i1$4.CacheService }];
857
+ } });
858
+
859
+ var TopicType;
860
+ (function (TopicType) {
861
+ TopicType[TopicType["FULL"] = 0] = "FULL";
862
+ TopicType[TopicType["OWN"] = 1] = "OWN";
863
+ TopicType[TopicType["EVERY"] = 2] = "EVERY";
864
+ })(TopicType || (TopicType = {}));
865
+
866
+ class LayoutNavApplicationComponent {
867
+ constructor(cacheService, i18n, http, inject) {
868
+ this.cacheService = cacheService;
869
+ this.i18n = i18n;
870
+ this.http = http;
871
+ this.inject = inject;
872
+ this.TopicType = TopicType;
873
+ this.state = {
874
+ active: false,
875
+ type: TopicType.FULL,
876
+ topic: undefined,
877
+ topics: [],
878
+ list: [],
879
+ search: null,
880
+ destroy$: new Subject()
881
+ };
882
+ }
883
+ ngOnInit() {
884
+ this.state.list = this.state.topics = this.cacheService.get('_yz_header', { mode: 'none' });
885
+ }
886
+ initTopic(type) {
887
+ this.state.search = null;
888
+ this.state.list = this.cacheService.get('_yz_header', { mode: 'none' });
889
+ this.state.type = type;
890
+ }
891
+ full() {
892
+ this.initTopic(TopicType.FULL);
893
+ }
894
+ own() {
895
+ this.initTopic(TopicType.OWN);
896
+ const temp = this.cacheService.get('_yz_header', { mode: 'none' });
897
+ this.state.list = temp
898
+ .filter((topic) => {
899
+ topic.children = topic.children.filter((child) => {
900
+ return child.auth;
901
+ });
902
+ return topic;
903
+ })
904
+ .filter((topic) => {
905
+ return topic.children.length > 0;
906
+ });
907
+ }
908
+ every(e) {
909
+ this.initTopic(TopicType.EVERY);
910
+ this.state.topic = e;
911
+ const temp = this.cacheService.get('_yz_header', { mode: 'none' });
912
+ this.state.list = [...temp.filter(t => t.key === e.key)[0].children];
913
+ }
914
+ diffChange(flag) {
915
+ if (flag) {
916
+ this.state.active = flag;
917
+ }
918
+ else {
919
+ this.state.active = !this.state.active;
920
+ }
921
+ }
922
+ open(topic) {
923
+ if (topic.key) {
924
+ this.http
925
+ .post(`/app-manager/web-scan/save`, {
926
+ appId: topic.key,
927
+ createDate: new Date()
928
+ })
929
+ .pipe(takeUntil(this.state.destroy$))
930
+ .subscribe();
931
+ }
932
+ switch (topic.target) {
933
+ case 'href':
934
+ this.inject.get(WINDOW).location.href = topic.url;
935
+ break;
936
+ case 'blank':
937
+ this.inject.get(WINDOW).location.href = topic.url;
938
+ break;
939
+ case 'target':
940
+ this.inject.get(WINDOW).location.href = topic.url;
941
+ break;
942
+ default:
943
+ this.inject.get(WINDOW).location.href = topic.url;
944
+ break;
945
+ }
946
+ }
947
+ onSearch() {
948
+ const temp = this.cacheService.get('_yz_header', { mode: 'none' });
949
+ if (this.state.search) {
950
+ this.state.list = temp
951
+ .filter((topic) => {
952
+ if (this.i18n.fanyi(topic.name).includes(this.state.search)) {
953
+ return topic;
954
+ }
955
+ else {
956
+ topic.children = topic.children.filter((child) => {
957
+ return this.i18n.fanyi(child.name).includes(this.state.search);
958
+ });
959
+ return topic;
960
+ }
961
+ })
962
+ .filter((topic) => {
963
+ return topic.children.length > 0;
964
+ });
965
+ }
966
+ else {
967
+ this.state.list = this.cacheService.get('_yz_header', { mode: 'none' });
968
+ }
969
+ }
970
+ ngOnDestroy() {
971
+ this.state.destroy$.complete();
972
+ }
973
+ }
974
+ LayoutNavApplicationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LayoutNavApplicationComponent, deps: [{ token: i1$4.CacheService }, { token: YunzaiI18NService }, { token: i1$2._HttpClient }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
975
+ LayoutNavApplicationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: LayoutNavApplicationComponent, selector: "layout-nav-application", ngImport: i0, template: `
976
+ <!-- template start-->
977
+ <ng-template #search>
978
+ <div nz-row class="yz-application-list-search">
979
+ <nz-input-group [nzPrefix]="prefixTemplate">
980
+ <input
981
+ type="text"
982
+ nz-input
983
+ placeholder="{{ 'application.search' | i18n }}"
984
+ [(ngModel)]="state.search"
985
+ (ngModelChange)="onSearch()"
986
+ />
987
+ <ng-template #prefixTemplate>
988
+ <i nz-icon nzType="search" nzTheme="outline"></i>
989
+ </ng-template>
990
+ </nz-input-group>
991
+ </div>
992
+ </ng-template>
993
+ <ng-template #ld>
994
+ <div class="yz-application-list">
995
+ <ul>
996
+ <li *ngFor="let d of state.list">
997
+ <h5>{{ d.name }}</h5>
998
+ <a href="javascript:;" *ngFor="let cd of d.children" (click)="open(cd)">{{ cd.name }}</a>
999
+ </li>
1000
+ </ul>
1001
+ </div>
1002
+ </ng-template>
1003
+ <!-- template end-->
1004
+
1005
+ <!-- button start-->
1006
+ <div class="yunzai-default__nav-item" (click)="diffChange()"> {{ 'application.button' | i18n }}</div>
1007
+ <!-- button end-->
1008
+
1009
+ <!-- header start-->
1010
+ <div class="yz-application" nz-row *ngIf="state.active">
1011
+ <div nz-col [nzSpan]="3" class="yz-application-topic">
1012
+ <div class="yz-application-text" (click)="full()">{{ 'application.all' | i18n }}</div>
1013
+ <div class="yz-application-text" (click)="own()">{{ 'application.mine' | i18n }}</div>
1014
+ <div class="yz-application-text" *ngFor="let d of state.topics" (click)="every(d)">{{ d.name }}</div>
1015
+ </div>
1016
+ <div nz-col [nzSpan]="21" [ngSwitch]="state.topic" class="yz-application-container">
1017
+ <div *ngSwitchCase="TopicType.FULL">
1018
+ <ng-template [ngTemplateOutlet]="search"></ng-template>
1019
+ <ng-template [ngTemplateOutlet]="ld"></ng-template>
1020
+ </div>
1021
+ <div *ngSwitchCase="TopicType.OWN">
1022
+ <ng-template [ngTemplateOutlet]="search"></ng-template>
1023
+ <ng-template [ngTemplateOutlet]="ld"></ng-template>
1024
+ </div>
1025
+ <div *ngSwitchCase="TopicType.EVERY" class="yz-application-list">
1026
+ <div class="yz-application-list-item">
1027
+ <ul>
1028
+ <li *ngFor="let d of state.list" (click)="open(d)">
1029
+ <a href="javascript:;">
1030
+ <h4>{{ d.name }}</h4>
1031
+ <p>{{ d.intro }}</p>
1032
+ </a>
1033
+ </li>
1034
+ </ul>
1035
+ </div>
1036
+ </div>
1037
+ </div>
1038
+ </div>
1039
+ <!-- header end-->
1040
+ `, isInline: true, dependencies: [{ kind: "directive", type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i7$1.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i7$1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: i9$1.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i9$1.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i9$1.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "pipe", type: i1$2.I18nPipe, name: "i18n" }] });
1041
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LayoutNavApplicationComponent, decorators: [{
1042
+ type: Component,
1043
+ args: [{
1044
+ selector: `layout-nav-application`,
1045
+ template: `
1046
+ <!-- template start-->
1047
+ <ng-template #search>
1048
+ <div nz-row class="yz-application-list-search">
1049
+ <nz-input-group [nzPrefix]="prefixTemplate">
1050
+ <input
1051
+ type="text"
1052
+ nz-input
1053
+ placeholder="{{ 'application.search' | i18n }}"
1054
+ [(ngModel)]="state.search"
1055
+ (ngModelChange)="onSearch()"
1056
+ />
1057
+ <ng-template #prefixTemplate>
1058
+ <i nz-icon nzType="search" nzTheme="outline"></i>
1059
+ </ng-template>
1060
+ </nz-input-group>
1061
+ </div>
1062
+ </ng-template>
1063
+ <ng-template #ld>
1064
+ <div class="yz-application-list">
1065
+ <ul>
1066
+ <li *ngFor="let d of state.list">
1067
+ <h5>{{ d.name }}</h5>
1068
+ <a href="javascript:;" *ngFor="let cd of d.children" (click)="open(cd)">{{ cd.name }}</a>
1069
+ </li>
1070
+ </ul>
1071
+ </div>
1072
+ </ng-template>
1073
+ <!-- template end-->
1074
+
1075
+ <!-- button start-->
1076
+ <div class="yunzai-default__nav-item" (click)="diffChange()"> {{ 'application.button' | i18n }}</div>
1077
+ <!-- button end-->
1078
+
1079
+ <!-- header start-->
1080
+ <div class="yz-application" nz-row *ngIf="state.active">
1081
+ <div nz-col [nzSpan]="3" class="yz-application-topic">
1082
+ <div class="yz-application-text" (click)="full()">{{ 'application.all' | i18n }}</div>
1083
+ <div class="yz-application-text" (click)="own()">{{ 'application.mine' | i18n }}</div>
1084
+ <div class="yz-application-text" *ngFor="let d of state.topics" (click)="every(d)">{{ d.name }}</div>
1085
+ </div>
1086
+ <div nz-col [nzSpan]="21" [ngSwitch]="state.topic" class="yz-application-container">
1087
+ <div *ngSwitchCase="TopicType.FULL">
1088
+ <ng-template [ngTemplateOutlet]="search"></ng-template>
1089
+ <ng-template [ngTemplateOutlet]="ld"></ng-template>
1090
+ </div>
1091
+ <div *ngSwitchCase="TopicType.OWN">
1092
+ <ng-template [ngTemplateOutlet]="search"></ng-template>
1093
+ <ng-template [ngTemplateOutlet]="ld"></ng-template>
1094
+ </div>
1095
+ <div *ngSwitchCase="TopicType.EVERY" class="yz-application-list">
1096
+ <div class="yz-application-list-item">
1097
+ <ul>
1098
+ <li *ngFor="let d of state.list" (click)="open(d)">
1099
+ <a href="javascript:;">
1100
+ <h4>{{ d.name }}</h4>
1101
+ <p>{{ d.intro }}</p>
1102
+ </a>
1103
+ </li>
1104
+ </ul>
1105
+ </div>
1106
+ </div>
1107
+ </div>
1108
+ </div>
1109
+ <!-- header end-->
1110
+ `
1111
+ }]
1112
+ }], ctorParameters: function () { return [{ type: i1$4.CacheService }, { type: YunzaiI18NService }, { type: i1$2._HttpClient }, { type: i0.Injector }]; } });
1113
+
1114
+ class LayoutNavGroupComponent {
1115
+ constructor(inject, cacheService, http) {
1116
+ this.inject = inject;
1117
+ this.cacheService = cacheService;
1118
+ this.http = http;
1119
+ this.state = {
1120
+ topics: [],
1121
+ destroy$: new Subject()
1122
+ };
1123
+ }
1124
+ ngOnInit() {
1125
+ this.state.topics = this.cacheService.get('_yz_header', { mode: 'none' });
1126
+ }
1127
+ open(topic) {
1128
+ if (topic.key) {
1129
+ this.http
1130
+ .post(`/app-manager/web-scan/save`, {
1131
+ appId: topic.key,
1132
+ createDate: new Date()
1133
+ })
1134
+ .pipe(takeUntil(this.state.destroy$))
1135
+ .subscribe();
1136
+ }
1137
+ switch (topic.target) {
1138
+ case 'href':
1139
+ this.inject.get(WINDOW).location.href = topic.url;
1140
+ break;
1141
+ case 'blank':
1142
+ this.inject.get(WINDOW).location.href = topic.url;
1143
+ break;
1144
+ case 'target':
1145
+ this.inject.get(WINDOW).location.href = topic.url;
1146
+ break;
1147
+ default:
1148
+ this.inject.get(WINDOW).location.href = topic.url;
1149
+ break;
1150
+ }
1151
+ }
1152
+ ngOnDestroy() {
1153
+ this.state.destroy$.complete();
1154
+ }
1155
+ }
1156
+ LayoutNavGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LayoutNavGroupComponent, deps: [{ token: i0.Injector }, { token: i1$4.CacheService }, { token: i1$2._HttpClient }], target: i0.ɵɵFactoryTarget.Component });
1157
+ LayoutNavGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: LayoutNavGroupComponent, selector: "layout-nav-group", ngImport: i0, template: `
1158
+ <div class="yz-application-group">
1159
+ <nz-tabset>
1160
+ <nz-tab *ngFor="let menu of state.topics" [nzTitle]="groupTitleTpl">
1161
+ <ng-template #groupTitleTpl>
1162
+ <a
1163
+ nz-dropdown
1164
+ [nzDropdownMenu]="menuTpl"
1165
+ [nzTrigger]="'click'"
1166
+ [nzOverlayClassName]="'yz-application-dropdown'"
1167
+ >
1168
+ <i nz-icon *ngIf="menu.icon" [nzType]="menu.icon" nzTheme="outline"></i>
1169
+ {{ menu.name | i18n }}
1170
+ <i *ngIf="menu.children && menu.children.length > 0" nz-icon nzType="down" nzTheme="outline"></i>
1171
+ </a>
1172
+ <nz-dropdown-menu #menuTpl="nzDropdownMenu">
1173
+ <ul nz-menu nzSelectable *ngIf="menu.children && menu.children.length > 0">
1174
+ <ng-container *ngFor="let item of menu.children">
1175
+ <li nz-menu-item (click)="open(item)">
1176
+ <i nz-icon *ngIf="item.icon" [nzType]="item.icon" nzTheme="outline"></i>{{ item.name | i18n }}
1177
+ </li>
1178
+ </ng-container>
1179
+ </ul>
1180
+ </nz-dropdown-menu>
1181
+ </ng-template>
1182
+ </nz-tab>
1183
+ </nz-tabset>
1184
+ </div>
1185
+ `, isInline: true, dependencies: [{ kind: "directive", type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i6.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "directive", type: i6.NzMenuItemDirective, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i7.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "directive", type: i7.NzDropDownADirective, selector: "a[nz-dropdown]" }, { kind: "component", type: i7.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "directive", type: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: i8$2.NzTabSetComponent, selector: "nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabset"] }, { kind: "component", type: i8$2.NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { kind: "pipe", type: i1$2.I18nPipe, name: "i18n" }] });
1186
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LayoutNavGroupComponent, decorators: [{
1187
+ type: Component,
1188
+ args: [{
1189
+ selector: `layout-nav-group`,
1190
+ template: `
1191
+ <div class="yz-application-group">
1192
+ <nz-tabset>
1193
+ <nz-tab *ngFor="let menu of state.topics" [nzTitle]="groupTitleTpl">
1194
+ <ng-template #groupTitleTpl>
1195
+ <a
1196
+ nz-dropdown
1197
+ [nzDropdownMenu]="menuTpl"
1198
+ [nzTrigger]="'click'"
1199
+ [nzOverlayClassName]="'yz-application-dropdown'"
1200
+ >
1201
+ <i nz-icon *ngIf="menu.icon" [nzType]="menu.icon" nzTheme="outline"></i>
1202
+ {{ menu.name | i18n }}
1203
+ <i *ngIf="menu.children && menu.children.length > 0" nz-icon nzType="down" nzTheme="outline"></i>
1204
+ </a>
1205
+ <nz-dropdown-menu #menuTpl="nzDropdownMenu">
1206
+ <ul nz-menu nzSelectable *ngIf="menu.children && menu.children.length > 0">
1207
+ <ng-container *ngFor="let item of menu.children">
1208
+ <li nz-menu-item (click)="open(item)">
1209
+ <i nz-icon *ngIf="item.icon" [nzType]="item.icon" nzTheme="outline"></i>{{ item.name | i18n }}
1210
+ </li>
1211
+ </ng-container>
1212
+ </ul>
1213
+ </nz-dropdown-menu>
1214
+ </ng-template>
1215
+ </nz-tab>
1216
+ </nz-tabset>
1217
+ </div>
1218
+ `
1219
+ }]
1220
+ }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$4.CacheService }, { type: i1$2._HttpClient }]; } });
1221
+
1222
+ class LayoutNavTileComponent {
1223
+ constructor() { }
1224
+ }
1225
+ LayoutNavTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LayoutNavTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1226
+ LayoutNavTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: LayoutNavTileComponent, selector: "layout-nav-tile", ngImport: i0, template: `<template></template>`, isInline: true });
1227
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LayoutNavTileComponent, decorators: [{
1228
+ type: Component,
1229
+ args: [{
1230
+ selector: `layout-nav-tile`,
1231
+ template: `<template></template>`
1232
+ }]
1233
+ }], ctorParameters: function () { return []; } });
1234
+
1235
+ class YunzaiLayoutBasicComponent {
1236
+ get options() {
1237
+ return this.state.options;
1238
+ }
1239
+ get navType() {
1240
+ return this.state.navType;
1241
+ }
1242
+ get aside() {
1243
+ return this.state.aside;
1244
+ }
1245
+ get displayReusetab() {
1246
+ return this.state.display.reusetab;
1247
+ }
1248
+ get reusetabCSS() {
1249
+ let cascadingStyleSheet = {};
1250
+ if (!this.state.display.nav) {
1251
+ cascadingStyleSheet = Object.assign(Object.assign({}, cascadingStyleSheet), { top: 0 });
1252
+ }
1253
+ if (!this.state.display.aside) {
1254
+ cascadingStyleSheet = Object.assign(Object.assign({}, cascadingStyleSheet), { left: '24px' });
1255
+ }
1256
+ return cascadingStyleSheet;
1257
+ }
1258
+ constructor(layoutDisplayService, cacheService, stompService, router, win) {
1259
+ this.layoutDisplayService = layoutDisplayService;
1260
+ this.cacheService = cacheService;
1261
+ this.stompService = stompService;
1262
+ this.router = router;
1263
+ this.win = win;
1264
+ this.NavType = NavType;
1265
+ this.state = {
1266
+ options: {
1267
+ logoExpanded: `./assets/logo-full.svg`,
1268
+ logoCollapsed: `./assets/logo.svg`
1269
+ },
1270
+ aside: {
1271
+ name: '',
1272
+ intro: '',
1273
+ icon: ''
1274
+ },
1275
+ display: {
1276
+ nav: true,
1277
+ aside: true,
1278
+ reusetab: true
1279
+ },
1280
+ navType: NavType.APPLICATION,
1281
+ destroy$: new Subject()
1282
+ };
1283
+ }
1284
+ ngOnInit() {
1285
+ this.initLogo();
1286
+ this.initNavType();
1287
+ this.initAside();
1288
+ this.addLayoutDisplayListener();
1289
+ this.stompService.listen();
1290
+ this.toIndex();
1291
+ }
1292
+ initAside() {
1293
+ const aside = this.cacheService.get('_yz_current', { mode: 'none' });
1294
+ this.state.aside = Object.assign({}, aside);
1295
+ }
1296
+ initLogo() {
1297
+ const projectInfo = this.cacheService.get('_yz_project_info', { mode: 'none' });
1298
+ this.state.options.logoExpanded = projectInfo.maxLogoUrl ? projectInfo.maxLogoUrl : `./assets/logo-full.svg`;
1299
+ this.state.options.logoCollapsed = projectInfo.miniLogoUrl ? projectInfo.miniLogoUrl : `./assets/logo.svg`;
1300
+ }
1301
+ initNavType() {
1302
+ var _a;
1303
+ // from browser cache
1304
+ const navType = this.cacheService.get('_yz_header_type', { mode: 'none' });
1305
+ if (navType !== null) {
1306
+ this.state.navType = navType;
1307
+ return;
1308
+ }
1309
+ // from project info
1310
+ const projectInfo = this.cacheService.get('_yz_project_info', { mode: 'none' });
1311
+ let fetchedNavType = undefined;
1312
+ if (projectInfo.headerStyle && projectInfo.headerStyle.length > 0) {
1313
+ fetchedNavType = (_a = projectInfo.headerStyle.pop()) === null || _a === void 0 ? void 0 : _a.value;
1314
+ }
1315
+ // default value
1316
+ if (!fetchedNavType) {
1317
+ fetchedNavType = NavType.APPLICATION;
1318
+ }
1319
+ }
1320
+ toIndex() {
1321
+ const defaultRoute = this.cacheService.get('_yz_defaultRoute', { mode: 'none' });
1322
+ this.router.navigateByUrl(defaultRoute);
1323
+ }
1324
+ onNavTypeChange(type) {
1325
+ this.cacheService.set('_yz_header_type', type);
1326
+ this.win.location.reload();
1327
+ }
1328
+ addLayoutDisplayListener() {
1329
+ this.layoutDisplayService.listen('nav', (display) => {
1330
+ this.state.display.nav = display;
1331
+ });
1332
+ this.layoutDisplayService.listen('aside', (display) => {
1333
+ this.state.display.aside = display;
1334
+ });
1335
+ this.layoutDisplayService.listen('reuseTab', (display) => {
1336
+ this.state.display.reusetab = display;
1337
+ });
1338
+ }
1339
+ ngOnDestroy() {
1340
+ this.state.destroy$.complete();
1341
+ }
1342
+ }
1343
+ YunzaiLayoutBasicComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiLayoutBasicComponent, deps: [{ token: LayoutDisplayService }, { token: i1$4.CacheService }, { token: i3$3.StompService }, { token: i4$3.Router }, { token: WINDOW }], target: i0.ɵɵFactoryTarget.Component });
1344
+ YunzaiLayoutBasicComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: YunzaiLayoutBasicComponent, selector: "yz-layout-basic", ngImport: i0, template: `<layout-default
1345
+ [options]="options"
1346
+ [asideUser]="asideUserTpl"
1347
+ [content]="displayReusetab ? contentTpl : noneTpl"
1348
+ >
1349
+ <!-- nav -->
1350
+ <layout-default-header-item direction="left">
1351
+ <ng-container [ngSwitch]="navType">
1352
+ <ng-container *ngSwitchCase="NavType.APPLICATION">
1353
+ <layout-nav-application></layout-nav-application>
1354
+ </ng-container>
1355
+ <ng-container *ngSwitchCase="NavType.GROUP"> <layout-nav-group></layout-nav-group></ng-container>
1356
+ <ng-container *ngSwitchCase="NavType.TILE"> <layout-nav-tile></layout-nav-tile> </ng-container>
1357
+ <ng-container *ngSwitchDefault> <layout-nav-application></layout-nav-application> </ng-container>
1358
+ </ng-container>
1359
+ </layout-default-header-item>
1360
+ <!-- nav end -->
1361
+ <layout-default-header-item direction="right" hidden="mobile">
1362
+ <yunzai-notify></yunzai-notify>
1363
+ </layout-default-header-item>
1364
+ <layout-default-header-item direction="right" hidden="mobile">
1365
+ <yunzai-theme-btn></yunzai-theme-btn>
1366
+ </layout-default-header-item>
1367
+ <!-- setting -->
1368
+ <layout-default-header-item direction="right" hidden="mobile">
1369
+ <div
1370
+ layout-default-header-item-trigger
1371
+ nz-dropdown
1372
+ [nzDropdownMenu]="settingsMenu"
1373
+ nzTrigger="click"
1374
+ nzPlacement="bottomRight"
1375
+ >
1376
+ <i nz-icon nzType="setting"></i>
1377
+ </div>
1378
+ <nz-dropdown-menu #settingsMenu="nzDropdownMenu">
1379
+ <div nz-menu style="width: 200px;">
1380
+ <div nz-menu-item>
1381
+ {{ 'menu.application.mode' | i18n }}
1382
+ </div>
1383
+
1384
+ <div nz-menu-item (click)="onNavTypeChange(NavType.APPLICATION)">
1385
+ <i nz-icon nzType="appstore" class="mr-sm"></i>
1386
+ {{ 'menu.application.application' | i18n }}
1387
+ </div>
1388
+ <div nz-menu-item (click)="onNavTypeChange(NavType.GROUP)">
1389
+ <i nz-icon nzType="group" class="mr-sm"></i>
1390
+ {{ 'menu.application.group' | i18n }}
1391
+ </div>
1392
+ <div nz-menu-item (click)="onNavTypeChange(NavType.TILE)">
1393
+ <i nz-icon nzType="appstore" class="mr-sm"></i>
1394
+ {{ 'menu.application.tile' | i18n }}
1395
+ </div>
1396
+ <div nz-menu-item> <yunzai-fullscreen></yunzai-fullscreen> </div>
1397
+ <div nz-menu-item> <yunzai-clearstorage></yunzai-clearstorage> </div>
1398
+ <div nz-menu-item> <yunzai-i18n></yunzai-i18n> </div>
1399
+ </div>
1400
+ </nz-dropdown-menu>
1401
+ </layout-default-header-item>
1402
+ <layout-default-header-item direction="right">
1403
+ <yunzai-user></yunzai-user>
1404
+ </layout-default-header-item>
1405
+ <!-- setting end -->
1406
+ </layout-default>
1407
+ <ng-template #asideUserTpl>
1408
+ <div nz-dropdown nzTrigger="click" [nzDropdownMenu]="userMenu" class="yunzai-default__aside-user">
1409
+ <nz-avatar class="yunzai-default__aside-user-avatar" [nzSrc]="aside.icon"></nz-avatar>
1410
+ <div class="yunzai-default__aside-user-info">
1411
+ <strong>{{ aside.name }}</strong>
1412
+ <p class="mb0">{{ aside.intro }}</p>
1413
+ </div>
1414
+ </div>
1415
+ <nz-dropdown-menu #userMenu="nzDropdownMenu">
1416
+ <ul nz-menu>
1417
+ <li nz-menu-item routerLink="/">{{ 'menu.backtohome' | i18n }}</li>
1418
+ </ul>
1419
+ </nz-dropdown-menu>
1420
+ </ng-template>
1421
+ <ng-template #contentTpl>
1422
+ <reuse-tab #reuseTab [ngStyle]="reusetabCSS"></reuse-tab>
1423
+ <router-outlet (activate)="reuseTab.activate($event)" (attach)="reuseTab.activate($event)"></router-outlet>
1424
+ </ng-template>
1425
+ <ng-template #noneTpl>
1426
+ <router-outlet></router-outlet>
1427
+ </ng-template> `, isInline: true, dependencies: [{ kind: "directive", type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i4$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i4$3.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: i4$3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i6$1.ReuseTabComponent, selector: "reuse-tab, [reuse-tab]", inputs: ["mode", "i18n", "debug", "max", "tabMaxWidth", "excludes", "allowClose", "keepingScroll", "storageState", "keepingScrollContainer", "customContextMenu", "tabBarExtraContent", "tabBarGutter", "tabBarStyle", "tabType", "routeParamMatchMode", "disabled", "titleRender", "canClose"], outputs: ["change", "close"], exportAs: ["reuseTab"] }, { kind: "component", type: i7$2.LayoutDefaultComponent, selector: "layout-default", inputs: ["options", "asideUser", "asideBottom", "nav", "content", "customError"], exportAs: ["layoutDefault"] }, { kind: "component", type: i7$2.LayoutDefaultHeaderItemComponent, selector: "layout-default-header-item", inputs: ["hidden", "direction"] }, { kind: "directive", type: i7$2.LayoutDefaultHeaderItemTriggerDirective, selector: "[layout-default-header-item-trigger]" }, { kind: "directive", type: i3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i6.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "directive", type: i6.NzMenuItemDirective, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i7.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "component", type: i7.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "directive", type: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: i9.NzAvatarComponent, selector: "nz-avatar", inputs: ["nzShape", "nzSize", "nzGap", "nzText", "nzSrc", "nzSrcSet", "nzAlt", "nzIcon"], outputs: ["nzError"], exportAs: ["nzAvatar"] }, { kind: "component", type: YunzaiClearStorageComponent, selector: "yunzai-clearstorage" }, { kind: "component", type: YunzaiFullScreenComponent, selector: "yunzai-fullscreen" }, { kind: "component", type: YunzaiI18NComponent, selector: "yunzai-i18n", inputs: ["showLangText"] }, { kind: "component", type: YunzaiNotifyComponent, selector: "yunzai-notify" }, { kind: "component", type: YunzaiThemBtnComponent, selector: "yunzai-theme-btn", inputs: ["types", "devTips", "deployUrl"] }, { kind: "component", type: YunzaiUserComponent, selector: "yunzai-user" }, { kind: "component", type: LayoutNavApplicationComponent, selector: "layout-nav-application" }, { kind: "component", type: LayoutNavGroupComponent, selector: "layout-nav-group" }, { kind: "component", type: LayoutNavTileComponent, selector: "layout-nav-tile" }, { kind: "pipe", type: i1$2.I18nPipe, name: "i18n" }] });
1428
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiLayoutBasicComponent, decorators: [{
1429
+ type: Component,
1430
+ args: [{
1431
+ selector: `yz-layout-basic`,
1432
+ template: `<layout-default
1433
+ [options]="options"
1434
+ [asideUser]="asideUserTpl"
1435
+ [content]="displayReusetab ? contentTpl : noneTpl"
1436
+ >
1437
+ <!-- nav -->
1438
+ <layout-default-header-item direction="left">
1439
+ <ng-container [ngSwitch]="navType">
1440
+ <ng-container *ngSwitchCase="NavType.APPLICATION">
1441
+ <layout-nav-application></layout-nav-application>
1442
+ </ng-container>
1443
+ <ng-container *ngSwitchCase="NavType.GROUP"> <layout-nav-group></layout-nav-group></ng-container>
1444
+ <ng-container *ngSwitchCase="NavType.TILE"> <layout-nav-tile></layout-nav-tile> </ng-container>
1445
+ <ng-container *ngSwitchDefault> <layout-nav-application></layout-nav-application> </ng-container>
1446
+ </ng-container>
1447
+ </layout-default-header-item>
1448
+ <!-- nav end -->
1449
+ <layout-default-header-item direction="right" hidden="mobile">
1450
+ <yunzai-notify></yunzai-notify>
1451
+ </layout-default-header-item>
1452
+ <layout-default-header-item direction="right" hidden="mobile">
1453
+ <yunzai-theme-btn></yunzai-theme-btn>
1454
+ </layout-default-header-item>
1455
+ <!-- setting -->
1456
+ <layout-default-header-item direction="right" hidden="mobile">
1457
+ <div
1458
+ layout-default-header-item-trigger
1459
+ nz-dropdown
1460
+ [nzDropdownMenu]="settingsMenu"
1461
+ nzTrigger="click"
1462
+ nzPlacement="bottomRight"
1463
+ >
1464
+ <i nz-icon nzType="setting"></i>
1465
+ </div>
1466
+ <nz-dropdown-menu #settingsMenu="nzDropdownMenu">
1467
+ <div nz-menu style="width: 200px;">
1468
+ <div nz-menu-item>
1469
+ {{ 'menu.application.mode' | i18n }}
1470
+ </div>
1471
+
1472
+ <div nz-menu-item (click)="onNavTypeChange(NavType.APPLICATION)">
1473
+ <i nz-icon nzType="appstore" class="mr-sm"></i>
1474
+ {{ 'menu.application.application' | i18n }}
1475
+ </div>
1476
+ <div nz-menu-item (click)="onNavTypeChange(NavType.GROUP)">
1477
+ <i nz-icon nzType="group" class="mr-sm"></i>
1478
+ {{ 'menu.application.group' | i18n }}
1479
+ </div>
1480
+ <div nz-menu-item (click)="onNavTypeChange(NavType.TILE)">
1481
+ <i nz-icon nzType="appstore" class="mr-sm"></i>
1482
+ {{ 'menu.application.tile' | i18n }}
1483
+ </div>
1484
+ <div nz-menu-item> <yunzai-fullscreen></yunzai-fullscreen> </div>
1485
+ <div nz-menu-item> <yunzai-clearstorage></yunzai-clearstorage> </div>
1486
+ <div nz-menu-item> <yunzai-i18n></yunzai-i18n> </div>
1487
+ </div>
1488
+ </nz-dropdown-menu>
1489
+ </layout-default-header-item>
1490
+ <layout-default-header-item direction="right">
1491
+ <yunzai-user></yunzai-user>
1492
+ </layout-default-header-item>
1493
+ <!-- setting end -->
1494
+ </layout-default>
1495
+ <ng-template #asideUserTpl>
1496
+ <div nz-dropdown nzTrigger="click" [nzDropdownMenu]="userMenu" class="yunzai-default__aside-user">
1497
+ <nz-avatar class="yunzai-default__aside-user-avatar" [nzSrc]="aside.icon"></nz-avatar>
1498
+ <div class="yunzai-default__aside-user-info">
1499
+ <strong>{{ aside.name }}</strong>
1500
+ <p class="mb0">{{ aside.intro }}</p>
1501
+ </div>
1502
+ </div>
1503
+ <nz-dropdown-menu #userMenu="nzDropdownMenu">
1504
+ <ul nz-menu>
1505
+ <li nz-menu-item routerLink="/">{{ 'menu.backtohome' | i18n }}</li>
1506
+ </ul>
1507
+ </nz-dropdown-menu>
1508
+ </ng-template>
1509
+ <ng-template #contentTpl>
1510
+ <reuse-tab #reuseTab [ngStyle]="reusetabCSS"></reuse-tab>
1511
+ <router-outlet (activate)="reuseTab.activate($event)" (attach)="reuseTab.activate($event)"></router-outlet>
1512
+ </ng-template>
1513
+ <ng-template #noneTpl>
1514
+ <router-outlet></router-outlet>
1515
+ </ng-template> `
1516
+ }]
1517
+ }], ctorParameters: function () {
1518
+ return [{ type: LayoutDisplayService }, { type: i1$4.CacheService }, { type: i3$3.StompService }, { type: i4$3.Router }, { type: undefined, decorators: [{
1519
+ type: Inject,
1520
+ args: [WINDOW]
1521
+ }] }];
1522
+ } });
1523
+
1524
+ class ActGuard {
1525
+ constructor(configService, cacheService, pathToRegexp, router) {
1526
+ this.configService = configService;
1527
+ this.cacheService = cacheService;
1528
+ this.pathToRegexp = pathToRegexp;
1529
+ this.router = router;
1530
+ this.bis = BUSINESS_DEFAULT_CONFIG;
1531
+ this.menus = [];
1532
+ this.links = [];
1533
+ log$1('act: ');
1534
+ this.bis = mergeBisConfig(this.configService);
1535
+ log$1('act: config ', this.bis);
1536
+ const user = this.cacheService.get('_yz_user', { mode: 'none' });
1537
+ log$1('act: user ', user);
1538
+ this.menus = deepCopy(user.menu).filter((m) => m.systemCode && m.systemCode === this.bis.systemCode);
1539
+ log$1('act: menus ', this.menus);
1540
+ this.getAllLinks(this.menus, this.links);
1541
+ log$1('act: links ', this.links);
1542
+ }
1543
+ canActivate(_, state) {
1544
+ log$1('act: can activate ', state);
1545
+ if (this.preHandle(state)) {
1546
+ return true;
1547
+ }
1548
+ log$1('act: can activate child prehandle success');
1549
+ let canactivate = false;
1550
+ this.links.forEach((link) => {
1551
+ const regexp = this.pathToRegexp.stringToRegexp(link, null, null);
1552
+ log$1(`act: ${link} test ${state.url.split('?')[0]}`);
1553
+ if (regexp.test(state.url.split('?')[0])) {
1554
+ canactivate = true;
1555
+ log$1(`act: test value ${canactivate}`);
1556
+ return;
1557
+ }
1558
+ });
1559
+ if (canactivate) {
1560
+ log$1(`act: test sucess`);
1561
+ return true;
1562
+ }
1563
+ else {
1564
+ log$1(`act: test error`);
1565
+ this.router.navigate(['displayIndex']);
1566
+ return false;
1567
+ }
1568
+ }
1569
+ canActivateChild(_, state) {
1570
+ log$1('act: can activate child ', state);
1571
+ if (this.preHandle(state)) {
1572
+ return true;
1573
+ }
1574
+ log$1('act: can activate child prehandle success');
1575
+ let canactivate = false;
1576
+ this.links.forEach((link) => {
1577
+ const regexp = this.pathToRegexp.stringToRegexp(link, null, null);
1578
+ if (regexp.test(state.url.split('?')[0])) {
1579
+ log$1(`act: ${link} test ${state.url.split('?')[0]}`);
1580
+ canactivate = true;
1581
+ log$1(`act: test value ${canactivate}`);
1582
+ return;
1583
+ }
1584
+ });
1585
+ if (canactivate) {
1586
+ log$1(`act: test sucess`);
1587
+ return true;
1588
+ }
1589
+ else {
1590
+ log$1(`act: test error`);
1591
+ this.router.navigate(['displayIndex']);
1592
+ return false;
1593
+ }
1594
+ }
1595
+ preHandle(state) {
1596
+ return (state.url.includes('error') ||
1597
+ state.url.includes('exception') ||
1598
+ state.url.includes('displayIndex') ||
1599
+ state.url === '' ||
1600
+ state.url === null ||
1601
+ state.url === '/' ||
1602
+ state.url.includes('iframePage'));
1603
+ }
1604
+ getAllLinks(menu, links) {
1605
+ menu.forEach((sider) => {
1606
+ if (sider.link) {
1607
+ links.push(sider.link);
1608
+ }
1609
+ if (sider.children && sider.children.length > 0) {
1610
+ this.getAllLinks(sider.children, links);
1611
+ }
1612
+ });
1613
+ }
1614
+ }
1615
+ ActGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ActGuard, deps: [{ token: i1$3.YunzaiConfigService }, { token: i1$4.CacheService }, { token: i1$3.PathToRegexpService }, { token: i4$3.Router }], target: i0.ɵɵFactoryTarget.Injectable });
1616
+ ActGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ActGuard, providedIn: 'root' });
1617
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ActGuard, decorators: [{
1618
+ type: Injectable,
1619
+ args: [{
1620
+ providedIn: 'root'
1621
+ }]
1622
+ }], ctorParameters: function () { return [{ type: i1$3.YunzaiConfigService }, { type: i1$4.CacheService }, { type: i1$3.PathToRegexpService }, { type: i4$3.Router }]; } });
1623
+
1624
+ class YunzaiAuthService {
1625
+ constructor(injector) {
1626
+ this.injector = injector;
1627
+ this.config = mergeBisConfig(this.configService);
1628
+ }
1629
+ get configService() {
1630
+ return this.injector.get(YunzaiConfigService);
1631
+ }
1632
+ get tokenService() {
1633
+ return this.injector.get(YA_SERVICE_TOKEN);
1634
+ }
1635
+ get httpClient() {
1636
+ return this.injector.get(_HttpClient);
1637
+ }
1638
+ get cacheService() {
1639
+ return this.injector.get(CacheService);
1640
+ }
1641
+ askToken() {
1642
+ var _a;
1643
+ log$1('yz.auth.service: ', 'askToken');
1644
+ if ((_a = this.tokenService.get()) === null || _a === void 0 ? void 0 : _a.token) {
1645
+ return of(this.tokenService.get());
1646
+ }
1647
+ else {
1648
+ if (this.config.loginForm) {
1649
+ return this.fetchTokenByUP();
1650
+ }
1651
+ else {
1652
+ return this.fetchTokenByCas();
1653
+ }
1654
+ }
1655
+ }
1656
+ fetchTokenByUP() {
1657
+ log$1('yz.auth.service: ', 'fetchTokenByUP');
1658
+ return this.httpClient.post(`/auth/oauth/token?_allow_anonymous=true`, this.config.loginForm).pipe(map((response) => {
1659
+ const { access_token, expires_in, refresh_token, scope, token_type } = response;
1660
+ return {
1661
+ token: access_token,
1662
+ expired: expires_in,
1663
+ refreshToken: refresh_token,
1664
+ tokenType: token_type,
1665
+ scope
1666
+ };
1667
+ }));
1668
+ }
1669
+ fetchTokenByCas() {
1670
+ log$1('yz.auth.service: ', 'fetchTokenByCas');
1671
+ const uri = encodeURIComponent(this.injector.get(WINDOW).location.href);
1672
+ return this.httpClient
1673
+ .get(`/cas-proxy/app/validate_full?callback=${uri}&_allow_anonymous=true&timestamp=${new Date().getTime()}`)
1674
+ .pipe(map((response) => {
1675
+ switch (response.errcode) {
1676
+ case 2000:
1677
+ const { access_token, expires_in, refresh_token, scope, token_type } = response.data;
1678
+ return {
1679
+ token: access_token,
1680
+ expired: expires_in,
1681
+ refreshToken: refresh_token,
1682
+ tokenType: token_type,
1683
+ scope
1684
+ };
1685
+ case 2001:
1686
+ this.injector.get(WINDOW).location.href = response.msg;
1687
+ throw Error("Cookie Error: Can't find Cas Cookie,So jump to login!");
1688
+ default:
1689
+ if (response.data) {
1690
+ console.error(response.data);
1691
+ throw Error(response.data);
1692
+ }
1693
+ else if (response.msg) {
1694
+ console.error(response.msg);
1695
+ throw Error(response.msg);
1696
+ }
1697
+ else {
1698
+ console.error('cas unknown error');
1699
+ throw Error('Unknown Error: Cas auth exception!');
1700
+ }
1701
+ }
1702
+ }));
1703
+ }
1704
+ login() {
1705
+ log$1('yz.auth.service: ', 'login white login form->', this.config.loginForm);
1706
+ return this.askToken().pipe(mergeMap(token => {
1707
+ log$1('yz.auth.service: get token->', token);
1708
+ this.configService.set('auth', {
1709
+ token_send_key: 'Authorization',
1710
+ token_send_template: `${token.tokenType} \${token}`,
1711
+ token_send_place: 'header'
1712
+ });
1713
+ log$1('yz.auth.service: ', 'set token');
1714
+ this.tokenService.set(token);
1715
+ return this.cacheInit();
1716
+ }), mergeAll());
1717
+ }
1718
+ cacheInit() {
1719
+ log$1('yz.auth.service: ', 'cacheInit');
1720
+ const user = this.cacheService.get('_yz_user', { mode: 'none' });
1721
+ const header = this.cacheService.get('_yz_header', { mode: 'none' });
1722
+ const project = this.cacheService.get('_yz_project_info', { mode: 'none' });
1723
+ return forkJoin(of(user), of(header), of(project)).pipe(mergeMap(([u, h, p]) => {
1724
+ let list = [];
1725
+ // user cache
1726
+ if (!u) {
1727
+ log$1('yz.auth.service: ', 'fetch user cache');
1728
+ list.push(this.httpClient.get(`/auth/user`).pipe(map((user) => {
1729
+ this.cacheService.set('_yz_user', user.principal);
1730
+ })));
1731
+ }
1732
+ else {
1733
+ log$1('yz.auth.service: ', 'user recache');
1734
+ list.push(of(() => { }));
1735
+ }
1736
+ // header cache
1737
+ if (!h) {
1738
+ log$1('yz.auth.service: ', 'fetch header cache');
1739
+ list.push(this.httpClient.get(`/auth/allheader/v2`).pipe(map((header) => {
1740
+ this.cacheService.set('_yz_header', header.data);
1741
+ })));
1742
+ }
1743
+ else {
1744
+ log$1('yz.auth.service: ', 'header recache');
1745
+ list.push(of(() => { }));
1746
+ }
1747
+ // project cache
1748
+ if (!p) {
1749
+ log$1('yz.auth.service: ', 'fetch project cache');
1750
+ list.push(this.httpClient.get(`/app-manager/project/info`).pipe(map((info) => {
1751
+ this.cacheService.set('_yz_project_info', info.data);
1752
+ })));
1753
+ }
1754
+ else {
1755
+ log$1('yz.auth.service: ', 'project recache');
1756
+ list.push(of(() => { }));
1757
+ }
1758
+ return forkJoin(list);
1759
+ }));
1760
+ }
1761
+ }
1762
+ YunzaiAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiAuthService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
1763
+ YunzaiAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiAuthService, providedIn: 'root' });
1764
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiAuthService, decorators: [{
1765
+ type: Injectable,
1766
+ args: [{ providedIn: 'root' }]
1767
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
1768
+
1769
+ const CODEMESSAGE = {
1770
+ 200: '服务器成功返回请求的数据。',
1771
+ 201: '新建或修改数据成功。',
1772
+ 202: '一个请求已经进入后台排队(异步任务)。',
1773
+ 204: '删除数据成功。',
1774
+ 400: '发出的请求有错误,服务器没有进行新建或修改数据的操作。',
1775
+ 401: '用户没有权限(令牌、用户名、密码错误)。',
1776
+ 403: '用户得到授权,但是访问是被禁止的。',
1777
+ 404: '发出的请求针对的是不存在的记录,服务器没有进行操作。',
1778
+ 406: '请求的格式不可得。',
1779
+ 410: '请求的资源被永久删除,且不会再得到的。',
1780
+ 422: '当创建一个对象时,发生一个验证错误。',
1781
+ 500: '服务器发生错误,请检查服务器。',
1782
+ 502: '网关错误。',
1783
+ 503: '服务不可用,服务器暂时过载或维护。',
1784
+ 504: '网关超时。'
1785
+ };
1786
+ class YunzaiDefaultInterceptor {
1787
+ get notification() {
1788
+ return this.injector.get(NzNotificationService);
1789
+ }
1790
+ get tokenSrv() {
1791
+ return this.injector.get(YA_SERVICE_TOKEN);
1792
+ }
1793
+ get http() {
1794
+ return this.injector.get(_HttpClient);
1795
+ }
1796
+ get config() {
1797
+ return mergeBisConfig(this.injector.get(YunzaiConfigService$1));
1798
+ }
1799
+ goTo(url) {
1800
+ setTimeout(() => this.injector.get(Router).navigateByUrl(url));
1801
+ }
1802
+ constructor(injector) {
1803
+ this.injector = injector;
1804
+ this.jump = false;
1805
+ this.refreshToking = false;
1806
+ this.refreshToken$ = new BehaviorSubject(null);
1807
+ if (this.config.refreshTokenType === 'auth-refresh') {
1808
+ console.error("can't use auth-refresh, please change yz.default.interceptor to default.interceptor!");
1809
+ }
1810
+ }
1811
+ checkStatus(ev) {
1812
+ if ((ev.status >= 200 && ev.status < 300) || ev.status === 401) {
1813
+ return;
1814
+ }
1815
+ if (ev instanceof HttpErrorResponse && (ev.error.message || ev.error.errorMessage)) {
1816
+ if (ev.error.errorMessage) {
1817
+ this.notification.error(`发生了一些错误 `, ev.error.errorMessage);
1818
+ }
1819
+ else {
1820
+ this.notification.error(`发生了一些错误 `, ev.error.message);
1821
+ }
1822
+ return;
1823
+ }
1824
+ if (ev instanceof HttpResponse && ev.body.errorMessage) {
1825
+ this.notification.error(`发生了一些错误 `, ev.body.errorMessage);
1826
+ return;
1827
+ }
1828
+ const errortext = CODEMESSAGE[ev.status] || ev.statusText;
1829
+ this.notification.error(`请求错误 ${ev.status}: ${ev.url}`, errortext);
1830
+ }
1831
+ ToLogin() {
1832
+ this.notification.error(`未登录或登录状态已过期,5秒后将跳转到登录页面。`, ``);
1833
+ setTimeout(() => {
1834
+ localStorage.clear();
1835
+ this.injector.get(WINDOW).location.href = `${this.config.baseUrl}/cas-proxy/app/logout`;
1836
+ }, 5000);
1837
+ }
1838
+ reAttachToken(req) {
1839
+ var _a;
1840
+ const token = (_a = this.tokenSrv.get()) === null || _a === void 0 ? void 0 : _a.token;
1841
+ return req.clone({
1842
+ setHeaders: {
1843
+ Authorization: `Bearer ${token}`
1844
+ }
1845
+ });
1846
+ }
1847
+ refreshTokenRequest() {
1848
+ const model = this.tokenSrv.get();
1849
+ const form = new FormData();
1850
+ form.set('refresh_token', model === null || model === void 0 ? void 0 : model.refreshToken);
1851
+ form.set('grant_type', 'refresh_token');
1852
+ form.set('scope', 'webapp');
1853
+ log('yz.default.interceptor: use the refresh token to request a new token', model === null || model === void 0 ? void 0 : model.refreshToken);
1854
+ // return this.http.post(`/auth/user/token/refresh?_allow_anonymous=true`, form);
1855
+ return this.http.post(`/auth/oauth/getOrCreateToken/webapp`, form);
1856
+ }
1857
+ tryRefreshToken(ev, req, next) {
1858
+ // 连刷新Token的请求都错了,那就是真错了
1859
+ if (['/auth/oauth/getOrCreateToken/webapp'].some(url => req.url.includes(url))) {
1860
+ this.ToLogin();
1861
+ return throwError(() => ev);
1862
+ }
1863
+ // 正在刷新token,所有其他请求排队
1864
+ if (this.refreshToking) {
1865
+ return this.refreshToken$.pipe(filter(v => !!v), take(1), switchMap(() => next.handle(this.reAttachToken(req))));
1866
+ }
1867
+ //尝试调用刷新 Token
1868
+ this.refreshToking = true;
1869
+ this.refreshToken$.next(null);
1870
+ // 处理Token
1871
+ return this.refreshTokenRequest().pipe(switchMap(res => {
1872
+ log('yz.default.interceptor: refresh token accessed -> ', res);
1873
+ // 重新保存新 token
1874
+ const { access_token, expires_in, refresh_token, scope, token_type } = res;
1875
+ this.tokenSrv.set({
1876
+ token: access_token,
1877
+ expired: expires_in,
1878
+ refreshToken: refresh_token,
1879
+ tokenType: token_type,
1880
+ scope
1881
+ });
1882
+ // 通知后续请求继续执行
1883
+ this.refreshToking = false;
1884
+ this.refreshToken$.next(res);
1885
+ // 重新发起请求
1886
+ return next.handle(this.reAttachToken(req));
1887
+ }), catchError(err => {
1888
+ this.refreshToking = false;
1889
+ this.ToLogin();
1890
+ return throwError(() => err);
1891
+ }));
1892
+ }
1893
+ getAdditionalHeaders(headers) {
1894
+ const res = {};
1895
+ const lang = this.injector.get(YUNZAI_I18N_TOKEN).currentLang;
1896
+ if (!(headers === null || headers === void 0 ? void 0 : headers.has('Accept-Language')) && lang) {
1897
+ res['Accept-Language'] = lang;
1898
+ }
1899
+ return res;
1900
+ }
1901
+ handleData(ev, req, next) {
1902
+ this.checkStatus(ev);
1903
+ switch (ev.status) {
1904
+ case 200:
1905
+ return of(ev);
1906
+ case 401:
1907
+ if (this.config.refreshTokenEnabled && this.config.refreshTokenType === 're-request') {
1908
+ const unAuthorizationReq = req.clone();
1909
+ unAuthorizationReq.headers.delete('Authorization');
1910
+ return this.tryRefreshToken(ev, unAuthorizationReq, next);
1911
+ }
1912
+ this.ToLogin();
1913
+ break;
1914
+ case 403:
1915
+ case 404:
1916
+ case 500:
1917
+ if (this.jump) {
1918
+ this.goTo(`/exception/${ev.status}`);
1919
+ }
1920
+ break;
1921
+ default:
1922
+ if (ev instanceof HttpErrorResponse) {
1923
+ console.warn('未可知错误,大部分是由于后端不支持跨域CORS或无效配置引起,请参考 https://ng.yunzainfo.com/docs/server 解决跨域问题', ev);
1924
+ }
1925
+ break;
1926
+ }
1927
+ if (ev instanceof HttpErrorResponse) {
1928
+ return throwError(() => ev);
1929
+ }
1930
+ else {
1931
+ return of(ev);
1932
+ }
1933
+ }
1934
+ intercept(req, next) {
1935
+ if (req.context.get(ALLOW_ANONYMOUS))
1936
+ return next.handle(req);
1937
+ log('yz.default.interceptor.ts: ', 'request ', req);
1938
+ // 统一加前缀
1939
+ let url = req.url;
1940
+ if (!url.startsWith('https://') && !url.startsWith('http://')) {
1941
+ url = this.config.baseUrl + url;
1942
+ }
1943
+ if (url.includes('.json') && url.includes('assets')) {
1944
+ url = req.url;
1945
+ }
1946
+ // 加入语言头
1947
+ const newReq = req.clone({ url, setHeaders: this.getAdditionalHeaders(req.headers) });
1948
+ return next.handle(newReq).pipe(mergeMap(ev => {
1949
+ // 允许统一对请求错误处理
1950
+ if (ev instanceof HttpResponseBase) {
1951
+ return this.handleData(ev, newReq, next);
1952
+ }
1953
+ // 若一切都正常,则后续操作
1954
+ return of(ev);
1955
+ }), catchError((err) => this.handleData(err, newReq, next)));
1956
+ }
1957
+ }
1958
+ YunzaiDefaultInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiDefaultInterceptor, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
1959
+ YunzaiDefaultInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiDefaultInterceptor });
1960
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiDefaultInterceptor, decorators: [{
1961
+ type: Injectable
1962
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
1963
+
1964
+ const WIDGETS = [
1965
+ YunzaiClearStorageComponent,
1966
+ YunzaiFullScreenComponent,
1967
+ YunzaiI18NComponent,
1968
+ YunzaiNotifyComponent,
1969
+ YunzaiThemBtnComponent,
1970
+ YunzaiUserComponent
1971
+ ];
1972
+ const LAYOUT_NAV_COMPONENTS = [LayoutNavApplicationComponent, LayoutNavGroupComponent, LayoutNavTileComponent];
1973
+ const COMPONENTS = [YunzaiLayoutBasicComponent];
1974
+ class YunzaiLayoutModule {
1975
+ }
1976
+ YunzaiLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1977
+ YunzaiLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: YunzaiLayoutModule, declarations: [YunzaiLayoutBasicComponent, YunzaiClearStorageComponent,
1978
+ YunzaiFullScreenComponent,
1979
+ YunzaiI18NComponent,
1980
+ YunzaiNotifyComponent,
1981
+ YunzaiThemBtnComponent,
1982
+ YunzaiUserComponent, LayoutNavApplicationComponent, LayoutNavGroupComponent, LayoutNavTileComponent], imports: [HttpClientModule,
1983
+ CommonModule,
1984
+ FormsModule,
1985
+ RouterModule,
1986
+ ReactiveFormsModule,
1987
+ YunzaiSharedYelonModule,
1988
+ YunzaiSharedZorroModule], exports: [YunzaiLayoutBasicComponent, YunzaiClearStorageComponent,
1989
+ YunzaiFullScreenComponent,
1990
+ YunzaiI18NComponent,
1991
+ YunzaiNotifyComponent,
1992
+ YunzaiThemBtnComponent,
1993
+ YunzaiUserComponent, LayoutNavApplicationComponent, LayoutNavGroupComponent, LayoutNavTileComponent] });
1994
+ YunzaiLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiLayoutModule, providers: [
1995
+ {
1996
+ provide: YUNZAI_THEME_BTN_KEYS,
1997
+ useValue: 'site-theme'
1998
+ }
1999
+ ], imports: [HttpClientModule,
2000
+ CommonModule,
2001
+ FormsModule,
2002
+ RouterModule,
2003
+ ReactiveFormsModule,
2004
+ YunzaiSharedYelonModule,
2005
+ YunzaiSharedZorroModule] });
2006
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiLayoutModule, decorators: [{
2007
+ type: NgModule,
2008
+ args: [{
2009
+ imports: [
2010
+ HttpClientModule,
2011
+ CommonModule,
2012
+ FormsModule,
2013
+ RouterModule,
2014
+ ReactiveFormsModule,
2015
+ YunzaiSharedYelonModule,
2016
+ YunzaiSharedZorroModule
2017
+ ],
2018
+ providers: [
2019
+ {
2020
+ provide: YUNZAI_THEME_BTN_KEYS,
2021
+ useValue: 'site-theme'
2022
+ }
2023
+ ],
2024
+ declarations: [...COMPONENTS, ...WIDGETS, ...LAYOUT_NAV_COMPONENTS],
2025
+ exports: [...COMPONENTS, ...WIDGETS, ...LAYOUT_NAV_COMPONENTS]
2026
+ }]
2027
+ }] });
2028
+
2029
+ /*
2030
+ * Automatically generated by 'ng g ng-yunzai:plugin icon'
2031
+ * @see https://ng.yunzainfo.com/cli/plugin#icon
2032
+ */
2033
+ const ICONS = [
2034
+ AccountBookTwoTone,
2035
+ AccountBookFill,
2036
+ AccountBookOutline,
2037
+ AlertTwoTone,
2038
+ AlertFill,
2039
+ AlibabaOutline,
2040
+ AimOutline,
2041
+ AlipayCircleFill,
2042
+ AlertOutline,
2043
+ AlignCenterOutline,
2044
+ AlipayCircleOutline,
2045
+ AlipayOutline,
2046
+ AlignLeftOutline,
2047
+ AlignRightOutline,
2048
+ AmazonOutline,
2049
+ AliwangwangOutline,
2050
+ AliyunOutline,
2051
+ AlipaySquareFill,
2052
+ AmazonCircleFill,
2053
+ AndroidFill,
2054
+ AliwangwangFill,
2055
+ AntCloudOutline,
2056
+ AmazonSquareFill,
2057
+ AndroidOutline,
2058
+ ApartmentOutline,
2059
+ ApiTwoTone,
2060
+ ApiFill,
2061
+ ApiOutline,
2062
+ AntDesignOutline,
2063
+ AppstoreAddOutline,
2064
+ AppstoreFill,
2065
+ AppleOutline,
2066
+ AppstoreOutline,
2067
+ ArrowDownOutline,
2068
+ AppleFill,
2069
+ ArrowsAltOutline,
2070
+ AppstoreTwoTone,
2071
+ ArrowUpOutline,
2072
+ AreaChartOutline,
2073
+ ArrowLeftOutline,
2074
+ AudioFill,
2075
+ ArrowRightOutline,
2076
+ AudioTwoTone,
2077
+ AuditOutline,
2078
+ AudioMutedOutline,
2079
+ BackwardFill,
2080
+ AudioOutline,
2081
+ BackwardOutline,
2082
+ BankFill,
2083
+ BarcodeOutline,
2084
+ BellFill,
2085
+ BankTwoTone,
2086
+ BarsOutline,
2087
+ BankOutline,
2088
+ BehanceCircleFill,
2089
+ BehanceSquareFill,
2090
+ BoldOutline,
2091
+ BellOutline,
2092
+ BehanceOutline,
2093
+ BlockOutline,
2094
+ BehanceSquareOutline,
2095
+ BgColorsOutline,
2096
+ BellTwoTone,
2097
+ BarChartOutline,
2098
+ BookTwoTone,
2099
+ BookFill,
2100
+ BorderOuterOutline,
2101
+ BorderLeftOutline,
2102
+ BorderBottomOutline,
2103
+ BorderHorizontalOutline,
2104
+ BorderTopOutline,
2105
+ BorderOutline,
2106
+ BorderInnerOutline,
2107
+ BorderRightOutline,
2108
+ BoxPlotOutline,
2109
+ BoxPlotFill,
2110
+ BoxPlotTwoTone,
2111
+ BookOutline,
2112
+ BorderlessTableOutline,
2113
+ BorderVerticleOutline,
2114
+ BuildTwoTone,
2115
+ BuildOutline,
2116
+ BugFill,
2117
+ BugOutline,
2118
+ BugTwoTone,
2119
+ BulbFill,
2120
+ BulbTwoTone,
2121
+ BuildFill,
2122
+ BulbOutline,
2123
+ CalculatorFill,
2124
+ CalculatorTwoTone,
2125
+ CalendarFill,
2126
+ CalendarOutline,
2127
+ CalculatorOutline,
2128
+ CalendarTwoTone,
2129
+ CameraOutline,
2130
+ CameraFill,
2131
+ CameraTwoTone,
2132
+ CarTwoTone,
2133
+ CaretDownOutline,
2134
+ CarOutline,
2135
+ CaretLeftFill,
2136
+ CarFill,
2137
+ CaretRightOutline,
2138
+ CaretDownFill,
2139
+ CaretUpOutline,
2140
+ CaretRightFill,
2141
+ CarryOutFill,
2142
+ CarryOutOutline,
2143
+ CaretLeftOutline,
2144
+ CaretUpFill,
2145
+ BranchesOutline,
2146
+ CarryOutTwoTone,
2147
+ CheckCircleFill,
2148
+ CheckCircleOutline,
2149
+ CheckSquareOutline,
2150
+ CheckCircleTwoTone,
2151
+ CiCircleTwoTone,
2152
+ CheckOutline,
2153
+ CheckSquareTwoTone,
2154
+ CiOutline,
2155
+ CheckSquareFill,
2156
+ CiTwoTone,
2157
+ ChromeOutline,
2158
+ ClockCircleOutline,
2159
+ CiCircleOutline,
2160
+ ChromeFill,
2161
+ ClearOutline,
2162
+ CloseCircleTwoTone,
2163
+ CiCircleFill,
2164
+ CloseCircleOutline,
2165
+ ClockCircleFill,
2166
+ CloseCircleFill,
2167
+ ClockCircleTwoTone,
2168
+ CloseOutline,
2169
+ CloseSquareOutline,
2170
+ CloseSquareFill,
2171
+ CloudFill,
2172
+ CloseSquareTwoTone,
2173
+ CloudDownloadOutline,
2174
+ CloudTwoTone,
2175
+ CloudServerOutline,
2176
+ CloudUploadOutline,
2177
+ CloudSyncOutline,
2178
+ ClusterOutline,
2179
+ CodeSandboxCircleFill,
2180
+ CodeFill,
2181
+ CodepenCircleOutline,
2182
+ CloudOutline,
2183
+ CodeSandboxOutline,
2184
+ CodeOutline,
2185
+ CodeSandboxSquareFill,
2186
+ CodeTwoTone,
2187
+ CodepenSquareFill,
2188
+ CodepenOutline,
2189
+ CoffeeOutline,
2190
+ ColumnWidthOutline,
2191
+ CompressOutline,
2192
+ ColumnHeightOutline,
2193
+ CodepenCircleFill,
2194
+ CompassTwoTone,
2195
+ CommentOutline,
2196
+ ContainerFill,
2197
+ CompassOutline,
2198
+ ConsoleSqlOutline,
2199
+ ContactsOutline,
2200
+ ContainerTwoTone,
2201
+ ContactsFill,
2202
+ ContactsTwoTone,
2203
+ ContainerOutline,
2204
+ ControlFill,
2205
+ CopyFill,
2206
+ CopyOutline,
2207
+ CompassFill,
2208
+ CopyTwoTone,
2209
+ CopyrightOutline,
2210
+ CopyrightCircleOutline,
2211
+ ControlTwoTone,
2212
+ ControlOutline,
2213
+ CreditCardFill,
2214
+ CopyrightTwoTone,
2215
+ CrownFill,
2216
+ CopyrightCircleFill,
2217
+ CrownOutline,
2218
+ CustomerServiceTwoTone,
2219
+ CreditCardOutline,
2220
+ CustomerServiceOutline,
2221
+ DashboardTwoTone,
2222
+ CrownTwoTone,
2223
+ CreditCardTwoTone,
2224
+ CustomerServiceFill,
2225
+ DashboardFill,
2226
+ DashOutline,
2227
+ DatabaseOutline,
2228
+ DatabaseTwoTone,
2229
+ DatabaseFill,
2230
+ DashboardOutline,
2231
+ DeleteTwoTone,
2232
+ DeleteRowOutline,
2233
+ DeleteColumnOutline,
2234
+ DeliveredProcedureOutline,
2235
+ DeleteOutline,
2236
+ CopyrightCircleTwoTone,
2237
+ DesktopOutline,
2238
+ DeleteFill,
2239
+ DiffOutline,
2240
+ DiffFill,
2241
+ DeploymentUnitOutline,
2242
+ DiffTwoTone,
2243
+ DingtalkOutline,
2244
+ DollarCircleFill,
2245
+ DislikeFill,
2246
+ DingtalkSquareFill,
2247
+ DisconnectOutline,
2248
+ DollarCircleTwoTone,
2249
+ DollarOutline,
2250
+ DingtalkCircleFill,
2251
+ DislikeTwoTone,
2252
+ DollarTwoTone,
2253
+ DownCircleFill,
2254
+ DislikeOutline,
2255
+ DollarCircleOutline,
2256
+ DoubleLeftOutline,
2257
+ DownSquareFill,
2258
+ DownOutline,
2259
+ DownSquareOutline,
2260
+ DownSquareTwoTone,
2261
+ DownCircleTwoTone,
2262
+ DoubleRightOutline,
2263
+ DownCircleOutline,
2264
+ DownloadOutline,
2265
+ DotChartOutline,
2266
+ DribbbleCircleFill,
2267
+ DribbbleOutline,
2268
+ DribbbleSquareOutline,
2269
+ DropboxCircleFill,
2270
+ DingdingOutline,
2271
+ EditOutline,
2272
+ DribbbleSquareFill,
2273
+ DropboxSquareFill,
2274
+ EllipsisOutline,
2275
+ EnvironmentFill,
2276
+ EditFill,
2277
+ EnterOutline,
2278
+ EuroCircleFill,
2279
+ EuroTwoTone,
2280
+ EuroCircleOutline,
2281
+ EditTwoTone,
2282
+ EuroOutline,
2283
+ EnvironmentTwoTone,
2284
+ ExclamationCircleFill,
2285
+ ExpandAltOutline,
2286
+ EuroCircleTwoTone,
2287
+ ExclamationCircleTwoTone,
2288
+ EnvironmentOutline,
2289
+ ExperimentOutline,
2290
+ ExperimentFill,
2291
+ ExpandOutline,
2292
+ ExceptionOutline,
2293
+ ExportOutline,
2294
+ ExperimentTwoTone,
2295
+ ExclamationCircleOutline,
2296
+ ExclamationOutline,
2297
+ EyeFill,
2298
+ EyeInvisibleFill,
2299
+ EyeInvisibleTwoTone,
2300
+ DropboxOutline,
2301
+ DragOutline,
2302
+ FacebookOutline,
2303
+ FacebookFill,
2304
+ EyeTwoTone,
2305
+ EyeOutline,
2306
+ FastForwardFill,
2307
+ FieldBinaryOutline,
2308
+ FieldNumberOutline,
2309
+ FastBackwardOutline,
2310
+ FileAddFill,
2311
+ FastBackwardFill,
2312
+ FileExcelFill,
2313
+ FastForwardOutline,
2314
+ FieldStringOutline,
2315
+ FileDoneOutline,
2316
+ FileAddTwoTone,
2317
+ FileExcelTwoTone,
2318
+ FileExclamationFill,
2319
+ FileAddOutline,
2320
+ FileExclamationOutline,
2321
+ FieldTimeOutline,
2322
+ FileImageTwoTone,
2323
+ FileExcelOutline,
2324
+ FileExclamationTwoTone,
2325
+ FileImageFill,
2326
+ FileGifOutline,
2327
+ FileFill,
2328
+ FileMarkdownTwoTone,
2329
+ FileMarkdownOutline,
2330
+ FallOutline,
2331
+ FileImageOutline,
2332
+ EyeInvisibleOutline,
2333
+ FilePdfOutline,
2334
+ FileSearchOutline,
2335
+ FilePptTwoTone,
2336
+ FilePdfTwoTone,
2337
+ FileJpgOutline,
2338
+ FileTextFill,
2339
+ FilePptOutline,
2340
+ FileSyncOutline,
2341
+ FilePptFill,
2342
+ FileUnknownOutline,
2343
+ FileProtectOutline,
2344
+ FileTextTwoTone,
2345
+ FileWordFill,
2346
+ FileUnknownTwoTone,
2347
+ FileWordTwoTone,
2348
+ FileUnknownFill,
2349
+ FileTextOutline,
2350
+ FileZipFill,
2351
+ FilterTwoTone,
2352
+ FilterFill,
2353
+ FileWordOutline,
2354
+ FireOutline,
2355
+ FireTwoTone,
2356
+ FileZipOutline,
2357
+ FilterOutline,
2358
+ FlagTwoTone,
2359
+ FileTwoTone,
2360
+ FilePdfFill,
2361
+ FileOutline,
2362
+ FileMarkdownFill,
2363
+ FileZipTwoTone,
2364
+ FlagOutline,
2365
+ FolderAddTwoTone,
2366
+ FolderOpenFill,
2367
+ FireFill,
2368
+ FlagFill,
2369
+ FolderOutline,
2370
+ FolderViewOutline,
2371
+ FolderTwoTone,
2372
+ FontColorsOutline,
2373
+ FolderOpenTwoTone,
2374
+ FolderFill,
2375
+ ForwardOutline,
2376
+ FolderOpenOutline,
2377
+ ForkOutline,
2378
+ ForwardFill,
2379
+ FormatPainterOutline,
2380
+ FormatPainterFill,
2381
+ FormOutline,
2382
+ FrownFill,
2383
+ FrownTwoTone,
2384
+ FullscreenOutline,
2385
+ FontSizeOutline,
2386
+ FundFill,
2387
+ FunctionOutline,
2388
+ FundViewOutline,
2389
+ FullscreenExitOutline,
2390
+ GifOutline,
2391
+ FundProjectionScreenOutline,
2392
+ FundTwoTone,
2393
+ FolderAddFill,
2394
+ FunnelPlotTwoTone,
2395
+ GiftOutline,
2396
+ FunnelPlotFill,
2397
+ FundOutline,
2398
+ FrownOutline,
2399
+ GithubOutline,
2400
+ GoldFill,
2401
+ FolderAddOutline,
2402
+ GitlabFill,
2403
+ GiftFill,
2404
+ GitlabOutline,
2405
+ GoldTwoTone,
2406
+ GoogleCircleFill,
2407
+ GiftTwoTone,
2408
+ GooglePlusCircleFill,
2409
+ GoldOutline,
2410
+ GithubFill,
2411
+ GoogleOutline,
2412
+ GooglePlusOutline,
2413
+ GoogleSquareFill,
2414
+ GoldenFill,
2415
+ HddTwoTone,
2416
+ GooglePlusSquareFill,
2417
+ GlobalOutline,
2418
+ HeartOutline,
2419
+ HeartTwoTone,
2420
+ GroupOutline,
2421
+ HeartFill,
2422
+ HeatMapOutline,
2423
+ GatewayOutline,
2424
+ FunnelPlotOutline,
2425
+ HddFill,
2426
+ HomeFill,
2427
+ HighlightFill,
2428
+ HomeOutline,
2429
+ HistoryOutline,
2430
+ HighlightOutline,
2431
+ HddOutline,
2432
+ HourglassFill,
2433
+ HomeTwoTone,
2434
+ HourglassTwoTone,
2435
+ Html5Outline,
2436
+ Html5Fill,
2437
+ IdcardFill,
2438
+ Html5TwoTone,
2439
+ HourglassOutline,
2440
+ IdcardTwoTone,
2441
+ IdcardOutline,
2442
+ IeOutline,
2443
+ IeCircleFill,
2444
+ IeSquareFill,
2445
+ InboxOutline,
2446
+ ImportOutline,
2447
+ InfoCircleOutline,
2448
+ InfoCircleTwoTone,
2449
+ InsertRowAboveOutline,
2450
+ InsertRowRightOutline,
2451
+ InfoCircleFill,
2452
+ InfoOutline,
2453
+ InsertRowBelowOutline,
2454
+ HighlightTwoTone,
2455
+ InsuranceFill,
2456
+ InstagramFill,
2457
+ InteractionFill,
2458
+ InsertRowLeftOutline,
2459
+ InstagramOutline,
2460
+ InteractionOutline,
2461
+ ItalicOutline,
2462
+ InteractionTwoTone,
2463
+ LayoutOutline,
2464
+ IssuesCloseOutline,
2465
+ LayoutFill,
2466
+ LaptopOutline,
2467
+ LeftCircleFill,
2468
+ LayoutTwoTone,
2469
+ KeyOutline,
2470
+ LeftOutline,
2471
+ LeftCircleOutline,
2472
+ LeftSquareOutline,
2473
+ LeftSquareFill,
2474
+ LeftCircleTwoTone,
2475
+ LikeFill,
2476
+ LeftSquareTwoTone,
2477
+ LineOutline,
2478
+ LikeTwoTone,
2479
+ LinkedinOutline,
2480
+ LineChartOutline,
2481
+ LineHeightOutline,
2482
+ LinkedinFill,
2483
+ LinkOutline,
2484
+ LikeOutline,
2485
+ InsuranceOutline,
2486
+ Loading3QuartersOutline,
2487
+ LockFill,
2488
+ InsuranceTwoTone,
2489
+ MacCommandOutline,
2490
+ LockTwoTone,
2491
+ LoadingOutline,
2492
+ MailOutline,
2493
+ LoginOutline,
2494
+ MedicineBoxOutline,
2495
+ MailFill,
2496
+ MailTwoTone,
2497
+ MacCommandFill,
2498
+ ManOutline,
2499
+ MedicineBoxFill,
2500
+ MedicineBoxTwoTone,
2501
+ MediumCircleFill,
2502
+ MediumOutline,
2503
+ MehFill,
2504
+ MediumWorkmarkOutline,
2505
+ MenuFoldOutline,
2506
+ MehOutline,
2507
+ MediumSquareFill,
2508
+ MessageTwoTone,
2509
+ MehTwoTone,
2510
+ MergeCellsOutline,
2511
+ MinusCircleFill,
2512
+ MenuOutline,
2513
+ MenuUnfoldOutline,
2514
+ MessageFill,
2515
+ MinusCircleTwoTone,
2516
+ LockOutline,
2517
+ MinusOutline,
2518
+ MinusCircleOutline,
2519
+ LogoutOutline,
2520
+ MessageOutline,
2521
+ MoneyCollectFill,
2522
+ MinusSquareOutline,
2523
+ MinusSquareTwoTone,
2524
+ MobileOutline,
2525
+ MobileTwoTone,
2526
+ MoneyCollectOutline,
2527
+ MoreOutline,
2528
+ NotificationFill,
2529
+ NotificationOutline,
2530
+ MoneyCollectTwoTone,
2531
+ NodeIndexOutline,
2532
+ NodeExpandOutline,
2533
+ MonitorOutline,
2534
+ OrderedListOutline,
2535
+ NodeCollapseOutline,
2536
+ NumberOutline,
2537
+ PaperClipOutline,
2538
+ NotificationTwoTone,
2539
+ PauseCircleFill,
2540
+ PartitionOutline,
2541
+ PauseOutline,
2542
+ OneToOneOutline,
2543
+ PayCircleOutline,
2544
+ PayCircleFill,
2545
+ MinusSquareFill,
2546
+ PauseCircleOutline,
2547
+ PauseCircleTwoTone,
2548
+ PicCenterOutline,
2549
+ PicRightOutline,
2550
+ PercentageOutline,
2551
+ MobileFill,
2552
+ PictureOutline,
2553
+ PictureFill,
2554
+ PhoneTwoTone,
2555
+ PhoneFill,
2556
+ PieChartFill,
2557
+ PictureTwoTone,
2558
+ PieChartOutline,
2559
+ PlaySquareFill,
2560
+ PlayCircleTwoTone,
2561
+ PlayCircleFill,
2562
+ PlusCircleFill,
2563
+ PlaySquareTwoTone,
2564
+ PlaySquareOutline,
2565
+ PlayCircleOutline,
2566
+ PieChartTwoTone,
2567
+ PlusCircleOutline,
2568
+ PlusSquareFill,
2569
+ PoundCircleFill,
2570
+ PlusSquareOutline,
2571
+ PlusOutline,
2572
+ PoundOutline,
2573
+ PoundCircleOutline,
2574
+ PlusSquareTwoTone,
2575
+ PlusCircleTwoTone,
2576
+ PoweroffOutline,
2577
+ PoundCircleTwoTone,
2578
+ PhoneOutline,
2579
+ PrinterFill,
2580
+ PicLeftOutline,
2581
+ ProjectTwoTone,
2582
+ PrinterOutline,
2583
+ ProjectFill,
2584
+ ProfileOutline,
2585
+ ProfileTwoTone,
2586
+ ProjectOutline,
2587
+ PropertySafetyFill,
2588
+ PullRequestOutline,
2589
+ PropertySafetyOutline,
2590
+ PushpinOutline,
2591
+ PushpinTwoTone,
2592
+ PropertySafetyTwoTone,
2593
+ PushpinFill,
2594
+ QqOutline,
2595
+ QqCircleFill,
2596
+ QrcodeOutline,
2597
+ QqSquareFill,
2598
+ QuestionCircleTwoTone,
2599
+ QuestionCircleFill,
2600
+ RadarChartOutline,
2601
+ RadiusUprightOutline,
2602
+ QuestionCircleOutline,
2603
+ QuestionOutline,
2604
+ ReadFill,
2605
+ RadiusUpleftOutline,
2606
+ RadiusBottomleftOutline,
2607
+ RadiusSettingOutline,
2608
+ RadiusBottomrightOutline,
2609
+ ProfileFill,
2610
+ PrinterTwoTone,
2611
+ ReadOutline,
2612
+ ReconciliationFill,
2613
+ ReloadOutline,
2614
+ ReconciliationOutline,
2615
+ RedEnvelopeTwoTone,
2616
+ RedditCircleFill,
2617
+ RedoOutline,
2618
+ RedEnvelopeFill,
2619
+ RedditOutline,
2620
+ RestTwoTone,
2621
+ RightCircleOutline,
2622
+ RestOutline,
2623
+ RedditSquareFill,
2624
+ RestFill,
2625
+ RightCircleTwoTone,
2626
+ RightOutline,
2627
+ RightSquareFill,
2628
+ RightCircleFill,
2629
+ RightSquareOutline,
2630
+ RetweetOutline,
2631
+ RiseOutline,
2632
+ RightSquareTwoTone,
2633
+ RobotFill,
2634
+ RocketOutline,
2635
+ RobotOutline,
2636
+ RocketTwoTone,
2637
+ RocketFill,
2638
+ RedEnvelopeOutline,
2639
+ RollbackOutline,
2640
+ RotateRightOutline,
2641
+ RotateLeftOutline,
2642
+ ReconciliationTwoTone,
2643
+ SafetyCertificateTwoTone,
2644
+ SaveOutline,
2645
+ SafetyOutline,
2646
+ SaveFill,
2647
+ SaveTwoTone,
2648
+ ScheduleFill,
2649
+ SafetyCertificateOutline,
2650
+ ScanOutline,
2651
+ ScheduleTwoTone,
2652
+ SearchOutline,
2653
+ ScheduleOutline,
2654
+ SecurityScanTwoTone,
2655
+ SecurityScanOutline,
2656
+ ScissorOutline,
2657
+ SelectOutline,
2658
+ SecurityScanFill,
2659
+ SendOutline,
2660
+ SettingOutline,
2661
+ SettingTwoTone,
2662
+ SettingFill,
2663
+ ShareAltOutline,
2664
+ ShopOutline,
2665
+ ShopFill,
2666
+ ShopTwoTone,
2667
+ ShrinkOutline,
2668
+ ShakeOutline,
2669
+ ShoppingOutline,
2670
+ ShoppingCartOutline,
2671
+ ShoppingFill,
2672
+ SisternodeOutline,
2673
+ ShoppingTwoTone,
2674
+ SafetyCertificateFill,
2675
+ SkinOutline,
2676
+ SignalFill,
2677
+ SketchOutline,
2678
+ SkinTwoTone,
2679
+ SketchSquareFill,
2680
+ SkypeFill,
2681
+ SkinFill,
2682
+ SlackCircleFill,
2683
+ SlackSquareFill,
2684
+ SlidersTwoTone,
2685
+ SkypeOutline,
2686
+ SlidersFill,
2687
+ SlackSquareOutline,
2688
+ SmallDashOutline,
2689
+ SmileTwoTone,
2690
+ SlidersOutline,
2691
+ SnippetsFill,
2692
+ SnippetsOutline,
2693
+ SmileOutline,
2694
+ SolutionOutline,
2695
+ SlackOutline,
2696
+ SnippetsTwoTone,
2697
+ SoundTwoTone,
2698
+ SortAscendingOutline,
2699
+ SoundFill,
2700
+ SortDescendingOutline,
2701
+ SmileFill,
2702
+ SoundOutline,
2703
+ SplitCellsOutline,
2704
+ SketchCircleFill,
2705
+ StarOutline,
2706
+ StockOutline,
2707
+ StarTwoTone,
2708
+ StepForwardFill,
2709
+ StarFill,
2710
+ StepBackwardFill,
2711
+ StepForwardOutline,
2712
+ StopFill,
2713
+ SubnodeOutline,
2714
+ SwapLeftOutline,
2715
+ StopOutline,
2716
+ StopTwoTone,
2717
+ SwapRightOutline,
2718
+ SwapOutline,
2719
+ SwitcherTwoTone,
2720
+ SwitcherOutline,
2721
+ SyncOutline,
2722
+ StrikethroughOutline,
2723
+ SwitcherFill,
2724
+ TagOutline,
2725
+ TabletTwoTone,
2726
+ TabletOutline,
2727
+ TabletFill,
2728
+ TableOutline,
2729
+ TagsFill,
2730
+ TagFill,
2731
+ TagsTwoTone,
2732
+ TaobaoCircleOutline,
2733
+ StepBackwardOutline,
2734
+ TagsOutline,
2735
+ TagTwoTone,
2736
+ TaobaoOutline,
2737
+ ThunderboltOutline,
2738
+ TaobaoSquareFill,
2739
+ TeamOutline,
2740
+ TaobaoCircleFill,
2741
+ ThunderboltTwoTone,
2742
+ ToolFill,
2743
+ ThunderboltFill,
2744
+ ToTopOutline,
2745
+ ToolOutline,
2746
+ ToolTwoTone,
2747
+ TrademarkCircleFill,
2748
+ TrophyFill,
2749
+ TrademarkCircleTwoTone,
2750
+ TransactionOutline,
2751
+ TrademarkCircleOutline,
2752
+ TranslationOutline,
2753
+ TwitterCircleFill,
2754
+ TrophyOutline,
2755
+ TrademarkOutline,
2756
+ TrophyTwoTone,
2757
+ TwitterSquareFill,
2758
+ UnlockFill,
2759
+ TwitterOutline,
2760
+ UnderlineOutline,
2761
+ UndoOutline,
2762
+ UpCircleFill,
2763
+ UngroupOutline,
2764
+ UnlockTwoTone,
2765
+ UnlockOutline,
2766
+ UpOutline,
2767
+ UsbFill,
2768
+ UpCircleOutline,
2769
+ UnorderedListOutline,
2770
+ UpCircleTwoTone,
2771
+ UpSquareFill,
2772
+ UpSquareOutline,
2773
+ UserAddOutline,
2774
+ UsbTwoTone,
2775
+ UsergroupDeleteOutline,
2776
+ UpSquareTwoTone,
2777
+ UserOutline,
2778
+ UsbOutline,
2779
+ UserDeleteOutline,
2780
+ UserSwitchOutline,
2781
+ VerticalLeftOutline,
2782
+ VerticalAlignBottomOutline,
2783
+ VerifiedOutline,
2784
+ UsergroupAddOutline,
2785
+ UploadOutline,
2786
+ VerticalAlignMiddleOutline,
2787
+ VerticalAlignTopOutline,
2788
+ VerticalRightOutline,
2789
+ VideoCameraOutline,
2790
+ VideoCameraAddOutline,
2791
+ VideoCameraTwoTone,
2792
+ VideoCameraFill,
2793
+ WalletOutline,
2794
+ WalletFill,
2795
+ WarningFill,
2796
+ WarningOutline,
2797
+ WechatOutline,
2798
+ WalletTwoTone,
2799
+ WeiboCircleFill,
2800
+ WarningTwoTone,
2801
+ WeiboSquareFill,
2802
+ WeiboOutline,
2803
+ WeiboSquareOutline,
2804
+ WeiboCircleOutline,
2805
+ WechatFill,
2806
+ WhatsAppOutline,
2807
+ WifiOutline,
2808
+ WomanOutline,
2809
+ YoutubeFill,
2810
+ YahooOutline,
2811
+ WindowsFill,
2812
+ WindowsOutline,
2813
+ YoutubeOutline,
2814
+ YuqueOutline,
2815
+ ZhihuCircleFill,
2816
+ YuqueFill,
2817
+ ZhihuOutline,
2818
+ ZhihuSquareFill,
2819
+ ZoomInOutline,
2820
+ ZoomOutOutline,
2821
+ YahooFill
2822
+ ];
2823
+
2824
+ class YunzaiStartupService {
2825
+ constructor(iconSrv, menuService, i18n, win, settingService, aclService, titleService, yzAuthService, cacheService, configService) {
2826
+ this.menuService = menuService;
2827
+ this.i18n = i18n;
2828
+ this.win = win;
2829
+ this.settingService = settingService;
2830
+ this.aclService = aclService;
2831
+ this.titleService = titleService;
2832
+ this.yzAuthService = yzAuthService;
2833
+ this.cacheService = cacheService;
2834
+ this.configService = configService;
2835
+ this.config = BUSINESS_DEFAULT_CONFIG;
2836
+ this.config = mergeBisConfig(this.configService);
2837
+ iconSrv.addIcon(...ICONS);
2838
+ }
2839
+ load() {
2840
+ log$1('startup.service: ', 'load');
2841
+ const defaultLang = this.i18n.defaultLang;
2842
+ return this.i18n.loadLangData(defaultLang).pipe(mergeMap(langData => {
2843
+ log$1('startup.service: ', 'set i18n, defaultLang->', defaultLang, ' langData->', langData);
2844
+ this.i18n.use(defaultLang, langData);
2845
+ return of(null);
2846
+ }), mergeMap(() => {
2847
+ return this.yzAuthService.login();
2848
+ }), mergeMap(v => {
2849
+ // preloader finish
2850
+ this.systemInit();
2851
+ log$1('startup.service: preloader finish');
2852
+ if (this.win && this.win.appBootstrap) {
2853
+ this.win.appBootstrap();
2854
+ }
2855
+ return of(v);
2856
+ }));
2857
+ }
2858
+ systemInit() {
2859
+ log$1('startup.service: system init');
2860
+ // user
2861
+ const yunzaiUser = this.cacheService.get('_yz_user', { mode: 'none' });
2862
+ // menu
2863
+ const yunzaiMenus = deepCopy(yunzaiUser.menu).filter(m => m.systemCode && m.systemCode === this.config.systemCode);
2864
+ mapYzSideToYelonMenu(yunzaiMenus);
2865
+ const currentMenu = yunzaiMenus.pop();
2866
+ if (currentMenu) {
2867
+ // logo app
2868
+ this.settingService.setApp({ name: currentMenu.text, description: currentMenu.intro });
2869
+ this.settingService.setUser({
2870
+ name: yunzaiUser.realname,
2871
+ avatar: `${this.config.baseUrl}/filecenter/file/${yunzaiUser.avatarId}` || '',
2872
+ email: yunzaiUser.email
2873
+ });
2874
+ // title
2875
+ this.titleService.default = currentMenu && currentMenu.text ? currentMenu.text : 'default application name';
2876
+ this.titleService.setTitle(currentMenu && currentMenu.text ? currentMenu.text : 'no title');
2877
+ // acl
2878
+ const abilities = [];
2879
+ generateAbility([currentMenu], abilities, '');
2880
+ this.aclService.attachRole((yunzaiUser === null || yunzaiUser === void 0 ? void 0 : yunzaiUser.roles.map((role) => {
2881
+ return role.roleValue;
2882
+ }).filter((a) => !!a)) || []);
2883
+ this.aclService.attachAbility(abilities);
2884
+ // aside menu
2885
+ this.menuService.add([currentMenu]);
2886
+ // cache current
2887
+ this.cacheService.set('_yz_current', {
2888
+ name: currentMenu.text,
2889
+ intro: currentMenu.intro || '',
2890
+ icon: currentMenu.appIconUrl || './assets/tmp/img/avatar.jpg'
2891
+ });
2892
+ // cache displayIndex
2893
+ const attributes = currentMenu.attribute;
2894
+ if (attributes) {
2895
+ const attr = JSON.parse(attributes);
2896
+ if (attr && attr.defaultRoute) {
2897
+ this.cacheService.set('_yz_defaultRoute', attr.defaultRoute);
2898
+ }
2899
+ else {
2900
+ this.cacheService.set('_yz_defaultRoute', '/displayIndex');
2901
+ }
2902
+ }
2903
+ else {
2904
+ this.cacheService.set('_yz_defaultRoute', '/displayIndex');
2905
+ }
2906
+ }
2907
+ }
2908
+ }
2909
+ YunzaiStartupService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiStartupService, deps: [{ token: i8.NzIconService }, { token: i1$2.MenuService }, { token: YUNZAI_I18N_TOKEN }, { token: WINDOW }, { token: i1$2.SettingsService }, { token: i3$4.ACLService }, { token: i1$2.TitleService }, { token: YunzaiAuthService }, { token: i1$4.CacheService }, { token: i1$3.YunzaiConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
2910
+ YunzaiStartupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiStartupService });
2911
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiStartupService, decorators: [{
2912
+ type: Injectable
2913
+ }], ctorParameters: function () {
2914
+ return [{ type: i8.NzIconService }, { type: i1$2.MenuService }, { type: YunzaiI18NService, decorators: [{
2915
+ type: Inject,
2916
+ args: [YUNZAI_I18N_TOKEN]
2917
+ }] }, { type: undefined, decorators: [{
2918
+ type: Inject,
2919
+ args: [WINDOW]
2920
+ }] }, { type: i1$2.SettingsService }, { type: i3$4.ACLService }, { type: i1$2.TitleService }, { type: YunzaiAuthService }, { type: i1$4.CacheService }, { type: i1$3.YunzaiConfigService }];
2921
+ } });
2922
+ function mapYzSideToYelonMenu(menus) {
2923
+ menus.forEach(menu => {
2924
+ menu.badgeDot = menu.badge_dot || null;
2925
+ menu.badgeStatus = menu.badge_status || null;
2926
+ menu.shortcutRoot = menu.shortcut_root || null;
2927
+ menu.reuse = true;
2928
+ if (menu.children) {
2929
+ mapYzSideToYelonMenu(menu.children);
2930
+ }
2931
+ });
2932
+ }
2933
+ function generateAbility(menus, abilities, prefix) {
2934
+ menus.forEach(menu => {
2935
+ if (menu.link) {
2936
+ prefix += menu.link;
2937
+ }
2938
+ else {
2939
+ prefix += '';
2940
+ }
2941
+ if (menu.menuAuths) {
2942
+ menu.menuAuths.forEach((a) => {
2943
+ abilities.push(`${prefix}:${a}`);
2944
+ abilities.push(a);
2945
+ });
2946
+ }
2947
+ if (menu.children) {
2948
+ generateAbility(menu.children, abilities, prefix);
2949
+ }
2950
+ });
2951
+ }
2952
+ function YunzaiStartupServiceFactory(startupService) {
2953
+ return () => startupService.load();
2954
+ }
2955
+ //@ts-ignore
2956
+ const YUNZAI_APPINIT_PROVIDES = [
2957
+ YunzaiStartupService,
2958
+ {
2959
+ provide: APP_INITIALIZER,
2960
+ useFactory: YunzaiStartupServiceFactory,
2961
+ deps: [YunzaiStartupService],
2962
+ multi: true
2963
+ }
2964
+ ];
2965
+
2966
+ /**
2967
+ * Generated bundle index. Do not edit.
2968
+ */
2969
+
2970
+ export { ActGuard, BUSINESS_DEFAULT_CONFIG, LayoutDisplayService, LayoutNavApplicationComponent, LayoutNavGroupComponent, LayoutNavTileComponent, NavType, TopicType, YUNZAI_APPINIT_PROVIDES, YUNZAI_APPINIT_PROVIDES as YZ_APPINIT_PROVIDES, YunzaiAuthService, YunzaiClearStorageComponent, YunzaiDefaultInterceptor, YunzaiFullScreenComponent, YunzaiI18NComponent, YunzaiI18NService, YunzaiLayoutBasicComponent, YunzaiLayoutModule, YunzaiNotifyComponent, YunzaiStartupService, YunzaiStartupServiceFactory, YunzaiThemBtnComponent, YunzaiUserComponent, YunzaiAuthService as YzAuthService, YunzaiDefaultInterceptor as YzDefaultInterceptor, YunzaiI18NService as YzI18NService, YunzaiLayoutBasicComponent as YzLayoutBasicComponent, YunzaiStartupService as YzStartupService, YunzaiStartupServiceFactory as YzStartupServiceFactory, generateAbility, mapYzSideToYelonMenu, mergeBisConfig };
2971
+ //# sourceMappingURL=layout.mjs.map