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