@yelon/bis 15.0.0-beta.3 → 15.0.0-beta.5

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