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