@yelon/bis 14.1.1 → 15.0.0-beta.0

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 (119) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +23 -1
  3. package/esm2020/bis.mjs +2 -2
  4. package/esm2020/index.mjs +2 -0
  5. package/esm2020/public_api.mjs +2 -2
  6. package/esm2020/src/bis.config.mjs +11 -0
  7. package/esm2020/src/icon/style-icons.mjs +796 -0
  8. package/esm2020/src/index.mjs +12 -0
  9. package/esm2020/src/layout-basic/index.mjs +4 -0
  10. package/esm2020/src/layout-basic/interface.mjs +7 -0
  11. package/esm2020/src/layout-basic/layout-basic.component.mjs +312 -0
  12. package/esm2020/src/layout-basic/layout-display.service.mjs +87 -0
  13. package/esm2020/src/layout-nav/index.mjs +5 -0
  14. package/esm2020/src/layout-nav/layout-nav-application.component.mjs +262 -0
  15. package/esm2020/{layout/widgets/yz.application.group.component.mjs → src/layout-nav/layout-nav-group.component.mjs} +23 -21
  16. package/esm2020/src/layout-nav/layout-nav-tile.component.mjs +15 -0
  17. package/esm2020/src/layout-nav/types.mjs +7 -0
  18. package/esm2020/src/widgets/index.mjs +7 -0
  19. package/esm2020/src/widgets/yunzai-clear-storage.component.mjs +45 -0
  20. package/esm2020/src/widgets/yunzai-fullscreen.component.mjs +45 -0
  21. package/esm2020/src/widgets/yunzai-i18n.component.mjs +115 -0
  22. package/esm2020/src/widgets/yunzai-notify.component.mjs +183 -0
  23. package/esm2020/src/widgets/yunzai-theme-btn.component.mjs +195 -0
  24. package/esm2020/{layout/widgets/yz.user.component.mjs → src/widgets/yunzai-user.component.mjs} +6 -6
  25. package/esm2020/src/yunzai-act.guard.mjs +107 -0
  26. package/esm2020/src/yunzai-auth.service.mjs +153 -0
  27. package/esm2020/src/yunzai-default.interceptor.mjs +207 -0
  28. package/esm2020/src/yunzai-i18n.service.mjs +94 -0
  29. package/esm2020/src/yunzai-layout.module.mjs +76 -0
  30. package/esm2020/src/yunzai-startup.service.mjs +157 -0
  31. package/fesm2015/bis.mjs +2960 -1
  32. package/fesm2015/bis.mjs.map +1 -1
  33. package/fesm2020/bis.mjs +2968 -1
  34. package/fesm2020/bis.mjs.map +1 -1
  35. package/index.d.ts +0 -4
  36. package/index.less +1 -1
  37. package/package.json +12 -27
  38. package/public_api.d.ts +1 -2
  39. package/{layout → src}/bis.config.d.ts +0 -0
  40. package/{shared → src/icon}/style-icons.d.ts +0 -0
  41. package/src/index.d.ts +11 -0
  42. package/src/layout-basic/index.d.ts +3 -0
  43. package/src/layout-basic/interface.d.ts +24 -0
  44. package/src/layout-basic/layout-basic.component.d.ts +33 -0
  45. package/src/layout-basic/layout-display.service.d.ts +15 -0
  46. package/src/layout-nav/index.d.ts +4 -0
  47. package/src/layout-nav/layout-nav-application.component.d.ts +26 -0
  48. package/src/layout-nav/layout-nav-group.component.d.ts +17 -0
  49. package/src/layout-nav/layout-nav-tile.component.d.ts +6 -0
  50. package/src/layout-nav/types.d.ts +20 -0
  51. package/src/widgets/index.d.ts +6 -0
  52. package/{layout/widgets/yz.clear-storage.component.d.ts → src/widgets/yunzai-clear-storage.component.d.ts} +3 -3
  53. package/src/widgets/yunzai-fullscreen.component.d.ts +8 -0
  54. package/{layout/widgets/yz.i18n.component.d.ts → src/widgets/yunzai-i18n.component.d.ts} +5 -5
  55. package/{layout/widgets/yz.notify.component.d.ts → src/widgets/yunzai-notify.component.d.ts} +5 -5
  56. package/{layout/widgets/yz.them-btn.component.d.ts → src/widgets/yunzai-theme-btn.component.d.ts} +5 -5
  57. package/{layout/widgets/yz.user.component.d.ts → src/widgets/yunzai-user.component.d.ts} +3 -3
  58. package/{layout/act.guard.d.ts → src/yunzai-act.guard.d.ts} +1 -2
  59. package/{layout/yz.auth.service.d.ts → src/yunzai-auth.service.d.ts} +6 -7
  60. package/{layout/yz.default.interceptor.d.ts → src/yunzai-default.interceptor.d.ts} +4 -6
  61. package/{layout/yz.i18n.service.d.ts → src/yunzai-i18n.service.d.ts} +4 -3
  62. package/src/yunzai-layout.module.d.ts +21 -0
  63. package/src/yunzai-startup.service.d.ts +37 -0
  64. package/esm2020/layout/act.guard.mjs +0 -108
  65. package/esm2020/layout/bis.config.mjs +0 -11
  66. package/esm2020/layout/contact/contact.component.mjs +0 -492
  67. package/esm2020/layout/contact/contact.service.mjs +0 -146
  68. package/esm2020/layout/layout.mjs +0 -5
  69. package/esm2020/layout/layout.module.mjs +0 -76
  70. package/esm2020/layout/path-to-regexp.service.mjs +0 -238
  71. package/esm2020/layout/public_api.mjs +0 -15
  72. package/esm2020/layout/stomp.config.mjs +0 -18
  73. package/esm2020/layout/widgets/index.mjs +0 -9
  74. package/esm2020/layout/widgets/yz.application.component.mjs +0 -271
  75. package/esm2020/layout/widgets/yz.clear-storage.component.mjs +0 -45
  76. package/esm2020/layout/widgets/yz.fullscreen.component.mjs +0 -45
  77. package/esm2020/layout/widgets/yz.i18n.component.mjs +0 -115
  78. package/esm2020/layout/widgets/yz.notify.component.mjs +0 -183
  79. package/esm2020/layout/widgets/yz.them-btn.component.mjs +0 -195
  80. package/esm2020/layout/yz.auth.service.mjs +0 -155
  81. package/esm2020/layout/yz.basic.component.mjs +0 -269
  82. package/esm2020/layout/yz.default.interceptor.mjs +0 -207
  83. package/esm2020/layout/yz.i18n.service.mjs +0 -93
  84. package/esm2020/layout/yz.startup.service.mjs +0 -139
  85. package/esm2020/layout/yz.stomp.service.mjs +0 -88
  86. package/esm2020/shared/public_api.mjs +0 -5
  87. package/esm2020/shared/shared-yelon.module.mjs +0 -106
  88. package/esm2020/shared/shared-zorro.module.mjs +0 -81
  89. package/esm2020/shared/shared.mjs +0 -5
  90. package/esm2020/shared/shared.module.mjs +0 -115
  91. package/esm2020/shared/style-icons.mjs +0 -796
  92. package/fesm2015/layout.mjs +0 -2968
  93. package/fesm2015/layout.mjs.map +0 -1
  94. package/fesm2015/shared.mjs +0 -1103
  95. package/fesm2015/shared.mjs.map +0 -1
  96. package/fesm2020/layout.mjs +0 -2977
  97. package/fesm2020/layout.mjs.map +0 -1
  98. package/fesm2020/shared.mjs +0 -1103
  99. package/fesm2020/shared.mjs.map +0 -1
  100. package/layout/contact/contact.component.d.ts +0 -169
  101. package/layout/contact/contact.service.d.ts +0 -118
  102. package/layout/index.d.ts +0 -5
  103. package/layout/layout.module.d.ts +0 -21
  104. package/layout/path-to-regexp.service.d.ts +0 -26
  105. package/layout/public_api.d.ts +0 -14
  106. package/layout/stomp.config.d.ts +0 -3
  107. package/layout/style/index.less +0 -155
  108. package/layout/widgets/index.d.ts +0 -8
  109. package/layout/widgets/yz.application.component.d.ts +0 -49
  110. package/layout/widgets/yz.application.group.component.d.ts +0 -19
  111. package/layout/widgets/yz.fullscreen.component.d.ts +0 -8
  112. package/layout/yz.basic.component.d.ts +0 -27
  113. package/layout/yz.startup.service.d.ts +0 -36
  114. package/layout/yz.stomp.service.d.ts +0 -42
  115. package/shared/index.d.ts +0 -5
  116. package/shared/public_api.d.ts +0 -4
  117. package/shared/shared-yelon.module.d.ts +0 -3
  118. package/shared/shared-zorro.module.d.ts +0 -2
  119. package/shared/shared.module.d.ts +0 -94
package/fesm2015/bis.mjs CHANGED
@@ -1,6 +1,2965 @@
1
- var public_api = void 0;
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$4 from '@yelon/util';
6
+ import { getUrlParam, resizeWindow, WINDOW, log as log$1, deepCopy, YunzaiConfigService } from '@yelon/util';
7
+ import * as i1$3 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 i12 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 * as i5 from '@angular/forms';
44
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
45
+ import * as i7$1 from 'ng-zorro-antd/grid';
46
+ import * as i9 from 'ng-zorro-antd/input';
47
+ import * as i8$2 from 'ng-zorro-antd/tabs';
48
+ import { YA_SERVICE_TOKEN, ALLOW_ANONYMOUS } from '@yelon/auth';
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 () {
1189
+ return [{ type: i1$2.SettingsService }, { type: YunzaiI18NService, decorators: [{
1190
+ type: Inject,
1191
+ args: [YUNZAI_I18N_TOKEN]
1192
+ }] }, { type: undefined, decorators: [{
1193
+ type: Inject,
1194
+ args: [DOCUMENT]
1195
+ }] }];
1196
+ }, propDecorators: { showLangText: [{
1197
+ type: Input
1198
+ }] } });
1199
+
1200
+ class YunzaiNotifyComponent {
1201
+ constructor(injector, msg, y18n, nzI18n, cdr, httpClient) {
1202
+ this.injector = injector;
1203
+ this.msg = msg;
1204
+ this.y18n = y18n;
1205
+ this.nzI18n = nzI18n;
1206
+ this.cdr = cdr;
1207
+ this.httpClient = httpClient;
1208
+ this.data = [
1209
+ {
1210
+ key: 'msg',
1211
+ title: this.y18n.fanyi('notify.message'),
1212
+ list: [],
1213
+ emptyText: this.y18n.fanyi('notify.message.emptyText'),
1214
+ emptyImage: './assets/tmp/img/message.svg',
1215
+ clearText: this.y18n.fanyi('notify.message.clearText')
1216
+ },
1217
+ {
1218
+ key: 'todo',
1219
+ title: this.y18n.fanyi('notify.todo'),
1220
+ list: [],
1221
+ emptyText: this.y18n.fanyi('notify.todo.emptyText'),
1222
+ emptyImage: './assets/tmp/img/todo.svg',
1223
+ clearText: this.y18n.fanyi('notify.todo.clearText')
1224
+ },
1225
+ {
1226
+ key: 'notice',
1227
+ title: this.y18n.fanyi('notify.notice'),
1228
+ list: [],
1229
+ emptyText: this.y18n.fanyi('notify.notice.emptyText'),
1230
+ emptyImage: './assets/tmp/img/notice.svg',
1231
+ clearText: this.y18n.fanyi('notify.notice.clearText')
1232
+ }
1233
+ ];
1234
+ this.loading = false;
1235
+ this.count = 0;
1236
+ this.subs = [];
1237
+ }
1238
+ ngOnInit() {
1239
+ this.loadData();
1240
+ }
1241
+ loadData() {
1242
+ this.count = 0;
1243
+ this.loading = true;
1244
+ this.subs.push(forkJoin(this.loadTodo(), this.loadMessage()).subscribe(() => {
1245
+ this.loading = false;
1246
+ this.cdr.detectChanges();
1247
+ }));
1248
+ }
1249
+ loadMessage() {
1250
+ log('notify.component: ', 'fetch message list');
1251
+ const formatMessageStatus = (status) => {
1252
+ switch (status) {
1253
+ case '0':
1254
+ return { extra: this.y18n.fanyi('notify.unread'), color: 'red' };
1255
+ case '1':
1256
+ return { extra: this.y18n.fanyi('notify.readed'), color: 'green' };
1257
+ default:
1258
+ return { extra: this.y18n.fanyi('notify.nostatus'), color: 'primary' };
1259
+ }
1260
+ };
1261
+ return this.httpClient
1262
+ .post(`/message-center-3/my-msg-and-todo/msg-list`, {
1263
+ pageNum: 1,
1264
+ pageSize: 10,
1265
+ status: '0'
1266
+ })
1267
+ .pipe(map((response) => {
1268
+ const viewMessage = this.data.filter(d => d.key === 'msg')[0];
1269
+ viewMessage.list = response.data.list.map((m) => {
1270
+ return Object.assign(Object.assign({}, m), { avatar: (m === null || m === void 0 ? void 0 : m.imgUrl) || './assets/tmp/img/message.png', title: m.systemName, description: m.content, extra: formatMessageStatus(m.status).extra, color: formatMessageStatus(m.status).color, datetime: formatDistanceToNow(new Date(m.date), { locale: this.nzI18n.getDateLocale() }) });
1271
+ });
1272
+ this.count += viewMessage.list.length;
1273
+ }));
1274
+ }
1275
+ loadTodo() {
1276
+ log('notify.component: ', 'fetch todo list');
1277
+ const formatTodoStatus = (status) => {
1278
+ switch (status) {
1279
+ case '0':
1280
+ return { extra: this.y18n.fanyi('notify.unstart'), color: 'red' };
1281
+ case '1':
1282
+ return { extra: this.y18n.fanyi('notify.started'), color: 'green' };
1283
+ default:
1284
+ return { extra: this.y18n.fanyi('notify.nostatus'), color: 'primary' };
1285
+ }
1286
+ };
1287
+ return this.httpClient
1288
+ .post(`/message-center-3/my-msg-and-todo/todo-list`, {
1289
+ pageNum: 1,
1290
+ pageSize: 10,
1291
+ status: '0'
1292
+ })
1293
+ .pipe(map((response) => {
1294
+ const viewTodo = this.data.filter(d => d.key === 'todo')[0];
1295
+ viewTodo.list = response.data.list.map((t) => {
1296
+ return Object.assign(Object.assign({}, t), { avatar: (t === null || t === void 0 ? void 0 : t.imgUrl) || './assets/tmp/img/todo.png', title: t.systemName, description: t.content, datetime: formatDistanceToNow(new Date(t.date), { locale: this.nzI18n.getDateLocale() }), extra: formatTodoStatus(t.status).extra, color: formatTodoStatus(t.status).color });
1297
+ });
1298
+ this.count += viewTodo.list.length;
1299
+ }));
1300
+ }
1301
+ clear(type) {
1302
+ const t = this.data.filter(d => d.title === type)[0];
1303
+ if (t.key == 'msg' || t.key == 'notice') {
1304
+ this.subs.push(this.httpClient.post(`/message-center-3/my-msg-and-todo/msg-clear`, {}).subscribe(_ => {
1305
+ this.msg.success(`${this.y18n.fanyi('notify.clear')} ${type}`);
1306
+ this.loadData();
1307
+ }));
1308
+ }
1309
+ if (t.key == 'todo') {
1310
+ this.loadData();
1311
+ }
1312
+ }
1313
+ select(res) {
1314
+ this.injector.get(WINDOW).open(res.item.url);
1315
+ this.loadData();
1316
+ }
1317
+ ngOnDestroy() {
1318
+ this.subs.forEach(a => a.unsubscribe());
1319
+ }
1320
+ }
1321
+ 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 });
1322
+ YunzaiNotifyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: YunzaiNotifyComponent, selector: "yunzai-notify", ngImport: i0, template: `
1323
+ <notice-icon
1324
+ [data]="data"
1325
+ [count]="count"
1326
+ [loading]="loading"
1327
+ btnClass="yunzai-default__nav-item"
1328
+ btnIconClass="yunzai-default__nav-item-icon"
1329
+ (select)="select($event)"
1330
+ (clear)="clear($event)"
1331
+ ></notice-icon>
1332
+ `, 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 });
1333
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiNotifyComponent, decorators: [{
1334
+ type: Component,
1335
+ args: [{
1336
+ selector: 'yunzai-notify',
1337
+ template: `
1338
+ <notice-icon
1339
+ [data]="data"
1340
+ [count]="count"
1341
+ [loading]="loading"
1342
+ btnClass="yunzai-default__nav-item"
1343
+ btnIconClass="yunzai-default__nav-item-icon"
1344
+ (select)="select($event)"
1345
+ (clear)="clear($event)"
1346
+ ></notice-icon>
1347
+ `,
1348
+ changeDetection: ChangeDetectionStrategy.OnPush
1349
+ }]
1350
+ }], ctorParameters: function () {
1351
+ return [{ type: i0.Injector }, { type: i1$1.NzMessageService }, { type: YunzaiI18NService, decorators: [{
1352
+ type: Inject,
1353
+ args: [YUNZAI_I18N_TOKEN]
1354
+ }] }, { type: i2.NzI18nService }, { type: i0.ChangeDetectorRef }, { type: i1$2._HttpClient }];
1355
+ } });
1356
+
1357
+ class YunzaiThemBtnComponent {
1358
+ constructor(renderer, configSrv, platform, doc, directionality, KEYS) {
1359
+ this.renderer = renderer;
1360
+ this.configSrv = configSrv;
1361
+ this.platform = platform;
1362
+ this.doc = doc;
1363
+ this.directionality = directionality;
1364
+ this.KEYS = KEYS;
1365
+ this.theme = 'default';
1366
+ this.types = [
1367
+ { key: 'default', text: 'theme.default', color: '#2163ff' },
1368
+ { key: 'compact', text: 'theme.compact', color: '#2163ff' },
1369
+ { key: 'dark', text: 'theme.dark', color: '#020202' },
1370
+ { key: 'yuhong', text: 'theme.yuhong', color: '#C04851' },
1371
+ { key: 'danjuhuang', text: 'theme.danjuhuang', color: '#FBA414' },
1372
+ { key: 'xinghuang', text: 'theme.xinghuang', color: '#F28E16' },
1373
+ { key: 'shilv', text: 'theme.shilv', color: '#57C3C2' },
1374
+ { key: 'zhulv', text: 'theme.zhulv', color: '#1BA784' },
1375
+ { key: 'youlan', text: 'theme.youlan', color: '#1781B5' },
1376
+ { key: 'dianqing', text: 'theme.dianqing', color: '#1661AB' },
1377
+ { key: 'shangengzi', text: 'theme.shangengzi', color: '#61649F' },
1378
+ { key: 'shuiniuhui', text: 'theme.shuiniuhui', color: '#2F2F35' }
1379
+ ];
1380
+ this.devTips = `When the dark.css file can't be found, you need to run it once: npm run theme`;
1381
+ this.deployUrl = '';
1382
+ this.destroy$ = new Subject();
1383
+ this.dir = 'ltr';
1384
+ }
1385
+ ngOnInit() {
1386
+ var _a;
1387
+ this.dir = this.directionality.value;
1388
+ (_a = this.directionality.change) === null || _a === void 0 ? void 0 : _a.pipe(takeUntil(this.destroy$)).subscribe((direction) => {
1389
+ this.dir = direction;
1390
+ });
1391
+ this.initTheme();
1392
+ }
1393
+ initTheme() {
1394
+ if (!this.platform.isBrowser) {
1395
+ return;
1396
+ }
1397
+ this.theme = localStorage.getItem(this.KEYS) || 'default';
1398
+ this.updateChartTheme();
1399
+ this.onThemeChange(this.theme);
1400
+ }
1401
+ updateChartTheme() {
1402
+ this.configSrv.set('chart', { theme: this.theme === 'dark' ? 'dark' : '' });
1403
+ }
1404
+ onThemeChange(theme) {
1405
+ if (!this.platform.isBrowser) {
1406
+ return;
1407
+ }
1408
+ this.theme = theme;
1409
+ this.renderer.setAttribute(this.doc.body, 'data-theme', theme);
1410
+ const dom = this.doc.getElementById(this.KEYS);
1411
+ if (dom) {
1412
+ dom.remove();
1413
+ }
1414
+ localStorage.removeItem(this.KEYS);
1415
+ if (theme !== 'default') {
1416
+ const el = this.doc.createElement('link');
1417
+ el.type = 'text/css';
1418
+ el.rel = 'stylesheet';
1419
+ el.id = this.KEYS;
1420
+ el.href = `${this.deployUrl}assets/style.${theme}.css`;
1421
+ localStorage.setItem(this.KEYS, theme);
1422
+ this.doc.body.append(el);
1423
+ }
1424
+ this.updateChartTheme();
1425
+ }
1426
+ ngOnDestroy() {
1427
+ const el = this.doc.getElementById(this.KEYS);
1428
+ if (el != null) {
1429
+ this.doc.body.removeChild(el);
1430
+ }
1431
+ this.destroy$.next();
1432
+ this.destroy$.complete();
1433
+ }
1434
+ }
1435
+ 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 });
1436
+ 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: `
1437
+ <div
1438
+ class="yunzai-default__nav-item"
1439
+ nz-dropdown
1440
+ [nzDropdownMenu]="iconMenu"
1441
+ nzTrigger="click"
1442
+ nzPlacement="bottomRight"
1443
+ >
1444
+ <svg nz-tooltip class="anticon" role="img" width="21" height="21" viewBox="0 0 21 21" fill="currentColor">
1445
+ <g fill-rule="evenodd">
1446
+ <g fill-rule="nonzero">
1447
+ <path
1448
+ 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"
1449
+ ></path>
1450
+ </g>
1451
+ </g>
1452
+ </svg>
1453
+ </div>
1454
+ <nz-dropdown-menu #iconMenu="nzDropdownMenu">
1455
+ <ul nz-menu>
1456
+ <li
1457
+ nz-menu-item
1458
+ *ngFor="let theme of types"
1459
+ (click)="onThemeChange(theme.key)"
1460
+ [style]="{ color: theme.color }"
1461
+ >
1462
+ <i nz-icon nzType="bg-colors"></i>
1463
+ {{ theme.text | i18n }}
1464
+ </li>
1465
+ </ul>
1466
+ <!-- <div nz-menu class="wd-xl animated jello">-->
1467
+ <!-- <div nz-row [nzJustify]="'space-between'" [nzAlign]="'middle'" class="app-icons">-->
1468
+ <!-- <div nz-col [nzSpan]="4" *ngFor="let theme of types" (click)="onThemeChange(theme.key)">-->
1469
+ <!-- <i nz-icon nzType="bg-colors" class="text-white" [style]="{ backgroundColor: theme.color }"></i>-->
1470
+ <!-- <span [ngStyle]="{ color: theme.color }">{{ theme.text | i18n }}</span>-->
1471
+ <!-- </div>-->
1472
+ <!-- </div>-->
1473
+ <!-- </div>-->
1474
+ </nz-dropdown-menu>
1475
+ `, 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 });
1476
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiThemBtnComponent, decorators: [{
1477
+ type: Component,
1478
+ args: [{
1479
+ selector: 'yunzai-theme-btn',
1480
+ template: `
1481
+ <div
1482
+ class="yunzai-default__nav-item"
1483
+ nz-dropdown
1484
+ [nzDropdownMenu]="iconMenu"
1485
+ nzTrigger="click"
1486
+ nzPlacement="bottomRight"
1487
+ >
1488
+ <svg nz-tooltip class="anticon" role="img" width="21" height="21" viewBox="0 0 21 21" fill="currentColor">
1489
+ <g fill-rule="evenodd">
1490
+ <g fill-rule="nonzero">
1491
+ <path
1492
+ 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"
1493
+ ></path>
1494
+ </g>
1495
+ </g>
1496
+ </svg>
1497
+ </div>
1498
+ <nz-dropdown-menu #iconMenu="nzDropdownMenu">
1499
+ <ul nz-menu>
1500
+ <li
1501
+ nz-menu-item
1502
+ *ngFor="let theme of types"
1503
+ (click)="onThemeChange(theme.key)"
1504
+ [style]="{ color: theme.color }"
1505
+ >
1506
+ <i nz-icon nzType="bg-colors"></i>
1507
+ {{ theme.text | i18n }}
1508
+ </li>
1509
+ </ul>
1510
+ <!-- <div nz-menu class="wd-xl animated jello">-->
1511
+ <!-- <div nz-row [nzJustify]="'space-between'" [nzAlign]="'middle'" class="app-icons">-->
1512
+ <!-- <div nz-col [nzSpan]="4" *ngFor="let theme of types" (click)="onThemeChange(theme.key)">-->
1513
+ <!-- <i nz-icon nzType="bg-colors" class="text-white" [style]="{ backgroundColor: theme.color }"></i>-->
1514
+ <!-- <span [ngStyle]="{ color: theme.color }">{{ theme.text | i18n }}</span>-->
1515
+ <!-- </div>-->
1516
+ <!-- </div>-->
1517
+ <!-- </div>-->
1518
+ </nz-dropdown-menu>
1519
+ `,
1520
+ changeDetection: ChangeDetectionStrategy.OnPush
1521
+ }]
1522
+ }], ctorParameters: function () {
1523
+ return [{ type: i0.Renderer2 }, { type: i4.YunzaiConfigService }, { type: i3$1.Platform }, { type: undefined, decorators: [{
1524
+ type: Inject,
1525
+ args: [DOCUMENT]
1526
+ }] }, { type: i3$2.Directionality, decorators: [{
1527
+ type: Optional
1528
+ }] }, { type: undefined, decorators: [{
1529
+ type: Inject,
1530
+ args: [YUNZAI_THEME_BTN_KEYS]
1531
+ }] }];
1532
+ }, propDecorators: { types: [{
1533
+ type: Input
1534
+ }], devTips: [{
1535
+ type: Input
1536
+ }], deployUrl: [{
1537
+ type: Input
1538
+ }] } });
1539
+
1540
+ var TopicType;
1541
+ (function (TopicType) {
1542
+ TopicType[TopicType["FULL"] = 0] = "FULL";
1543
+ TopicType[TopicType["OWN"] = 1] = "OWN";
1544
+ TopicType[TopicType["EVERY"] = 2] = "EVERY";
1545
+ })(TopicType || (TopicType = {}));
1546
+
1547
+ class LayoutNavApplicationComponent {
1548
+ constructor(cacheService, i18n, http, inject) {
1549
+ this.cacheService = cacheService;
1550
+ this.i18n = i18n;
1551
+ this.http = http;
1552
+ this.inject = inject;
1553
+ this.TopicType = TopicType;
1554
+ this.state = {
1555
+ active: false,
1556
+ type: TopicType.FULL,
1557
+ topic: undefined,
1558
+ topics: [],
1559
+ list: [],
1560
+ search: null,
1561
+ destroy$: new Subject()
1562
+ };
1563
+ }
1564
+ ngOnInit() {
1565
+ this.state.list = this.state.topics = this.cacheService.get('_yz_header', { mode: 'none' });
1566
+ }
1567
+ initTopic(type) {
1568
+ this.state.search = null;
1569
+ this.state.list = this.cacheService.get('_yz_header', { mode: 'none' });
1570
+ this.state.type = type;
1571
+ }
1572
+ full() {
1573
+ this.initTopic(TopicType.FULL);
1574
+ }
1575
+ own() {
1576
+ this.initTopic(TopicType.OWN);
1577
+ const temp = this.cacheService.get('_yz_header', { mode: 'none' });
1578
+ this.state.list = temp
1579
+ .filter((topic) => {
1580
+ topic.children = topic.children.filter((child) => {
1581
+ return child.auth;
1582
+ });
1583
+ return topic;
1584
+ })
1585
+ .filter((topic) => {
1586
+ return topic.children.length > 0;
1587
+ });
1588
+ }
1589
+ every(e) {
1590
+ this.initTopic(TopicType.EVERY);
1591
+ this.state.topic = e;
1592
+ const temp = this.cacheService.get('_yz_header', { mode: 'none' });
1593
+ this.state.list = [...temp.filter(t => t.key === e.key)[0].children];
1594
+ }
1595
+ diffChange(flag) {
1596
+ if (flag) {
1597
+ this.state.active = flag;
1598
+ }
1599
+ else {
1600
+ this.state.active = !this.state.active;
1601
+ }
1602
+ }
1603
+ open(topic) {
1604
+ if (topic.key) {
1605
+ this.http
1606
+ .post(`/app-manager/web-scan/save`, {
1607
+ appId: topic.key,
1608
+ createDate: new Date()
1609
+ })
1610
+ .pipe(takeUntil(this.state.destroy$))
1611
+ .subscribe();
1612
+ }
1613
+ switch (topic.target) {
1614
+ case 'href':
1615
+ this.inject.get(WINDOW).location.href = topic.url;
1616
+ break;
1617
+ case 'blank':
1618
+ this.inject.get(WINDOW).location.href = topic.url;
1619
+ break;
1620
+ case 'target':
1621
+ this.inject.get(WINDOW).location.href = topic.url;
1622
+ break;
1623
+ default:
1624
+ this.inject.get(WINDOW).location.href = topic.url;
1625
+ break;
1626
+ }
1627
+ }
1628
+ onSearch() {
1629
+ const temp = this.cacheService.get('_yz_header', { mode: 'none' });
1630
+ if (this.state.search) {
1631
+ this.state.list = temp
1632
+ .filter((topic) => {
1633
+ if (this.i18n.fanyi(topic.name).includes(this.state.search)) {
1634
+ return topic;
1635
+ }
1636
+ else {
1637
+ topic.children = topic.children.filter((child) => {
1638
+ return this.i18n.fanyi(child.name).includes(this.state.search);
1639
+ });
1640
+ return topic;
1641
+ }
1642
+ })
1643
+ .filter((topic) => {
1644
+ return topic.children.length > 0;
1645
+ });
1646
+ }
1647
+ else {
1648
+ this.state.list = this.cacheService.get('_yz_header', { mode: 'none' });
1649
+ }
1650
+ }
1651
+ ngOnDestroy() {
1652
+ this.state.destroy$.complete();
1653
+ }
1654
+ }
1655
+ LayoutNavApplicationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LayoutNavApplicationComponent, deps: [{ token: i1$3.CacheService }, { token: YunzaiI18NService }, { token: i1$2._HttpClient }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
1656
+ LayoutNavApplicationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: LayoutNavApplicationComponent, selector: "layout-nav-application", ngImport: i0, template: `
1657
+ <!-- template start-->
1658
+ <ng-template #search>
1659
+ <div nz-row class="yz-application-list-search">
1660
+ <nz-input-group [nzPrefix]="prefixTemplate">
1661
+ <input
1662
+ type="text"
1663
+ nz-input
1664
+ placeholder="{{ 'application.search' | i18n }}"
1665
+ [(ngModel)]="state.search"
1666
+ (ngModelChange)="onSearch()"
1667
+ />
1668
+ <ng-template #prefixTemplate>
1669
+ <i nz-icon nzType="search" nzTheme="outline"></i>
1670
+ </ng-template>
1671
+ </nz-input-group>
1672
+ </div>
1673
+ </ng-template>
1674
+ <ng-template #ld>
1675
+ <div class="yz-application-list">
1676
+ <ul>
1677
+ <li *ngFor="let d of state.list">
1678
+ <h5>{{ d.name }}</h5>
1679
+ <a href="javascript:;" *ngFor="let cd of d.children" (click)="open(cd)">{{ cd.name }}</a>
1680
+ </li>
1681
+ </ul>
1682
+ </div>
1683
+ </ng-template>
1684
+ <!-- template end-->
1685
+
1686
+ <!-- button start-->
1687
+ <div class="yunzai-default__nav-item" (click)="diffChange()"> {{ 'application.button' | i18n }}</div>
1688
+ <!-- button end-->
1689
+
1690
+ <!-- header start-->
1691
+ <div class="yz-application" nz-row *ngIf="state.active">
1692
+ <div nz-col [nzSpan]="3" class="yz-application-topic">
1693
+ <div class="yz-application-text" (click)="full()">{{ 'application.all' | i18n }}</div>
1694
+ <div class="yz-application-text" (click)="own()">{{ 'application.mine' | i18n }}</div>
1695
+ <div class="yz-application-text" *ngFor="let d of state.topics" (click)="every(d)">{{ d.name }}</div>
1696
+ </div>
1697
+ <div nz-col [nzSpan]="21" [ngSwitch]="state.topic" class="yz-application-container">
1698
+ <div *ngSwitchCase="TopicType.FULL">
1699
+ <ng-template [ngTemplateOutlet]="search"></ng-template>
1700
+ <ng-template [ngTemplateOutlet]="ld"></ng-template>
1701
+ </div>
1702
+ <div *ngSwitchCase="TopicType.OWN">
1703
+ <ng-template [ngTemplateOutlet]="search"></ng-template>
1704
+ <ng-template [ngTemplateOutlet]="ld"></ng-template>
1705
+ </div>
1706
+ <div *ngSwitchCase="TopicType.EVERY" class="yz-application-list">
1707
+ <div class="yz-application-list-item">
1708
+ <ul>
1709
+ <li *ngFor="let d of state.list" (click)="open(d)">
1710
+ <a href="javascript:;">
1711
+ <h4>{{ d.name }}</h4>
1712
+ <p>{{ d.intro }}</p>
1713
+ </a>
1714
+ </li>
1715
+ </ul>
1716
+ </div>
1717
+ </div>
1718
+ </div>
1719
+ </div>
1720
+ <!-- header end-->
1721
+ `, 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.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i9.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i9.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "pipe", type: i1$2.I18nPipe, name: "i18n" }] });
1722
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LayoutNavApplicationComponent, decorators: [{
1723
+ type: Component,
1724
+ args: [{
1725
+ selector: `layout-nav-application`,
1726
+ template: `
1727
+ <!-- template start-->
1728
+ <ng-template #search>
1729
+ <div nz-row class="yz-application-list-search">
1730
+ <nz-input-group [nzPrefix]="prefixTemplate">
1731
+ <input
1732
+ type="text"
1733
+ nz-input
1734
+ placeholder="{{ 'application.search' | i18n }}"
1735
+ [(ngModel)]="state.search"
1736
+ (ngModelChange)="onSearch()"
1737
+ />
1738
+ <ng-template #prefixTemplate>
1739
+ <i nz-icon nzType="search" nzTheme="outline"></i>
1740
+ </ng-template>
1741
+ </nz-input-group>
1742
+ </div>
1743
+ </ng-template>
1744
+ <ng-template #ld>
1745
+ <div class="yz-application-list">
1746
+ <ul>
1747
+ <li *ngFor="let d of state.list">
1748
+ <h5>{{ d.name }}</h5>
1749
+ <a href="javascript:;" *ngFor="let cd of d.children" (click)="open(cd)">{{ cd.name }}</a>
1750
+ </li>
1751
+ </ul>
1752
+ </div>
1753
+ </ng-template>
1754
+ <!-- template end-->
1755
+
1756
+ <!-- button start-->
1757
+ <div class="yunzai-default__nav-item" (click)="diffChange()"> {{ 'application.button' | i18n }}</div>
1758
+ <!-- button end-->
1759
+
1760
+ <!-- header start-->
1761
+ <div class="yz-application" nz-row *ngIf="state.active">
1762
+ <div nz-col [nzSpan]="3" class="yz-application-topic">
1763
+ <div class="yz-application-text" (click)="full()">{{ 'application.all' | i18n }}</div>
1764
+ <div class="yz-application-text" (click)="own()">{{ 'application.mine' | i18n }}</div>
1765
+ <div class="yz-application-text" *ngFor="let d of state.topics" (click)="every(d)">{{ d.name }}</div>
1766
+ </div>
1767
+ <div nz-col [nzSpan]="21" [ngSwitch]="state.topic" class="yz-application-container">
1768
+ <div *ngSwitchCase="TopicType.FULL">
1769
+ <ng-template [ngTemplateOutlet]="search"></ng-template>
1770
+ <ng-template [ngTemplateOutlet]="ld"></ng-template>
1771
+ </div>
1772
+ <div *ngSwitchCase="TopicType.OWN">
1773
+ <ng-template [ngTemplateOutlet]="search"></ng-template>
1774
+ <ng-template [ngTemplateOutlet]="ld"></ng-template>
1775
+ </div>
1776
+ <div *ngSwitchCase="TopicType.EVERY" class="yz-application-list">
1777
+ <div class="yz-application-list-item">
1778
+ <ul>
1779
+ <li *ngFor="let d of state.list" (click)="open(d)">
1780
+ <a href="javascript:;">
1781
+ <h4>{{ d.name }}</h4>
1782
+ <p>{{ d.intro }}</p>
1783
+ </a>
1784
+ </li>
1785
+ </ul>
1786
+ </div>
1787
+ </div>
1788
+ </div>
1789
+ </div>
1790
+ <!-- header end-->
1791
+ `
1792
+ }]
1793
+ }], ctorParameters: function () { return [{ type: i1$3.CacheService }, { type: YunzaiI18NService }, { type: i1$2._HttpClient }, { type: i0.Injector }]; } });
1794
+
1795
+ class LayoutNavGroupComponent {
1796
+ constructor(inject, cacheService, http) {
1797
+ this.inject = inject;
1798
+ this.cacheService = cacheService;
1799
+ this.http = http;
1800
+ this.state = {
1801
+ topics: [],
1802
+ destroy$: new Subject()
1803
+ };
1804
+ }
1805
+ ngOnInit() {
1806
+ this.state.topics = this.cacheService.get('_yz_header', { mode: 'none' });
1807
+ }
1808
+ open(topic) {
1809
+ if (topic.key) {
1810
+ this.http
1811
+ .post(`/app-manager/web-scan/save`, {
1812
+ appId: topic.key,
1813
+ createDate: new Date()
1814
+ })
1815
+ .pipe(takeUntil(this.state.destroy$))
1816
+ .subscribe();
1817
+ }
1818
+ switch (topic.target) {
1819
+ case 'href':
1820
+ this.inject.get(WINDOW).location.href = topic.url;
1821
+ break;
1822
+ case 'blank':
1823
+ this.inject.get(WINDOW).location.href = topic.url;
1824
+ break;
1825
+ case 'target':
1826
+ this.inject.get(WINDOW).location.href = topic.url;
1827
+ break;
1828
+ default:
1829
+ this.inject.get(WINDOW).location.href = topic.url;
1830
+ break;
1831
+ }
1832
+ }
1833
+ ngOnDestroy() {
1834
+ this.state.destroy$.complete();
1835
+ }
1836
+ }
1837
+ LayoutNavGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LayoutNavGroupComponent, deps: [{ token: i0.Injector }, { token: i1$3.CacheService }, { token: i1$2._HttpClient }], target: i0.ɵɵFactoryTarget.Component });
1838
+ LayoutNavGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: LayoutNavGroupComponent, selector: "layout-nav-group", ngImport: i0, template: `
1839
+ <div class="yz-application-group">
1840
+ <nz-tabset>
1841
+ <nz-tab *ngFor="let menu of state.topics" [nzTitle]="groupTitleTpl">
1842
+ <ng-template #groupTitleTpl>
1843
+ <a
1844
+ nz-dropdown
1845
+ [nzDropdownMenu]="menuTpl"
1846
+ [nzTrigger]="'click'"
1847
+ [nzOverlayClassName]="'yz-application-dropdown'"
1848
+ >
1849
+ <i nz-icon *ngIf="menu.icon" [nzType]="menu.icon" nzTheme="outline"></i>
1850
+ {{ menu.name | i18n }}
1851
+ <i *ngIf="menu.children && menu.children.length > 0" nz-icon nzType="down" nzTheme="outline"></i>
1852
+ </a>
1853
+ <nz-dropdown-menu #menuTpl="nzDropdownMenu">
1854
+ <ul nz-menu nzSelectable *ngIf="menu.children && menu.children.length > 0">
1855
+ <ng-container *ngFor="let item of menu.children">
1856
+ <li nz-menu-item (click)="open(item)">
1857
+ <i nz-icon *ngIf="item.icon" [nzType]="item.icon" nzTheme="outline"></i>{{ item.name | i18n }}
1858
+ </li>
1859
+ </ng-container>
1860
+ </ul>
1861
+ </nz-dropdown-menu>
1862
+ </ng-template>
1863
+ </nz-tab>
1864
+ </nz-tabset>
1865
+ </div>
1866
+ `, 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" }] });
1867
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LayoutNavGroupComponent, decorators: [{
1868
+ type: Component,
1869
+ args: [{
1870
+ selector: `layout-nav-group`,
1871
+ template: `
1872
+ <div class="yz-application-group">
1873
+ <nz-tabset>
1874
+ <nz-tab *ngFor="let menu of state.topics" [nzTitle]="groupTitleTpl">
1875
+ <ng-template #groupTitleTpl>
1876
+ <a
1877
+ nz-dropdown
1878
+ [nzDropdownMenu]="menuTpl"
1879
+ [nzTrigger]="'click'"
1880
+ [nzOverlayClassName]="'yz-application-dropdown'"
1881
+ >
1882
+ <i nz-icon *ngIf="menu.icon" [nzType]="menu.icon" nzTheme="outline"></i>
1883
+ {{ menu.name | i18n }}
1884
+ <i *ngIf="menu.children && menu.children.length > 0" nz-icon nzType="down" nzTheme="outline"></i>
1885
+ </a>
1886
+ <nz-dropdown-menu #menuTpl="nzDropdownMenu">
1887
+ <ul nz-menu nzSelectable *ngIf="menu.children && menu.children.length > 0">
1888
+ <ng-container *ngFor="let item of menu.children">
1889
+ <li nz-menu-item (click)="open(item)">
1890
+ <i nz-icon *ngIf="item.icon" [nzType]="item.icon" nzTheme="outline"></i>{{ item.name | i18n }}
1891
+ </li>
1892
+ </ng-container>
1893
+ </ul>
1894
+ </nz-dropdown-menu>
1895
+ </ng-template>
1896
+ </nz-tab>
1897
+ </nz-tabset>
1898
+ </div>
1899
+ `
1900
+ }]
1901
+ }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$3.CacheService }, { type: i1$2._HttpClient }]; } });
1902
+
1903
+ class LayoutNavTileComponent {
1904
+ constructor() { }
1905
+ }
1906
+ LayoutNavTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LayoutNavTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1907
+ 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 });
1908
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LayoutNavTileComponent, decorators: [{
1909
+ type: Component,
1910
+ args: [{
1911
+ selector: `layout-nav-tile`,
1912
+ template: `<template></template>`
1913
+ }]
1914
+ }], ctorParameters: function () { return []; } });
1915
+
1916
+ class YzLayoutBasicComponent {
1917
+ get options() {
1918
+ return this.state.options;
1919
+ }
1920
+ get navType() {
1921
+ return this.state.navType;
1922
+ }
1923
+ get aside() {
1924
+ return this.state.aside;
1925
+ }
1926
+ get displayReusetab() {
1927
+ return this.state.display.reusetab;
1928
+ }
1929
+ get reusetabCSS() {
1930
+ let cascadingStyleSheet = {};
1931
+ if (!this.state.display.nav) {
1932
+ cascadingStyleSheet = Object.assign(Object.assign({}, cascadingStyleSheet), { top: 0 });
1933
+ }
1934
+ if (!this.state.display.aside) {
1935
+ cascadingStyleSheet = Object.assign(Object.assign({}, cascadingStyleSheet), { left: '24px' });
1936
+ }
1937
+ return cascadingStyleSheet;
1938
+ }
1939
+ constructor(layoutDisplayService, cacheService, stompService, router, win) {
1940
+ this.layoutDisplayService = layoutDisplayService;
1941
+ this.cacheService = cacheService;
1942
+ this.stompService = stompService;
1943
+ this.router = router;
1944
+ this.win = win;
1945
+ this.NavType = NavType;
1946
+ this.state = {
1947
+ options: {
1948
+ logoExpanded: `./assets/logo-full.svg`,
1949
+ logoCollapsed: `./assets/logo.svg`
1950
+ },
1951
+ aside: {
1952
+ name: '',
1953
+ intro: '',
1954
+ icon: ''
1955
+ },
1956
+ display: {
1957
+ nav: true,
1958
+ aside: true,
1959
+ reusetab: true
1960
+ },
1961
+ navType: NavType.APPLICATION,
1962
+ destroy$: new Subject()
1963
+ };
1964
+ }
1965
+ ngOnInit() {
1966
+ this.initLogo();
1967
+ this.initNavType();
1968
+ this.initAside();
1969
+ this.addLayoutDisplayListener();
1970
+ this.stompService.listen();
1971
+ this.toIndex();
1972
+ }
1973
+ initAside() {
1974
+ const aside = this.cacheService.get('_yz_current', { mode: 'none' });
1975
+ this.state.aside = aside;
1976
+ }
1977
+ initLogo() {
1978
+ const projectInfo = this.cacheService.get('_yz_project_info', { mode: 'none' });
1979
+ this.state.options.logoExpanded = projectInfo.maxLogoUrl ? projectInfo.maxLogoUrl : `./assets/logo-full.svg`;
1980
+ this.state.options.logoCollapsed = projectInfo.miniLogoUrl ? projectInfo.miniLogoUrl : `./assets/logo.svg`;
1981
+ }
1982
+ initNavType() {
1983
+ var _a;
1984
+ // from browser cache
1985
+ const navType = this.cacheService.get('_yz_header_type', { mode: 'none' });
1986
+ if (navType !== null) {
1987
+ this.state.navType = navType;
1988
+ return;
1989
+ }
1990
+ // from project info
1991
+ const projectInfo = this.cacheService.get('_yz_project_info', { mode: 'none' });
1992
+ let fetchedNavType = undefined;
1993
+ if (projectInfo.headerStyle && projectInfo.headerStyle.length > 0) {
1994
+ fetchedNavType = (_a = projectInfo.headerStyle.pop()) === null || _a === void 0 ? void 0 : _a.value;
1995
+ }
1996
+ // default value
1997
+ if (!fetchedNavType) {
1998
+ fetchedNavType = NavType.APPLICATION;
1999
+ }
2000
+ }
2001
+ toIndex() {
2002
+ const defaultRoute = this.cacheService.get('_yz_defaultRoute', { mode: 'none' });
2003
+ this.router.navigateByUrl(defaultRoute);
2004
+ }
2005
+ onNavTypeChange(type) {
2006
+ this.cacheService.set('_yz_header_type', type);
2007
+ this.win.location.reload();
2008
+ }
2009
+ addLayoutDisplayListener() {
2010
+ this.layoutDisplayService.listen('nav', (display) => {
2011
+ this.state.display.nav = display;
2012
+ });
2013
+ this.layoutDisplayService.listen('aside', (display) => {
2014
+ this.state.display.aside = display;
2015
+ });
2016
+ this.layoutDisplayService.listen('reuseTab', (display) => {
2017
+ this.state.display.reusetab = display;
2018
+ });
2019
+ }
2020
+ ngOnDestroy() {
2021
+ this.state.destroy$.complete();
2022
+ }
2023
+ }
2024
+ YzLayoutBasicComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YzLayoutBasicComponent, deps: [{ token: LayoutDisplayService }, { token: i1$3.CacheService }, { token: i3$3.StompService }, { token: i4$3.Router }, { token: WINDOW }], target: i0.ɵɵFactoryTarget.Component });
2025
+ YzLayoutBasicComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: YzLayoutBasicComponent, selector: "yz-layout-basic", ngImport: i0, template: `<layout-default
2026
+ [options]="options"
2027
+ [asideUser]="asideUserTpl"
2028
+ [content]="displayReusetab ? contentTpl : noneTpl"
2029
+ >
2030
+ <!-- nav -->
2031
+ <layout-default-header-item direction="left">
2032
+ <ng-container [ngSwitch]="navType">
2033
+ <ng-container *ngSwitchCase="NavType.APPLICATION">
2034
+ <layout-nav-application></layout-nav-application>
2035
+ </ng-container>
2036
+ <ng-container *ngSwitchCase="NavType.GROUP"> <layout-nav-group></layout-nav-group></ng-container>
2037
+ <ng-container *ngSwitchCase="NavType.TILE"> <layout-nav-tile></layout-nav-tile> </ng-container>
2038
+ <ng-container *ngSwitchDefault> <layout-nav-application></layout-nav-application> </ng-container>
2039
+ </ng-container>
2040
+ </layout-default-header-item>
2041
+ <!-- nav end -->
2042
+ <layout-default-header-item direction="right" hidden="mobile">
2043
+ <yunzai-notify></yunzai-notify>
2044
+ </layout-default-header-item>
2045
+ <layout-default-header-item direction="right" hidden="mobile">
2046
+ <yunzai-theme-btn></yunzai-theme-btn>
2047
+ </layout-default-header-item>
2048
+ <!-- setting -->
2049
+ <layout-default-header-item direction="right" hidden="mobile">
2050
+ <div
2051
+ layout-default-header-item-trigger
2052
+ nz-dropdown
2053
+ [nzDropdownMenu]="settingsMenu"
2054
+ nzTrigger="click"
2055
+ nzPlacement="bottomRight"
2056
+ >
2057
+ <i nz-icon nzType="setting"></i>
2058
+ </div>
2059
+ <nz-dropdown-menu #settingsMenu="nzDropdownMenu">
2060
+ <div nz-menu style="width: 200px;">
2061
+ <div nz-menu-item>
2062
+ {{ 'menu.application.mode' | i18n }}
2063
+ </div>
2064
+
2065
+ <div nz-menu-item (click)="onNavTypeChange(NavType.APPLICATION)">
2066
+ <i nz-icon nzType="appstore" class="mr-sm"></i>
2067
+ {{ 'menu.application.application' | i18n }}
2068
+ </div>
2069
+ <div nz-menu-item (click)="onNavTypeChange(NavType.GROUP)">
2070
+ <i nz-icon nzType="group" class="mr-sm"></i>
2071
+ {{ 'menu.application.group' | i18n }}
2072
+ </div>
2073
+ <div nz-menu-item (click)="onNavTypeChange(NavType.TILE)">
2074
+ <i nz-icon nzType="appstore" class="mr-sm"></i>
2075
+ {{ 'menu.application.tile' | i18n }}
2076
+ </div>
2077
+ <div nz-menu-item> <yunzai-fullscreen></yunzai-fullscreen> </div>
2078
+ <div nz-menu-item> <yunzai-clearstorage></yunzai-clearstorage> </div>
2079
+ <div nz-menu-item> <yunzai-i18n></yunzai-i18n> </div>
2080
+ </div>
2081
+ </nz-dropdown-menu>
2082
+ </layout-default-header-item>
2083
+ <!-- setting end -->
2084
+ </layout-default>
2085
+ <ng-template #asideUserTpl>
2086
+ <div nz-dropdown nzTrigger="click" [nzDropdownMenu]="userMenu" class="yunzai-default__aside-user">
2087
+ <nz-avatar class="yunzai-default__aside-user-avatar" [nzSrc]="aside.icon"></nz-avatar>
2088
+ <div class="yunzai-default__aside-user-info">
2089
+ <strong>{{ aside.name }}</strong>
2090
+ <p class="mb0">{{ aside.intro }}</p>
2091
+ </div>
2092
+ </div>
2093
+ <nz-dropdown-menu #userMenu="nzDropdownMenu">
2094
+ <ul nz-menu>
2095
+ <li nz-menu-item routerLink="/">{{ 'menu.backtohome' | i18n }}</li>
2096
+ </ul>
2097
+ </nz-dropdown-menu>
2098
+ </ng-template>
2099
+ <ng-template #contentTpl>
2100
+ <reuse-tab #reuseTab [ngStyle]="reusetabCSS"></reuse-tab>
2101
+ <router-outlet (activate)="reuseTab.activate($event)" (attach)="reuseTab.activate($event)"></router-outlet>
2102
+ </ng-template>
2103
+ <ng-template #noneTpl>
2104
+ <router-outlet></router-outlet>
2105
+ </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: i12.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: 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" }] });
2106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YzLayoutBasicComponent, decorators: [{
2107
+ type: Component,
2108
+ args: [{
2109
+ selector: `yz-layout-basic`,
2110
+ template: `<layout-default
2111
+ [options]="options"
2112
+ [asideUser]="asideUserTpl"
2113
+ [content]="displayReusetab ? contentTpl : noneTpl"
2114
+ >
2115
+ <!-- nav -->
2116
+ <layout-default-header-item direction="left">
2117
+ <ng-container [ngSwitch]="navType">
2118
+ <ng-container *ngSwitchCase="NavType.APPLICATION">
2119
+ <layout-nav-application></layout-nav-application>
2120
+ </ng-container>
2121
+ <ng-container *ngSwitchCase="NavType.GROUP"> <layout-nav-group></layout-nav-group></ng-container>
2122
+ <ng-container *ngSwitchCase="NavType.TILE"> <layout-nav-tile></layout-nav-tile> </ng-container>
2123
+ <ng-container *ngSwitchDefault> <layout-nav-application></layout-nav-application> </ng-container>
2124
+ </ng-container>
2125
+ </layout-default-header-item>
2126
+ <!-- nav end -->
2127
+ <layout-default-header-item direction="right" hidden="mobile">
2128
+ <yunzai-notify></yunzai-notify>
2129
+ </layout-default-header-item>
2130
+ <layout-default-header-item direction="right" hidden="mobile">
2131
+ <yunzai-theme-btn></yunzai-theme-btn>
2132
+ </layout-default-header-item>
2133
+ <!-- setting -->
2134
+ <layout-default-header-item direction="right" hidden="mobile">
2135
+ <div
2136
+ layout-default-header-item-trigger
2137
+ nz-dropdown
2138
+ [nzDropdownMenu]="settingsMenu"
2139
+ nzTrigger="click"
2140
+ nzPlacement="bottomRight"
2141
+ >
2142
+ <i nz-icon nzType="setting"></i>
2143
+ </div>
2144
+ <nz-dropdown-menu #settingsMenu="nzDropdownMenu">
2145
+ <div nz-menu style="width: 200px;">
2146
+ <div nz-menu-item>
2147
+ {{ 'menu.application.mode' | i18n }}
2148
+ </div>
2149
+
2150
+ <div nz-menu-item (click)="onNavTypeChange(NavType.APPLICATION)">
2151
+ <i nz-icon nzType="appstore" class="mr-sm"></i>
2152
+ {{ 'menu.application.application' | i18n }}
2153
+ </div>
2154
+ <div nz-menu-item (click)="onNavTypeChange(NavType.GROUP)">
2155
+ <i nz-icon nzType="group" class="mr-sm"></i>
2156
+ {{ 'menu.application.group' | i18n }}
2157
+ </div>
2158
+ <div nz-menu-item (click)="onNavTypeChange(NavType.TILE)">
2159
+ <i nz-icon nzType="appstore" class="mr-sm"></i>
2160
+ {{ 'menu.application.tile' | i18n }}
2161
+ </div>
2162
+ <div nz-menu-item> <yunzai-fullscreen></yunzai-fullscreen> </div>
2163
+ <div nz-menu-item> <yunzai-clearstorage></yunzai-clearstorage> </div>
2164
+ <div nz-menu-item> <yunzai-i18n></yunzai-i18n> </div>
2165
+ </div>
2166
+ </nz-dropdown-menu>
2167
+ </layout-default-header-item>
2168
+ <!-- setting end -->
2169
+ </layout-default>
2170
+ <ng-template #asideUserTpl>
2171
+ <div nz-dropdown nzTrigger="click" [nzDropdownMenu]="userMenu" class="yunzai-default__aside-user">
2172
+ <nz-avatar class="yunzai-default__aside-user-avatar" [nzSrc]="aside.icon"></nz-avatar>
2173
+ <div class="yunzai-default__aside-user-info">
2174
+ <strong>{{ aside.name }}</strong>
2175
+ <p class="mb0">{{ aside.intro }}</p>
2176
+ </div>
2177
+ </div>
2178
+ <nz-dropdown-menu #userMenu="nzDropdownMenu">
2179
+ <ul nz-menu>
2180
+ <li nz-menu-item routerLink="/">{{ 'menu.backtohome' | i18n }}</li>
2181
+ </ul>
2182
+ </nz-dropdown-menu>
2183
+ </ng-template>
2184
+ <ng-template #contentTpl>
2185
+ <reuse-tab #reuseTab [ngStyle]="reusetabCSS"></reuse-tab>
2186
+ <router-outlet (activate)="reuseTab.activate($event)" (attach)="reuseTab.activate($event)"></router-outlet>
2187
+ </ng-template>
2188
+ <ng-template #noneTpl>
2189
+ <router-outlet></router-outlet>
2190
+ </ng-template> `
2191
+ }]
2192
+ }], ctorParameters: function () {
2193
+ return [{ type: LayoutDisplayService }, { type: i1$3.CacheService }, { type: i3$3.StompService }, { type: i4$3.Router }, { type: undefined, decorators: [{
2194
+ type: Inject,
2195
+ args: [WINDOW]
2196
+ }] }];
2197
+ } });
2198
+
2199
+ const BUSINESS_DEFAULT_CONFIG = {
2200
+ baseUrl: '/backstage',
2201
+ systemCode: 'portal',
2202
+ loginForm: null,
2203
+ refreshTokenEnabled: true,
2204
+ refreshTokenType: 're-request'
2205
+ };
2206
+ function mergeBisConfig(srv) {
2207
+ return srv.merge('bis', BUSINESS_DEFAULT_CONFIG);
2208
+ }
2209
+
2210
+ class YunzaiUserComponent {
2211
+ constructor(injector, msg, tokenService,
2212
+ // @ts-ignore
2213
+ configService, cacheService) {
2214
+ this.injector = injector;
2215
+ this.msg = msg;
2216
+ this.tokenService = tokenService;
2217
+ this.configService = configService;
2218
+ this.cacheService = cacheService;
2219
+ this.icon = '';
2220
+ this.username = '';
2221
+ this.menus = [];
2222
+ this.config = mergeBisConfig(configService);
2223
+ }
2224
+ ngOnInit() {
2225
+ const projectInfo = this.cacheService.get('_yz_project_info', { mode: 'none' });
2226
+ const user = this.cacheService.get('_yz_user', { mode: 'none' });
2227
+ this.username = user.realname ? user.realname : '未命名';
2228
+ this.icon = user.avatarId
2229
+ ? `${this.config.baseUrl}/filecenter/file/${user.avatarId}`
2230
+ : `./assets/tmp/img/avatar.jpg`;
2231
+ this.menus = projectInfo.profileList;
2232
+ }
2233
+ logout() {
2234
+ localStorage.clear();
2235
+ this.tokenService.clear();
2236
+ this.injector.get(WINDOW).location.href = `${this.config.baseUrl}/cas-proxy/app/logout`;
2237
+ }
2238
+ to(href) {
2239
+ if (href) {
2240
+ this.injector.get(WINDOW).open(href);
2241
+ }
2242
+ else {
2243
+ this.msg.error('该菜单没有配置链接!');
2244
+ }
2245
+ }
2246
+ }
2247
+ 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$4.YunzaiConfigService }, { token: i1$3.CacheService }], target: i0.ɵɵFactoryTarget.Component });
2248
+ YunzaiUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: YunzaiUserComponent, selector: "yunzai-user", ngImport: i0, template: `
2249
+ <div
2250
+ class="yunzai-default__nav-item d-flex align-items-center px-sm"
2251
+ nz-dropdown
2252
+ nzPlacement="bottomRight"
2253
+ [nzDropdownMenu]="userMenu"
2254
+ >
2255
+ <div class="yz-user-name">
2256
+ <nz-avatar [nzSrc]="icon" nzSize="small" class="mr-sm"></nz-avatar>
2257
+ {{ username }}
2258
+ </div>
2259
+ </div>
2260
+ <nz-dropdown-menu #userMenu="nzDropdownMenu">
2261
+ <div nz-menu class="width-sm">
2262
+ <div nz-menu-item *ngFor="let m of menus" (click)="to(m.url)">
2263
+ <i nz-icon [nzType]="m.icon" class="mr-sm"></i>
2264
+ {{ m.name | i18n }}
2265
+ </div>
2266
+ <li nz-menu-divider></li>
2267
+ <div nz-menu-item (click)="logout()">
2268
+ <i nz-icon nzType="logout" class="mr-sm"></i>
2269
+ {{ 'menu.account.logout' | i18n }}
2270
+ </div>
2271
+ </div>
2272
+ </nz-dropdown-menu>
2273
+ `, 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: i12.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 });
2274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiUserComponent, decorators: [{
2275
+ type: Component,
2276
+ args: [{
2277
+ selector: 'yunzai-user',
2278
+ template: `
2279
+ <div
2280
+ class="yunzai-default__nav-item d-flex align-items-center px-sm"
2281
+ nz-dropdown
2282
+ nzPlacement="bottomRight"
2283
+ [nzDropdownMenu]="userMenu"
2284
+ >
2285
+ <div class="yz-user-name">
2286
+ <nz-avatar [nzSrc]="icon" nzSize="small" class="mr-sm"></nz-avatar>
2287
+ {{ username }}
2288
+ </div>
2289
+ </div>
2290
+ <nz-dropdown-menu #userMenu="nzDropdownMenu">
2291
+ <div nz-menu class="width-sm">
2292
+ <div nz-menu-item *ngFor="let m of menus" (click)="to(m.url)">
2293
+ <i nz-icon [nzType]="m.icon" class="mr-sm"></i>
2294
+ {{ m.name | i18n }}
2295
+ </div>
2296
+ <li nz-menu-divider></li>
2297
+ <div nz-menu-item (click)="logout()">
2298
+ <i nz-icon nzType="logout" class="mr-sm"></i>
2299
+ {{ 'menu.account.logout' | i18n }}
2300
+ </div>
2301
+ </div>
2302
+ </nz-dropdown-menu>
2303
+ `,
2304
+ changeDetection: ChangeDetectionStrategy.OnPush
2305
+ }]
2306
+ }], ctorParameters: function () {
2307
+ return [{ type: i0.Injector }, { type: i1$1.NzMessageService }, { type: undefined, decorators: [{
2308
+ type: Inject,
2309
+ args: [YA_SERVICE_TOKEN]
2310
+ }] }, { type: i1$4.YunzaiConfigService }, { type: i1$3.CacheService }];
2311
+ } });
2312
+
2313
+ class ActGuard {
2314
+ constructor(configService, cacheService, pathToRegexp, router) {
2315
+ this.configService = configService;
2316
+ this.cacheService = cacheService;
2317
+ this.pathToRegexp = pathToRegexp;
2318
+ this.router = router;
2319
+ this.bis = BUSINESS_DEFAULT_CONFIG;
2320
+ this.menus = [];
2321
+ this.links = [];
2322
+ log$1('act: ');
2323
+ this.bis = mergeBisConfig(this.configService);
2324
+ log$1('act: config ', this.bis);
2325
+ const user = this.cacheService.get('_yz_user', { mode: 'none' });
2326
+ log$1('act: user ', user);
2327
+ this.menus = deepCopy(user.menu).filter((m) => m.systemCode && m.systemCode === this.bis.systemCode);
2328
+ log$1('act: menus ', this.menus);
2329
+ this.getAllLinks(this.menus, this.links);
2330
+ log$1('act: links ', this.links);
2331
+ }
2332
+ canActivate(_, state) {
2333
+ log$1('act: can activate ', state);
2334
+ if (this.preHandle(state)) {
2335
+ return true;
2336
+ }
2337
+ log$1('act: can activate child prehandle success');
2338
+ let canactivate = false;
2339
+ this.links.forEach((link) => {
2340
+ const regexp = this.pathToRegexp.stringToRegexp(link, null, null);
2341
+ log$1(`act: ${link} test ${state.url.split('?')[0]}`);
2342
+ if (regexp.test(state.url.split('?')[0])) {
2343
+ canactivate = true;
2344
+ log$1(`act: test value ${canactivate}`);
2345
+ return;
2346
+ }
2347
+ });
2348
+ if (canactivate) {
2349
+ log$1(`act: test sucess`);
2350
+ return true;
2351
+ }
2352
+ else {
2353
+ log$1(`act: test error`);
2354
+ this.router.navigate(['displayIndex']);
2355
+ return false;
2356
+ }
2357
+ }
2358
+ canActivateChild(_, state) {
2359
+ log$1('act: can activate child ', state);
2360
+ if (this.preHandle(state)) {
2361
+ return true;
2362
+ }
2363
+ log$1('act: can activate child prehandle success');
2364
+ let canactivate = false;
2365
+ this.links.forEach((link) => {
2366
+ const regexp = this.pathToRegexp.stringToRegexp(link, null, null);
2367
+ if (regexp.test(state.url.split('?')[0])) {
2368
+ log$1(`act: ${link} test ${state.url.split('?')[0]}`);
2369
+ canactivate = true;
2370
+ log$1(`act: test value ${canactivate}`);
2371
+ return;
2372
+ }
2373
+ });
2374
+ if (canactivate) {
2375
+ log$1(`act: test sucess`);
2376
+ return true;
2377
+ }
2378
+ else {
2379
+ log$1(`act: test error`);
2380
+ this.router.navigate(['displayIndex']);
2381
+ return false;
2382
+ }
2383
+ }
2384
+ preHandle(state) {
2385
+ return (state.url.includes('error') ||
2386
+ state.url.includes('exception') ||
2387
+ state.url.includes('displayIndex') ||
2388
+ state.url === '' ||
2389
+ state.url === null ||
2390
+ state.url === '/' ||
2391
+ state.url.includes('iframePage'));
2392
+ }
2393
+ getAllLinks(menu, links) {
2394
+ menu.forEach((sider) => {
2395
+ if (sider.link) {
2396
+ links.push(sider.link);
2397
+ }
2398
+ if (sider.children && sider.children.length > 0) {
2399
+ this.getAllLinks(sider.children, links);
2400
+ }
2401
+ });
2402
+ }
2403
+ }
2404
+ ActGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ActGuard, deps: [{ token: i1$4.YunzaiConfigService }, { token: i1$3.CacheService }, { token: i1$4.PathToRegexpService }, { token: i4$3.Router }], target: i0.ɵɵFactoryTarget.Injectable });
2405
+ ActGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ActGuard, providedIn: 'root' });
2406
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ActGuard, decorators: [{
2407
+ type: Injectable,
2408
+ args: [{
2409
+ providedIn: 'root'
2410
+ }]
2411
+ }], ctorParameters: function () { return [{ type: i1$4.YunzaiConfigService }, { type: i1$3.CacheService }, { type: i1$4.PathToRegexpService }, { type: i4$3.Router }]; } });
2412
+
2413
+ class YunzaiAuthService {
2414
+ constructor(injector) {
2415
+ this.injector = injector;
2416
+ this.config = mergeBisConfig(this.configService);
2417
+ }
2418
+ get configService() {
2419
+ return this.injector.get(YunzaiConfigService);
2420
+ }
2421
+ get tokenService() {
2422
+ return this.injector.get(YA_SERVICE_TOKEN);
2423
+ }
2424
+ get httpClient() {
2425
+ return this.injector.get(_HttpClient);
2426
+ }
2427
+ get cacheService() {
2428
+ return this.injector.get(CacheService);
2429
+ }
2430
+ askToken() {
2431
+ var _a;
2432
+ log$1('yz.auth.service: ', 'askToken');
2433
+ if ((_a = this.tokenService.get()) === null || _a === void 0 ? void 0 : _a.token) {
2434
+ return of(this.tokenService.get());
2435
+ }
2436
+ else {
2437
+ if (this.config.loginForm) {
2438
+ return this.fetchTokenByUP();
2439
+ }
2440
+ else {
2441
+ return this.fetchTokenByCas();
2442
+ }
2443
+ }
2444
+ }
2445
+ fetchTokenByUP() {
2446
+ log$1('yz.auth.service: ', 'fetchTokenByUP');
2447
+ return this.httpClient.post(`/auth/oauth/token?_allow_anonymous=true`, this.config.loginForm).pipe(map((response) => {
2448
+ const { access_token, expires_in, refresh_token, scope, token_type } = response;
2449
+ return {
2450
+ token: access_token,
2451
+ expired: expires_in,
2452
+ refreshToken: refresh_token,
2453
+ tokenType: token_type,
2454
+ scope
2455
+ };
2456
+ }));
2457
+ }
2458
+ fetchTokenByCas() {
2459
+ log$1('yz.auth.service: ', 'fetchTokenByCas');
2460
+ const uri = encodeURIComponent(this.injector.get(WINDOW).location.href);
2461
+ return this.httpClient
2462
+ .get(`/cas-proxy/app/validate_full?callback=${uri}&_allow_anonymous=true&timestamp=${new Date().getTime()}`)
2463
+ .pipe(map((response) => {
2464
+ switch (response.errcode) {
2465
+ case 2000:
2466
+ const { access_token, expires_in, refresh_token, scope, token_type } = response.data;
2467
+ return {
2468
+ token: access_token,
2469
+ expired: expires_in,
2470
+ refreshToken: refresh_token,
2471
+ tokenType: token_type,
2472
+ scope
2473
+ };
2474
+ case 2001:
2475
+ this.injector.get(WINDOW).location.href = response.msg;
2476
+ throw Error("Cookie Error: Can't find Cas Cookie,So jump to login!");
2477
+ default:
2478
+ if (response.data) {
2479
+ console.error(response.data);
2480
+ throw Error(response.data);
2481
+ }
2482
+ else if (response.msg) {
2483
+ console.error(response.msg);
2484
+ throw Error(response.msg);
2485
+ }
2486
+ else {
2487
+ console.error('cas unknown error');
2488
+ throw Error('Unknown Error: Cas auth exception!');
2489
+ }
2490
+ }
2491
+ }));
2492
+ }
2493
+ login() {
2494
+ log$1('yz.auth.service: ', 'login white login form->', this.config.loginForm);
2495
+ return this.askToken().pipe(mergeMap(token => {
2496
+ log$1('yz.auth.service: get token->', token);
2497
+ this.configService.set('auth', {
2498
+ token_send_key: 'Authorization',
2499
+ token_send_template: `${token.tokenType} \${token}`,
2500
+ token_send_place: 'header'
2501
+ });
2502
+ log$1('yz.auth.service: ', 'set token');
2503
+ this.tokenService.set(token);
2504
+ return this.cacheInit();
2505
+ }), mergeAll());
2506
+ }
2507
+ cacheInit() {
2508
+ log$1('yz.auth.service: ', 'cacheInit');
2509
+ const user = this.cacheService.get('_yz_user', { mode: 'none' });
2510
+ const header = this.cacheService.get('_yz_header', { mode: 'none' });
2511
+ const project = this.cacheService.get('_yz_project_info', { mode: 'none' });
2512
+ return forkJoin(of(user), of(header), of(project)).pipe(mergeMap(([u, h, p]) => {
2513
+ let list = [];
2514
+ // user cache
2515
+ if (!u) {
2516
+ log$1('yz.auth.service: ', 'fetch user cache');
2517
+ list.push(this.httpClient.get(`/auth/user`).pipe(map((user) => {
2518
+ this.cacheService.set('_yz_user', user.principal);
2519
+ })));
2520
+ }
2521
+ else {
2522
+ log$1('yz.auth.service: ', 'user recache');
2523
+ list.push(of(() => { }));
2524
+ }
2525
+ // header cache
2526
+ if (!h) {
2527
+ log$1('yz.auth.service: ', 'fetch header cache');
2528
+ list.push(this.httpClient.get(`/auth/allheader/v2`).pipe(map((header) => {
2529
+ this.cacheService.set('_yz_header', header.data);
2530
+ })));
2531
+ }
2532
+ else {
2533
+ log$1('yz.auth.service: ', 'header recache');
2534
+ list.push(of(() => { }));
2535
+ }
2536
+ // project cache
2537
+ if (!p) {
2538
+ log$1('yz.auth.service: ', 'fetch project cache');
2539
+ list.push(this.httpClient.get(`/app-manager/project/info`).pipe(map((info) => {
2540
+ this.cacheService.set('_yz_project_info', info.data);
2541
+ })));
2542
+ }
2543
+ else {
2544
+ log$1('yz.auth.service: ', 'project recache');
2545
+ list.push(of(() => { }));
2546
+ }
2547
+ return forkJoin(list);
2548
+ }));
2549
+ }
2550
+ }
2551
+ YunzaiAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiAuthService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
2552
+ YunzaiAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiAuthService, providedIn: 'root' });
2553
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiAuthService, decorators: [{
2554
+ type: Injectable,
2555
+ args: [{ providedIn: 'root' }]
2556
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
2557
+
2558
+ const CODEMESSAGE = {
2559
+ 200: '服务器成功返回请求的数据。',
2560
+ 201: '新建或修改数据成功。',
2561
+ 202: '一个请求已经进入后台排队(异步任务)。',
2562
+ 204: '删除数据成功。',
2563
+ 400: '发出的请求有错误,服务器没有进行新建或修改数据的操作。',
2564
+ 401: '用户没有权限(令牌、用户名、密码错误)。',
2565
+ 403: '用户得到授权,但是访问是被禁止的。',
2566
+ 404: '发出的请求针对的是不存在的记录,服务器没有进行操作。',
2567
+ 406: '请求的格式不可得。',
2568
+ 410: '请求的资源被永久删除,且不会再得到的。',
2569
+ 422: '当创建一个对象时,发生一个验证错误。',
2570
+ 500: '服务器发生错误,请检查服务器。',
2571
+ 502: '网关错误。',
2572
+ 503: '服务不可用,服务器暂时过载或维护。',
2573
+ 504: '网关超时。'
2574
+ };
2575
+ class YunzaiDefaultInterceptor {
2576
+ get notification() {
2577
+ return this.injector.get(NzNotificationService);
2578
+ }
2579
+ get tokenSrv() {
2580
+ return this.injector.get(YA_SERVICE_TOKEN);
2581
+ }
2582
+ get http() {
2583
+ return this.injector.get(_HttpClient);
2584
+ }
2585
+ get config() {
2586
+ return mergeBisConfig(this.injector.get(YunzaiConfigService$1));
2587
+ }
2588
+ goTo(url) {
2589
+ setTimeout(() => this.injector.get(Router).navigateByUrl(url));
2590
+ }
2591
+ constructor(injector) {
2592
+ this.injector = injector;
2593
+ this.jump = false;
2594
+ this.refreshToking = false;
2595
+ this.refreshToken$ = new BehaviorSubject(null);
2596
+ if (this.config.refreshTokenType === 'auth-refresh') {
2597
+ console.error("can't use auth-refresh, please change yz.default.interceptor to default.interceptor!");
2598
+ }
2599
+ }
2600
+ checkStatus(ev) {
2601
+ if ((ev.status >= 200 && ev.status < 300) || ev.status === 401) {
2602
+ return;
2603
+ }
2604
+ if (ev instanceof HttpErrorResponse && (ev.error.message || ev.error.errorMessage)) {
2605
+ if (ev.error.errorMessage) {
2606
+ this.notification.error(`发生了一些错误 `, ev.error.errorMessage);
2607
+ }
2608
+ else {
2609
+ this.notification.error(`发生了一些错误 `, ev.error.message);
2610
+ }
2611
+ return;
2612
+ }
2613
+ if (ev instanceof HttpResponse && ev.body.errorMessage) {
2614
+ this.notification.error(`发生了一些错误 `, ev.body.errorMessage);
2615
+ return;
2616
+ }
2617
+ const errortext = CODEMESSAGE[ev.status] || ev.statusText;
2618
+ this.notification.error(`请求错误 ${ev.status}: ${ev.url}`, errortext);
2619
+ }
2620
+ ToLogin() {
2621
+ this.notification.error(`未登录或登录状态已过期,5秒后将跳转到登录页面。`, ``);
2622
+ setTimeout(() => {
2623
+ localStorage.clear();
2624
+ this.injector.get(WINDOW).location.href = `${this.config.baseUrl}/cas-proxy/app/logout`;
2625
+ }, 5000);
2626
+ }
2627
+ reAttachToken(req) {
2628
+ var _a;
2629
+ const token = (_a = this.tokenSrv.get()) === null || _a === void 0 ? void 0 : _a.token;
2630
+ return req.clone({
2631
+ setHeaders: {
2632
+ Authorization: `Bearer ${token}`
2633
+ }
2634
+ });
2635
+ }
2636
+ refreshTokenRequest() {
2637
+ const model = this.tokenSrv.get();
2638
+ const form = new FormData();
2639
+ form.set('refresh_token', model === null || model === void 0 ? void 0 : model.refreshToken);
2640
+ form.set('grant_type', 'refresh_token');
2641
+ form.set('scope', 'webapp');
2642
+ log('yz.default.interceptor: use the refresh token to request a new token', model === null || model === void 0 ? void 0 : model.refreshToken);
2643
+ // return this.http.post(`/auth/user/token/refresh?_allow_anonymous=true`, form);
2644
+ return this.http.post(`/auth/oauth/getOrCreateToken/webapp`, form);
2645
+ }
2646
+ tryRefreshToken(ev, req, next) {
2647
+ // 连刷新Token的请求都错了,那就是真错了
2648
+ if (['/auth/oauth/getOrCreateToken/webapp'].some(url => req.url.includes(url))) {
2649
+ this.ToLogin();
2650
+ return throwError(() => ev);
2651
+ }
2652
+ // 正在刷新token,所有其他请求排队
2653
+ if (this.refreshToking) {
2654
+ return this.refreshToken$.pipe(filter(v => !!v), take(1), switchMap(() => next.handle(this.reAttachToken(req))));
2655
+ }
2656
+ //尝试调用刷新 Token
2657
+ this.refreshToking = true;
2658
+ this.refreshToken$.next(null);
2659
+ // 处理Token
2660
+ return this.refreshTokenRequest().pipe(switchMap(res => {
2661
+ log('yz.default.interceptor: refresh token accessed -> ', res);
2662
+ // 重新保存新 token
2663
+ const { access_token, expires_in, refresh_token, scope, token_type } = res;
2664
+ this.tokenSrv.set({
2665
+ token: access_token,
2666
+ expired: expires_in,
2667
+ refreshToken: refresh_token,
2668
+ tokenType: token_type,
2669
+ scope
2670
+ });
2671
+ // 通知后续请求继续执行
2672
+ this.refreshToking = false;
2673
+ this.refreshToken$.next(res);
2674
+ // 重新发起请求
2675
+ return next.handle(this.reAttachToken(req));
2676
+ }), catchError(err => {
2677
+ this.refreshToking = false;
2678
+ this.ToLogin();
2679
+ return throwError(() => err);
2680
+ }));
2681
+ }
2682
+ getAdditionalHeaders(headers) {
2683
+ const res = {};
2684
+ const lang = this.injector.get(YUNZAI_I18N_TOKEN).currentLang;
2685
+ if (!(headers === null || headers === void 0 ? void 0 : headers.has('Accept-Language')) && lang) {
2686
+ res['Accept-Language'] = lang;
2687
+ }
2688
+ return res;
2689
+ }
2690
+ handleData(ev, req, next) {
2691
+ this.checkStatus(ev);
2692
+ switch (ev.status) {
2693
+ case 200:
2694
+ return of(ev);
2695
+ case 401:
2696
+ if (this.config.refreshTokenEnabled && this.config.refreshTokenType === 're-request') {
2697
+ const unAuthorizationReq = req.clone();
2698
+ unAuthorizationReq.headers.delete('Authorization');
2699
+ return this.tryRefreshToken(ev, unAuthorizationReq, next);
2700
+ }
2701
+ this.ToLogin();
2702
+ break;
2703
+ case 403:
2704
+ case 404:
2705
+ case 500:
2706
+ if (this.jump) {
2707
+ this.goTo(`/exception/${ev.status}`);
2708
+ }
2709
+ break;
2710
+ default:
2711
+ if (ev instanceof HttpErrorResponse) {
2712
+ console.warn('未可知错误,大部分是由于后端不支持跨域CORS或无效配置引起,请参考 https://ng.yunzainfo.com/docs/server 解决跨域问题', ev);
2713
+ }
2714
+ break;
2715
+ }
2716
+ if (ev instanceof HttpErrorResponse) {
2717
+ return throwError(() => ev);
2718
+ }
2719
+ else {
2720
+ return of(ev);
2721
+ }
2722
+ }
2723
+ intercept(req, next) {
2724
+ if (req.context.get(ALLOW_ANONYMOUS))
2725
+ return next.handle(req);
2726
+ log('yz.default.interceptor.ts: ', 'request ', req);
2727
+ // 统一加前缀
2728
+ let url = req.url;
2729
+ if (!url.startsWith('https://') && !url.startsWith('http://')) {
2730
+ url = this.config.baseUrl + url;
2731
+ }
2732
+ if (url.includes('.json') && url.includes('assets')) {
2733
+ url = req.url;
2734
+ }
2735
+ // 加入语言头
2736
+ const newReq = req.clone({ url, setHeaders: this.getAdditionalHeaders(req.headers) });
2737
+ return next.handle(newReq).pipe(mergeMap(ev => {
2738
+ // 允许统一对请求错误处理
2739
+ if (ev instanceof HttpResponseBase) {
2740
+ return this.handleData(ev, newReq, next);
2741
+ }
2742
+ // 若一切都正常,则后续操作
2743
+ return of(ev);
2744
+ }), catchError((err) => this.handleData(err, newReq, next)));
2745
+ }
2746
+ }
2747
+ YunzaiDefaultInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiDefaultInterceptor, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
2748
+ YunzaiDefaultInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiDefaultInterceptor });
2749
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiDefaultInterceptor, decorators: [{
2750
+ type: Injectable
2751
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
2752
+
2753
+ const WIDGETS = [
2754
+ YunzaiClearStorageComponent,
2755
+ YunzaiFullScreenComponent,
2756
+ YunzaiI18NComponent,
2757
+ YunzaiNotifyComponent,
2758
+ YunzaiThemBtnComponent,
2759
+ YunzaiUserComponent
2760
+ ];
2761
+ const LAYOUT_NAV_COMPONENTS = [LayoutNavApplicationComponent, LayoutNavGroupComponent, LayoutNavTileComponent];
2762
+ const COMPONENTS = [YzLayoutBasicComponent];
2763
+ class YunzaiLayoutModule {
2764
+ }
2765
+ YunzaiLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2766
+ YunzaiLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: YunzaiLayoutModule, declarations: [YzLayoutBasicComponent, YunzaiClearStorageComponent,
2767
+ YunzaiFullScreenComponent,
2768
+ YunzaiI18NComponent,
2769
+ YunzaiNotifyComponent,
2770
+ YunzaiThemBtnComponent,
2771
+ YunzaiUserComponent, LayoutNavApplicationComponent, LayoutNavGroupComponent, LayoutNavTileComponent], imports: [HttpClientModule,
2772
+ CommonModule,
2773
+ FormsModule,
2774
+ RouterModule,
2775
+ ReactiveFormsModule,
2776
+ YunzaiSharedYelonModule,
2777
+ YunzaiSharedZorroModule], exports: [YzLayoutBasicComponent, YunzaiClearStorageComponent,
2778
+ YunzaiFullScreenComponent,
2779
+ YunzaiI18NComponent,
2780
+ YunzaiNotifyComponent,
2781
+ YunzaiThemBtnComponent,
2782
+ YunzaiUserComponent, LayoutNavApplicationComponent, LayoutNavGroupComponent, LayoutNavTileComponent] });
2783
+ YunzaiLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiLayoutModule, providers: [
2784
+ {
2785
+ provide: YUNZAI_THEME_BTN_KEYS,
2786
+ useValue: 'site-theme'
2787
+ }
2788
+ ], imports: [HttpClientModule,
2789
+ CommonModule,
2790
+ FormsModule,
2791
+ RouterModule,
2792
+ ReactiveFormsModule,
2793
+ YunzaiSharedYelonModule,
2794
+ YunzaiSharedZorroModule] });
2795
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiLayoutModule, decorators: [{
2796
+ type: NgModule,
2797
+ args: [{
2798
+ imports: [
2799
+ HttpClientModule,
2800
+ CommonModule,
2801
+ FormsModule,
2802
+ RouterModule,
2803
+ ReactiveFormsModule,
2804
+ YunzaiSharedYelonModule,
2805
+ YunzaiSharedZorroModule
2806
+ ],
2807
+ providers: [
2808
+ {
2809
+ provide: YUNZAI_THEME_BTN_KEYS,
2810
+ useValue: 'site-theme'
2811
+ }
2812
+ ],
2813
+ declarations: [...COMPONENTS, ...WIDGETS, ...LAYOUT_NAV_COMPONENTS],
2814
+ exports: [...COMPONENTS, ...WIDGETS, ...LAYOUT_NAV_COMPONENTS]
2815
+ }]
2816
+ }] });
2817
+
2818
+ class YunzaiStartupService {
2819
+ constructor(iconSrv, menuService, i18n, win, settingService, aclService, titleService, yzAuthService, cacheService, configService) {
2820
+ this.menuService = menuService;
2821
+ this.i18n = i18n;
2822
+ this.win = win;
2823
+ this.settingService = settingService;
2824
+ this.aclService = aclService;
2825
+ this.titleService = titleService;
2826
+ this.yzAuthService = yzAuthService;
2827
+ this.cacheService = cacheService;
2828
+ this.configService = configService;
2829
+ this.config = BUSINESS_DEFAULT_CONFIG;
2830
+ this.config = mergeBisConfig(this.configService);
2831
+ iconSrv.addIcon(...ICONS);
2832
+ }
2833
+ load() {
2834
+ log$1('startup.service: ', 'load');
2835
+ const defaultLang = this.i18n.defaultLang;
2836
+ return this.i18n.loadLangData(defaultLang).pipe(mergeMap(langData => {
2837
+ log$1('startup.service: ', 'set i18n, defaultLang->', defaultLang, ' langData->', langData);
2838
+ this.i18n.use(defaultLang, langData);
2839
+ return of(null);
2840
+ }), mergeMap(() => {
2841
+ return this.yzAuthService.login();
2842
+ }), mergeMap(v => {
2843
+ // preloader finish
2844
+ this.systemInit();
2845
+ log$1('startup.service: preloader finish');
2846
+ if (this.win && this.win.appBootstrap) {
2847
+ this.win.appBootstrap();
2848
+ }
2849
+ return of(v);
2850
+ }));
2851
+ }
2852
+ systemInit() {
2853
+ log$1('startup.service: system init');
2854
+ // user
2855
+ const yunzaiUser = this.cacheService.get('_yz_user', { mode: 'none' });
2856
+ // menu
2857
+ const yunzaiMenus = deepCopy(yunzaiUser.menu).filter(m => m.systemCode && m.systemCode === this.config.systemCode);
2858
+ mapYzSideToYelonMenu(yunzaiMenus);
2859
+ const currentMenu = yunzaiMenus.pop();
2860
+ if (currentMenu) {
2861
+ // logo app
2862
+ this.settingService.setApp({ name: currentMenu.text, description: currentMenu.intro });
2863
+ this.settingService.setUser({
2864
+ name: yunzaiUser.realname,
2865
+ avatar: `${this.config.baseUrl}/filecenter/file/${yunzaiUser.avatarId}` || '',
2866
+ email: yunzaiUser.email
2867
+ });
2868
+ // title
2869
+ this.titleService.default = currentMenu && currentMenu.text ? currentMenu.text : 'default application name';
2870
+ this.titleService.setTitle(currentMenu && currentMenu.text ? currentMenu.text : 'no title');
2871
+ // acl
2872
+ const abilities = [];
2873
+ generateAbility([currentMenu], abilities, '');
2874
+ this.aclService.attachRole((yunzaiUser === null || yunzaiUser === void 0 ? void 0 : yunzaiUser.roles.map((role) => {
2875
+ return role.roleValue;
2876
+ }).filter((a) => !!a)) || []);
2877
+ this.aclService.attachAbility(abilities);
2878
+ // aside menu
2879
+ this.menuService.add([currentMenu]);
2880
+ // cache current
2881
+ this.cacheService.set('_yz_current', {
2882
+ name: currentMenu.text,
2883
+ intro: currentMenu.intro,
2884
+ icon: currentMenu.appIconUrl
2885
+ });
2886
+ // cache displayIndex
2887
+ const attributes = currentMenu.attribute;
2888
+ if (attributes) {
2889
+ const attr = JSON.parse(attributes);
2890
+ if (attr && attr.defaultRoute) {
2891
+ this.cacheService.set('_yz_defaultRoute', attr.defaultRoute);
2892
+ }
2893
+ else {
2894
+ this.cacheService.set('_yz_defaultRoute', '/displayIndex');
2895
+ }
2896
+ }
2897
+ else {
2898
+ this.cacheService.set('_yz_defaultRoute', '/displayIndex');
2899
+ }
2900
+ }
2901
+ }
2902
+ }
2903
+ 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$3.CacheService }, { token: i1$4.YunzaiConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
2904
+ YunzaiStartupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiStartupService });
2905
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiStartupService, decorators: [{
2906
+ type: Injectable
2907
+ }], ctorParameters: function () {
2908
+ return [{ type: i8.NzIconService }, { type: i1$2.MenuService }, { type: YunzaiI18NService, decorators: [{
2909
+ type: Inject,
2910
+ args: [YUNZAI_I18N_TOKEN]
2911
+ }] }, { type: undefined, decorators: [{
2912
+ type: Inject,
2913
+ args: [WINDOW]
2914
+ }] }, { type: i1$2.SettingsService }, { type: i3$4.ACLService }, { type: i1$2.TitleService }, { type: YunzaiAuthService }, { type: i1$3.CacheService }, { type: i1$4.YunzaiConfigService }];
2915
+ } });
2916
+ function mapYzSideToYelonMenu(menus) {
2917
+ menus.forEach(menu => {
2918
+ menu.badgeDot = menu.badge_dot || null;
2919
+ menu.badgeStatus = menu.badge_status || null;
2920
+ menu.shortcutRoot = menu.shortcut_root || null;
2921
+ menu.reuse = true;
2922
+ if (menu.children) {
2923
+ mapYzSideToYelonMenu(menu.children);
2924
+ }
2925
+ });
2926
+ }
2927
+ function generateAbility(menus, abilities, prefix) {
2928
+ menus.forEach(menu => {
2929
+ if (menu.link) {
2930
+ prefix += menu.link;
2931
+ }
2932
+ else {
2933
+ prefix += '';
2934
+ }
2935
+ if (menu.menuAuths) {
2936
+ menu.menuAuths.forEach((a) => {
2937
+ abilities.push(`${prefix}:${a}`);
2938
+ abilities.push(a);
2939
+ });
2940
+ }
2941
+ if (menu.children) {
2942
+ generateAbility(menu.children, abilities, prefix);
2943
+ }
2944
+ });
2945
+ }
2946
+ function YunzaiStartupServiceFactory(startupService) {
2947
+ return () => startupService.load();
2948
+ }
2949
+ //@ts-ignore
2950
+ const YUNZAI_APPINIT_PROVIDES = [
2951
+ YunzaiStartupService,
2952
+ {
2953
+ provide: APP_INITIALIZER,
2954
+ useFactory: YunzaiStartupServiceFactory,
2955
+ deps: [YunzaiStartupService],
2956
+ multi: true
2957
+ }
2958
+ ];
2
2959
 
3
2960
  /**
4
2961
  * Generated bundle index. Do not edit.
5
2962
  */
2963
+
2964
+ 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, YunzaiLayoutModule, YunzaiNotifyComponent, YunzaiStartupService, YunzaiStartupServiceFactory, YunzaiThemBtnComponent, YunzaiUserComponent, YunzaiAuthService as YzAuthService, YunzaiDefaultInterceptor as YzDefaultInterceptor, YunzaiI18NService as YzI18nService, YzLayoutBasicComponent, YunzaiStartupService as YzStartupService, YunzaiStartupServiceFactory as YzStartupServiceFactory, generateAbility, mapYzSideToYelonMenu, mergeBisConfig };
6
2965
  //# sourceMappingURL=bis.mjs.map