@chaoswise/ui 3.0.5 → 3.0.6
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.
- package/package.json +1 -1
- package/lib/AbreastLayout/CollapsedBtn.js +0 -45
- package/lib/AbreastLayout/CollapsedIcon.js +0 -14
- package/lib/AbreastLayout/NavTreeContainer.js +0 -26
- package/lib/AbreastLayout/assets/icon.png +0 -0
- package/lib/AbreastLayout/assets/icon.svg +0 -11
- package/lib/AbreastLayout/assets/icon1.svg +0 -20
- package/lib/AbreastLayout/index.js +0 -215
- package/lib/AbreastLayout/index.style.js +0 -91
- package/lib/Ace/ace.js +0 -600
- package/lib/Ace/diff.js +0 -291
- package/lib/Ace/editorOptions.js +0 -34
- package/lib/Ace/index.js +0 -6
- package/lib/Ace/split.js +0 -462
- package/lib/AdaptiveLayout/index.js +0 -251
- package/lib/Affix/index.js +0 -2
- package/lib/Alert/index.js +0 -2
- package/lib/Anchor/index.js +0 -2
- package/lib/Antd5/_util/ActionButton.js +0 -117
- package/lib/Antd5/_util/PurePanel.js +0 -103
- package/lib/Antd5/_util/aria-data-attrs.js +0 -1
- package/lib/Antd5/_util/capitalize.js +0 -7
- package/lib/Antd5/_util/colors.js +0 -26
- package/lib/Antd5/_util/easings.js +0 -10
- package/lib/Antd5/_util/extendsObject.js +0 -26
- package/lib/Antd5/_util/gapSize.js +0 -10
- package/lib/Antd5/_util/getAllowClear.js +0 -16
- package/lib/Antd5/_util/getRenderPropValue.js +0 -6
- package/lib/Antd5/_util/getScroll.js +0 -29
- package/lib/Antd5/_util/hooks/useClosable.js +0 -119
- package/lib/Antd5/_util/hooks/useForceUpdate.js +0 -15
- package/lib/Antd5/_util/hooks/useMultipleSelect.js +0 -47
- package/lib/Antd5/_util/hooks/usePatchElement.js +0 -33
- package/lib/Antd5/_util/hooks/useProxyImperativeHandle.js +0 -32
- package/lib/Antd5/_util/hooks/useSyncState.js +0 -13
- package/lib/Antd5/_util/hooks/useZIndex.js +0 -56
- package/lib/Antd5/_util/isNumeric.js +0 -4
- package/lib/Antd5/_util/motion.js +0 -47
- package/lib/Antd5/_util/placements.js +0 -182
- package/lib/Antd5/_util/reactNode.js +0 -13
- package/lib/Antd5/_util/responsiveObserver.js +0 -123
- package/lib/Antd5/_util/scrollTo.js +0 -34
- package/lib/Antd5/_util/statusUtils.js +0 -12
- package/lib/Antd5/_util/styleChecker.js +0 -6
- package/lib/Antd5/_util/throttleByAnimationFrame.js +0 -30
- package/lib/Antd5/_util/transButton.js +0 -63
- package/lib/Antd5/_util/transKeys.js +0 -18
- package/lib/Antd5/_util/type.js +0 -1
- package/lib/Antd5/_util/warning.js +0 -59
- package/lib/Antd5/_util/wave/WaveEffect.js +0 -160
- package/lib/Antd5/_util/wave/index.js +0 -63
- package/lib/Antd5/_util/wave/interface.js +0 -1
- package/lib/Antd5/_util/wave/style.js +0 -32
- package/lib/Antd5/_util/wave/useWave.js +0 -48
- package/lib/Antd5/_util/wave/util.js +0 -29
- package/lib/Antd5/_util/zindexContext.js +0 -6
- package/lib/Antd5/affix/index.js +0 -228
- package/lib/Antd5/affix/style/index.js +0 -20
- package/lib/Antd5/affix/utils.js +0 -19
- package/lib/Antd5/alert/Alert.js +0 -233
- package/lib/Antd5/alert/ErrorBoundary.js +0 -76
- package/lib/Antd5/alert/design/behavior-pattern.js +0 -31
- package/lib/Antd5/alert/index.js +0 -5
- package/lib/Antd5/alert/style/index.js +0 -153
- package/lib/Antd5/anchor/Anchor.js +0 -278
- package/lib/Antd5/anchor/AnchorLink.js +0 -67
- package/lib/Antd5/anchor/context.js +0 -3
- package/lib/Antd5/anchor/index.js +0 -5
- package/lib/Antd5/anchor/style/index.js +0 -124
- package/lib/Antd5/app/context.js +0 -8
- package/lib/Antd5/app/index.js +0 -93
- package/lib/Antd5/app/style/index.js +0 -24
- package/lib/Antd5/auto-complete/index.js +0 -112
- package/lib/Antd5/avatar/AvatarContext.js +0 -3
- package/lib/Antd5/avatar/avatar.js +0 -189
- package/lib/Antd5/avatar/group.js +0 -103
- package/lib/Antd5/avatar/index.js +0 -6
- package/lib/Antd5/avatar/style/index.js +0 -110
- package/lib/Antd5/back-top/index.js +0 -113
- package/lib/Antd5/back-top/style/index.js +0 -82
- package/lib/Antd5/badge/Ribbon.js +0 -65
- package/lib/Antd5/badge/ScrollNumber.js +0 -72
- package/lib/Antd5/badge/SingleNumber.js +0 -122
- package/lib/Antd5/badge/index.js +0 -189
- package/lib/Antd5/badge/style/index.js +0 -291
- package/lib/Antd5/badge/style/ribbon.js +0 -72
- package/lib/Antd5/breadcrumb/Breadcrumb.js +0 -157
- package/lib/Antd5/breadcrumb/BreadcrumbItem.js +0 -103
- package/lib/Antd5/breadcrumb/BreadcrumbSeparator.js +0 -16
- package/lib/Antd5/breadcrumb/design/behavior-pattern.js +0 -36
- package/lib/Antd5/breadcrumb/index.js +0 -2
- package/lib/Antd5/breadcrumb/style/index.js +0 -82
- package/lib/Antd5/breadcrumb/useItemRender.js +0 -57
- package/lib/Antd5/breadcrumb/useItems.js +0 -42
- package/lib/Antd5/button/IconWrapper.js +0 -17
- package/lib/Antd5/button/LoadingIcon.js +0 -87
- package/lib/Antd5/button/button-group.js +0 -59
- package/lib/Antd5/button/button.js +0 -230
- package/lib/Antd5/button/buttonHelpers.js +0 -68
- package/lib/Antd5/button/index.js +0 -3
- package/lib/Antd5/button/style/compactCmp.js +0 -46
- package/lib/Antd5/button/style/group.js +0 -52
- package/lib/Antd5/button/style/index.js +0 -322
- package/lib/Antd5/button/style/token.js +0 -61
- package/lib/Antd5/calendar/Header.js +0 -176
- package/lib/Antd5/calendar/generateCalendar.js +0 -225
- package/lib/Antd5/calendar/index.js +0 -5
- package/lib/Antd5/calendar/locale/ar_EG.js +0 -2
- package/lib/Antd5/calendar/locale/az_AZ.js +0 -2
- package/lib/Antd5/calendar/locale/bg_BG.js +0 -2
- package/lib/Antd5/calendar/locale/bn_BD.js +0 -2
- package/lib/Antd5/calendar/locale/by_BY.js +0 -2
- package/lib/Antd5/calendar/locale/ca_ES.js +0 -2
- package/lib/Antd5/calendar/locale/cs_CZ.js +0 -2
- package/lib/Antd5/calendar/locale/da_DK.js +0 -2
- package/lib/Antd5/calendar/locale/de_DE.js +0 -2
- package/lib/Antd5/calendar/locale/el_GR.js +0 -2
- package/lib/Antd5/calendar/locale/en_GB.js +0 -2
- package/lib/Antd5/calendar/locale/en_US.js +0 -2
- package/lib/Antd5/calendar/locale/es_ES.js +0 -2
- package/lib/Antd5/calendar/locale/et_EE.js +0 -2
- package/lib/Antd5/calendar/locale/eu_ES.js +0 -2
- package/lib/Antd5/calendar/locale/fa_IR.js +0 -2
- package/lib/Antd5/calendar/locale/fi_FI.js +0 -2
- package/lib/Antd5/calendar/locale/fr_BE.js +0 -2
- package/lib/Antd5/calendar/locale/fr_CA.js +0 -2
- package/lib/Antd5/calendar/locale/fr_FR.js +0 -2
- package/lib/Antd5/calendar/locale/ga_IE.js +0 -2
- package/lib/Antd5/calendar/locale/gl_ES.js +0 -2
- package/lib/Antd5/calendar/locale/he_IL.js +0 -2
- package/lib/Antd5/calendar/locale/hi_IN.js +0 -2
- package/lib/Antd5/calendar/locale/hr_HR.js +0 -2
- package/lib/Antd5/calendar/locale/hu_HU.js +0 -2
- package/lib/Antd5/calendar/locale/id_ID.js +0 -2
- package/lib/Antd5/calendar/locale/is_IS.js +0 -2
- package/lib/Antd5/calendar/locale/it_IT.js +0 -2
- package/lib/Antd5/calendar/locale/ja_JP.js +0 -2
- package/lib/Antd5/calendar/locale/ka_GE.js +0 -2
- package/lib/Antd5/calendar/locale/kk_KZ.js +0 -2
- package/lib/Antd5/calendar/locale/km_KH.js +0 -2
- package/lib/Antd5/calendar/locale/kmr_IQ.js +0 -2
- package/lib/Antd5/calendar/locale/kn_IN.js +0 -2
- package/lib/Antd5/calendar/locale/ko_KR.js +0 -2
- package/lib/Antd5/calendar/locale/lt_LT.js +0 -2
- package/lib/Antd5/calendar/locale/lv_LV.js +0 -2
- package/lib/Antd5/calendar/locale/mk_MK.js +0 -2
- package/lib/Antd5/calendar/locale/ml_IN.js +0 -2
- package/lib/Antd5/calendar/locale/mn_MN.js +0 -2
- package/lib/Antd5/calendar/locale/ms_MY.js +0 -2
- package/lib/Antd5/calendar/locale/my_MM.js +0 -2
- package/lib/Antd5/calendar/locale/nb_NO.js +0 -2
- package/lib/Antd5/calendar/locale/nl_BE.js +0 -2
- package/lib/Antd5/calendar/locale/nl_NL.js +0 -2
- package/lib/Antd5/calendar/locale/pl_PL.js +0 -2
- package/lib/Antd5/calendar/locale/pt_BR.js +0 -2
- package/lib/Antd5/calendar/locale/pt_PT.js +0 -2
- package/lib/Antd5/calendar/locale/ro_RO.js +0 -2
- package/lib/Antd5/calendar/locale/ru_RU.js +0 -2
- package/lib/Antd5/calendar/locale/si_LK.js +0 -2
- package/lib/Antd5/calendar/locale/sk_SK.js +0 -2
- package/lib/Antd5/calendar/locale/sl_SI.js +0 -2
- package/lib/Antd5/calendar/locale/sr_RS.js +0 -2
- package/lib/Antd5/calendar/locale/sv_SE.js +0 -2
- package/lib/Antd5/calendar/locale/ta_IN.js +0 -2
- package/lib/Antd5/calendar/locale/th_TH.js +0 -2
- package/lib/Antd5/calendar/locale/tk_TK.js +0 -2
- package/lib/Antd5/calendar/locale/tr_TR.js +0 -2
- package/lib/Antd5/calendar/locale/uk_UA.js +0 -2
- package/lib/Antd5/calendar/locale/ur_PK.js +0 -2
- package/lib/Antd5/calendar/locale/uz_UZ.js +0 -2
- package/lib/Antd5/calendar/locale/vi_VN.js +0 -2
- package/lib/Antd5/calendar/locale/zh_CN.js +0 -2
- package/lib/Antd5/calendar/locale/zh_TW.js +0 -2
- package/lib/Antd5/calendar/style/index.js +0 -153
- package/lib/Antd5/card/Card.js +0 -201
- package/lib/Antd5/card/Grid.js +0 -28
- package/lib/Antd5/card/Meta.js +0 -46
- package/lib/Antd5/card/index.js +0 -10
- package/lib/Antd5/card/style/index.js +0 -287
- package/lib/Antd5/carousel/index.js +0 -120
- package/lib/Antd5/carousel/style/index.js +0 -310
- package/lib/Antd5/cascader/Panel.js +0 -68
- package/lib/Antd5/cascader/hooks/useBase.js +0 -12
- package/lib/Antd5/cascader/hooks/useCheckable.js +0 -9
- package/lib/Antd5/cascader/hooks/useColumnIcons.js +0 -18
- package/lib/Antd5/cascader/index.js +0 -264
- package/lib/Antd5/cascader/style/columns.js +0 -87
- package/lib/Antd5/cascader/style/index.js +0 -48
- package/lib/Antd5/cascader/style/panel.js +0 -29
- package/lib/Antd5/checkbox/Checkbox.js +0 -125
- package/lib/Antd5/checkbox/Group.js +0 -148
- package/lib/Antd5/checkbox/GroupContext.js +0 -3
- package/lib/Antd5/checkbox/index.js +0 -9
- package/lib/Antd5/checkbox/style/index.js +0 -159
- package/lib/Antd5/col/index.js +0 -2
- package/lib/Antd5/col/style/index.js +0 -3
- package/lib/Antd5/collapse/Collapse.js +0 -121
- package/lib/Antd5/collapse/CollapsePanel.js +0 -33
- package/lib/Antd5/collapse/index.js +0 -2
- package/lib/Antd5/collapse/style/index.js +0 -183
- package/lib/Antd5/color-picker/ColorPicker.js +0 -233
- package/lib/Antd5/color-picker/ColorPickerPanel.js +0 -64
- package/lib/Antd5/color-picker/color.js +0 -67
- package/lib/Antd5/color-picker/components/ColorAlphaInput.js +0 -45
- package/lib/Antd5/color-picker/components/ColorClear.js +0 -22
- package/lib/Antd5/color-picker/components/ColorHexInput.js +0 -47
- package/lib/Antd5/color-picker/components/ColorHsbInput.js +0 -76
- package/lib/Antd5/color-picker/components/ColorInput.js +0 -86
- package/lib/Antd5/color-picker/components/ColorPresets.js +0 -109
- package/lib/Antd5/color-picker/components/ColorRgbInput.js +0 -67
- package/lib/Antd5/color-picker/components/ColorSteppers.js +0 -47
- package/lib/Antd5/color-picker/components/ColorTrigger.js +0 -65
- package/lib/Antd5/color-picker/components/PanelPicker.js +0 -53
- package/lib/Antd5/color-picker/components/PanelPresets.js +0 -18
- package/lib/Antd5/color-picker/context.js +0 -7
- package/lib/Antd5/color-picker/hooks/useColorState.js +0 -53
- package/lib/Antd5/color-picker/index.js +0 -2
- package/lib/Antd5/color-picker/interface.js +0 -6
- package/lib/Antd5/color-picker/style/color-block.js +0 -36
- package/lib/Antd5/color-picker/style/index.js +0 -203
- package/lib/Antd5/color-picker/style/input.js +0 -74
- package/lib/Antd5/color-picker/style/picker.js +0 -64
- package/lib/Antd5/color-picker/style/presets.js +0 -94
- package/lib/Antd5/color-picker/util.js +0 -18
- package/lib/Antd5/config-provider/DisabledContext.js +0 -13
- package/lib/Antd5/config-provider/MotionWrapper.js +0 -26
- package/lib/Antd5/config-provider/PropWarning.js +0 -18
- package/lib/Antd5/config-provider/SizeContext.js +0 -13
- package/lib/Antd5/config-provider/context.js +0 -16
- package/lib/Antd5/config-provider/cssVariables.js +0 -88
- package/lib/Antd5/config-provider/defaultRenderEmpty.js +0 -31
- package/lib/Antd5/config-provider/hooks/useCSSVarCls.js +0 -19
- package/lib/Antd5/config-provider/hooks/useConfig.js +0 -12
- package/lib/Antd5/config-provider/hooks/useSize.js +0 -19
- package/lib/Antd5/config-provider/hooks/useTheme.js +0 -55
- package/lib/Antd5/config-provider/hooks/useThemeKey.js +0 -14
- package/lib/Antd5/config-provider/index.js +0 -432
- package/lib/Antd5/config-provider/style/index.js +0 -2
- package/lib/Antd5/date-picker/PickerButton.js +0 -15
- package/lib/Antd5/date-picker/design/behavior-pattern.js +0 -89
- package/lib/Antd5/date-picker/generatePicker/generateRangePicker.js +0 -170
- package/lib/Antd5/date-picker/generatePicker/generateSinglePicker.js +0 -200
- package/lib/Antd5/date-picker/generatePicker/index.js +0 -26
- package/lib/Antd5/date-picker/generatePicker/interface.js +0 -2
- package/lib/Antd5/date-picker/generatePicker/useComponents.js +0 -15
- package/lib/Antd5/date-picker/index.js +0 -27
- package/lib/Antd5/date-picker/locale/ar_EG.js +0 -23
- package/lib/Antd5/date-picker/locale/az_AZ.js +0 -16
- package/lib/Antd5/date-picker/locale/bg_BG.js +0 -19
- package/lib/Antd5/date-picker/locale/bn_BD.js +0 -26
- package/lib/Antd5/date-picker/locale/by_BY.js +0 -24
- package/lib/Antd5/date-picker/locale/ca_ES.js +0 -19
- package/lib/Antd5/date-picker/locale/cs_CZ.js +0 -19
- package/lib/Antd5/date-picker/locale/da_DK.js +0 -19
- package/lib/Antd5/date-picker/locale/de_DE.js +0 -21
- package/lib/Antd5/date-picker/locale/el_GR.js +0 -19
- package/lib/Antd5/date-picker/locale/en_GB.js +0 -27
- package/lib/Antd5/date-picker/locale/en_US.js +0 -27
- package/lib/Antd5/date-picker/locale/es_ES.js +0 -21
- package/lib/Antd5/date-picker/locale/et_EE.js +0 -19
- package/lib/Antd5/date-picker/locale/eu_ES.js +0 -19
- package/lib/Antd5/date-picker/locale/example.json +0 -55
- package/lib/Antd5/date-picker/locale/fa_IR.js +0 -27
- package/lib/Antd5/date-picker/locale/fi_FI.js +0 -19
- package/lib/Antd5/date-picker/locale/fr_BE.js +0 -26
- package/lib/Antd5/date-picker/locale/fr_CA.js +0 -26
- package/lib/Antd5/date-picker/locale/fr_FR.js +0 -26
- package/lib/Antd5/date-picker/locale/ga_IE.js +0 -26
- package/lib/Antd5/date-picker/locale/gl_ES.js +0 -19
- package/lib/Antd5/date-picker/locale/he_IL.js +0 -19
- package/lib/Antd5/date-picker/locale/hi_IN.js +0 -26
- package/lib/Antd5/date-picker/locale/hr_HR.js +0 -26
- package/lib/Antd5/date-picker/locale/hu_HU.js +0 -19
- package/lib/Antd5/date-picker/locale/id_ID.js +0 -27
- package/lib/Antd5/date-picker/locale/is_IS.js +0 -19
- package/lib/Antd5/date-picker/locale/it_IT.js +0 -19
- package/lib/Antd5/date-picker/locale/ja_JP.js +0 -19
- package/lib/Antd5/date-picker/locale/ka_GE.js +0 -23
- package/lib/Antd5/date-picker/locale/kk_KZ.js +0 -26
- package/lib/Antd5/date-picker/locale/km_KH.js +0 -26
- package/lib/Antd5/date-picker/locale/kmr_IQ.js +0 -19
- package/lib/Antd5/date-picker/locale/kn_IN.js +0 -19
- package/lib/Antd5/date-picker/locale/ko_KR.js +0 -19
- package/lib/Antd5/date-picker/locale/lt_LT.js +0 -27
- package/lib/Antd5/date-picker/locale/lv_LV.js +0 -19
- package/lib/Antd5/date-picker/locale/mk_MK.js +0 -19
- package/lib/Antd5/date-picker/locale/ml_IN.js +0 -26
- package/lib/Antd5/date-picker/locale/mn_MN.js +0 -19
- package/lib/Antd5/date-picker/locale/ms_MY.js +0 -19
- package/lib/Antd5/date-picker/locale/my_MM.js +0 -27
- package/lib/Antd5/date-picker/locale/nb_NO.js +0 -26
- package/lib/Antd5/date-picker/locale/nl_BE.js +0 -26
- package/lib/Antd5/date-picker/locale/nl_NL.js +0 -26
- package/lib/Antd5/date-picker/locale/pl_PL.js +0 -19
- package/lib/Antd5/date-picker/locale/pt_BR.js +0 -19
- package/lib/Antd5/date-picker/locale/pt_PT.js +0 -47
- package/lib/Antd5/date-picker/locale/ro_RO.js +0 -19
- package/lib/Antd5/date-picker/locale/ru_RU.js +0 -29
- package/lib/Antd5/date-picker/locale/si_LK.js +0 -27
- package/lib/Antd5/date-picker/locale/sk_SK.js +0 -19
- package/lib/Antd5/date-picker/locale/sl_SI.js +0 -45
- package/lib/Antd5/date-picker/locale/sr_RS.js +0 -26
- package/lib/Antd5/date-picker/locale/sv_SE.js +0 -26
- package/lib/Antd5/date-picker/locale/ta_IN.js +0 -27
- package/lib/Antd5/date-picker/locale/th_TH.js +0 -26
- package/lib/Antd5/date-picker/locale/tk_TK.js +0 -24
- package/lib/Antd5/date-picker/locale/tr_TR.js +0 -26
- package/lib/Antd5/date-picker/locale/uk_UA.js +0 -19
- package/lib/Antd5/date-picker/locale/ur_PK.js +0 -26
- package/lib/Antd5/date-picker/locale/uz_UZ.js +0 -26
- package/lib/Antd5/date-picker/locale/vi_VN.js +0 -27
- package/lib/Antd5/date-picker/locale/zh_CN.js +0 -29
- package/lib/Antd5/date-picker/locale/zh_TW.js +0 -28
- package/lib/Antd5/date-picker/style/index.js +0 -328
- package/lib/Antd5/date-picker/style/multiple.js +0 -81
- package/lib/Antd5/date-picker/style/panel.js +0 -448
- package/lib/Antd5/date-picker/style/token.js +0 -77
- package/lib/Antd5/date-picker/style/variants.js +0 -28
- package/lib/Antd5/date-picker/util.js +0 -118
- package/lib/Antd5/descriptions/Cell.js +0 -57
- package/lib/Antd5/descriptions/DescriptionsContext.js +0 -3
- package/lib/Antd5/descriptions/Item.js +0 -5
- package/lib/Antd5/descriptions/Row.js +0 -107
- package/lib/Antd5/descriptions/constant.js +0 -9
- package/lib/Antd5/descriptions/hooks/useItems.js +0 -38
- package/lib/Antd5/descriptions/hooks/useRow.js +0 -78
- package/lib/Antd5/descriptions/index.js +0 -119
- package/lib/Antd5/descriptions/style/index.js +0 -146
- package/lib/Antd5/divider/index.js +0 -85
- package/lib/Antd5/divider/style/index.js +0 -136
- package/lib/Antd5/drawer/DrawerPanel.js +0 -107
- package/lib/Antd5/drawer/index.js +0 -206
- package/lib/Antd5/drawer/style/index.js +0 -192
- package/lib/Antd5/drawer/style/motion.js +0 -56
- package/lib/Antd5/dropdown/dropdown-button.js +0 -129
- package/lib/Antd5/dropdown/dropdown.js +0 -255
- package/lib/Antd5/dropdown/index.js +0 -5
- package/lib/Antd5/dropdown/style/index.js +0 -220
- package/lib/Antd5/dropdown/style/status.js +0 -19
- package/lib/Antd5/empty/empty.js +0 -73
- package/lib/Antd5/empty/index.js +0 -83
- package/lib/Antd5/empty/simple.js +0 -61
- package/lib/Antd5/empty/style/index.js +0 -61
- package/lib/Antd5/flex/index.js +0 -67
- package/lib/Antd5/flex/interface.js +0 -1
- package/lib/Antd5/flex/style/index.js +0 -83
- package/lib/Antd5/flex/utils.js +0 -33
- package/lib/Antd5/float-button/BackTop.js +0 -109
- package/lib/Antd5/float-button/FloatButton.js +0 -105
- package/lib/Antd5/float-button/FloatButtonContent.js +0 -31
- package/lib/Antd5/float-button/FloatButtonGroup.js +0 -144
- package/lib/Antd5/float-button/PurePanel.js +0 -49
- package/lib/Antd5/float-button/context.js +0 -5
- package/lib/Antd5/float-button/index.js +0 -8
- package/lib/Antd5/float-button/interface.js +0 -1
- package/lib/Antd5/float-button/style/index.js +0 -294
- package/lib/Antd5/float-button/util.js +0 -9
- package/lib/Antd5/form/ErrorList.js +0 -110
- package/lib/Antd5/form/Form.js +0 -166
- package/lib/Antd5/form/FormItem/ItemHolder.js +0 -128
- package/lib/Antd5/form/FormItem/StatusProvider.js +0 -73
- package/lib/Antd5/form/FormItem/index.js +0 -310
- package/lib/Antd5/form/FormItemInput.js +0 -100
- package/lib/Antd5/form/FormItemLabel.js +0 -120
- package/lib/Antd5/form/FormList.js +0 -49
- package/lib/Antd5/form/context.js +0 -51
- package/lib/Antd5/form/hooks/useChildren.js +0 -8
- package/lib/Antd5/form/hooks/useDebounce.js +0 -22
- package/lib/Antd5/form/hooks/useForm.js +0 -69
- package/lib/Antd5/form/hooks/useFormInstance.js +0 -7
- package/lib/Antd5/form/hooks/useFormItemStatus.js +0 -23
- package/lib/Antd5/form/hooks/useFormWarning.js +0 -16
- package/lib/Antd5/form/hooks/useFrameState.js +0 -46
- package/lib/Antd5/form/hooks/useItemRef.js +0 -20
- package/lib/Antd5/form/hooks/useVariants.js +0 -21
- package/lib/Antd5/form/index.js +0 -19
- package/lib/Antd5/form/interface.js +0 -1
- package/lib/Antd5/form/style/explain.js +0 -37
- package/lib/Antd5/form/style/fallbackCmp.js +0 -26
- package/lib/Antd5/form/style/index.js +0 -318
- package/lib/Antd5/form/util.js +0 -39
- package/lib/Antd5/form/validateMessagesContext.js +0 -5
- package/lib/Antd5/grid/RowContext.js +0 -3
- package/lib/Antd5/grid/col.js +0 -103
- package/lib/Antd5/grid/hooks/useBreakpoint.js +0 -23
- package/lib/Antd5/grid/index.js +0 -11
- package/lib/Antd5/grid/row.js +0 -169
- package/lib/Antd5/grid/style/index.js +0 -153
- package/lib/Antd5/icon/index.js +0 -9
- package/lib/Antd5/image/PreviewGroup.js +0 -84
- package/lib/Antd5/image/index.js +0 -94
- package/lib/Antd5/image/style/index.js +0 -264
- package/lib/Antd5/index.js +0 -72
- package/lib/Antd5/input/Group.js +0 -57
- package/lib/Antd5/input/Input.js +0 -188
- package/lib/Antd5/input/OTP/OTPInput.js +0 -69
- package/lib/Antd5/input/OTP/index.js +0 -210
- package/lib/Antd5/input/Password.js +0 -116
- package/lib/Antd5/input/Search.js +0 -143
- package/lib/Antd5/input/TextArea.js +0 -118
- package/lib/Antd5/input/hooks/useRemovePasswordTimeout.js +0 -26
- package/lib/Antd5/input/index.js +0 -13
- package/lib/Antd5/input/style/index.js +0 -532
- package/lib/Antd5/input/style/otp.js +0 -32
- package/lib/Antd5/input/style/token.js +0 -46
- package/lib/Antd5/input/style/variants.js +0 -213
- package/lib/Antd5/input/utils.js +0 -4
- package/lib/Antd5/input-number/index.js +0 -163
- package/lib/Antd5/input-number/style/index.js +0 -299
- package/lib/Antd5/input-number/style/token.js +0 -24
- package/lib/Antd5/layout/Sider.js +0 -198
- package/lib/Antd5/layout/context.js +0 -11
- package/lib/Antd5/layout/hooks/useHasSider.js +0 -14
- package/lib/Antd5/layout/index.js +0 -9
- package/lib/Antd5/layout/layout.js +0 -143
- package/lib/Antd5/layout/style/index.js +0 -187
- package/lib/Antd5/layout/style/light.js +0 -24
- package/lib/Antd5/list/Item.js +0 -113
- package/lib/Antd5/list/context.js +0 -3
- package/lib/Antd5/list/index.js +0 -246
- package/lib/Antd5/list/style/index.js +0 -249
- package/lib/Antd5/locale/ar_EG.js +0 -114
- package/lib/Antd5/locale/az_AZ.js +0 -97
- package/lib/Antd5/locale/bg_BG.js +0 -95
- package/lib/Antd5/locale/bn_BD.js +0 -127
- package/lib/Antd5/locale/by_BY.js +0 -129
- package/lib/Antd5/locale/ca_ES.js +0 -122
- package/lib/Antd5/locale/context.js +0 -3
- package/lib/Antd5/locale/cs_CZ.js +0 -129
- package/lib/Antd5/locale/da_DK.js +0 -105
- package/lib/Antd5/locale/de_DE.js +0 -133
- package/lib/Antd5/locale/el_GR.js +0 -44
- package/lib/Antd5/locale/en_GB.js +0 -129
- package/lib/Antd5/locale/en_US.js +0 -144
- package/lib/Antd5/locale/es_ES.js +0 -129
- package/lib/Antd5/locale/et_EE.js +0 -129
- package/lib/Antd5/locale/eu_ES.js +0 -141
- package/lib/Antd5/locale/fa_IR.js +0 -138
- package/lib/Antd5/locale/fi_FI.js +0 -54
- package/lib/Antd5/locale/fr_BE.js +0 -126
- package/lib/Antd5/locale/fr_CA.js +0 -126
- package/lib/Antd5/locale/fr_FR.js +0 -131
- package/lib/Antd5/locale/ga_IE.js +0 -120
- package/lib/Antd5/locale/gl_ES.js +0 -108
- package/lib/Antd5/locale/he_IL.js +0 -114
- package/lib/Antd5/locale/hi_IN.js +0 -127
- package/lib/Antd5/locale/hr_HR.js +0 -126
- package/lib/Antd5/locale/hu_HU.js +0 -45
- package/lib/Antd5/locale/hy_AM.js +0 -106
- package/lib/Antd5/locale/id_ID.js +0 -144
- package/lib/Antd5/locale/index.js +0 -40
- package/lib/Antd5/locale/is_IS.js +0 -95
- package/lib/Antd5/locale/it_IT.js +0 -134
- package/lib/Antd5/locale/ja_JP.js +0 -144
- package/lib/Antd5/locale/ka_GE.js +0 -127
- package/lib/Antd5/locale/kk_KZ.js +0 -121
- package/lib/Antd5/locale/km_KH.js +0 -105
- package/lib/Antd5/locale/kmr_IQ.js +0 -44
- package/lib/Antd5/locale/kn_IN.js +0 -51
- package/lib/Antd5/locale/ko_KR.js +0 -141
- package/lib/Antd5/locale/ku_IQ.js +0 -47
- package/lib/Antd5/locale/lt_LT.js +0 -141
- package/lib/Antd5/locale/lv_LV.js +0 -44
- package/lib/Antd5/locale/mk_MK.js +0 -56
- package/lib/Antd5/locale/ml_IN.js +0 -127
- package/lib/Antd5/locale/mn_MN.js +0 -44
- package/lib/Antd5/locale/ms_MY.js +0 -61
- package/lib/Antd5/locale/my_MM.js +0 -136
- package/lib/Antd5/locale/nb_NO.js +0 -121
- package/lib/Antd5/locale/ne_NP.js +0 -44
- package/lib/Antd5/locale/nl_BE.js +0 -127
- package/lib/Antd5/locale/nl_NL.js +0 -127
- package/lib/Antd5/locale/pl_PL.js +0 -134
- package/lib/Antd5/locale/pt_BR.js +0 -134
- package/lib/Antd5/locale/pt_PT.js +0 -129
- package/lib/Antd5/locale/ro_RO.js +0 -127
- package/lib/Antd5/locale/ru_RU.js +0 -138
- package/lib/Antd5/locale/si_LK.js +0 -129
- package/lib/Antd5/locale/sk_SK.js +0 -129
- package/lib/Antd5/locale/sl_SI.js +0 -44
- package/lib/Antd5/locale/sr_RS.js +0 -127
- package/lib/Antd5/locale/sv_SE.js +0 -138
- package/lib/Antd5/locale/ta_IN.js +0 -126
- package/lib/Antd5/locale/th_TH.js +0 -138
- package/lib/Antd5/locale/tk_TK.js +0 -125
- package/lib/Antd5/locale/tr_TR.js +0 -125
- package/lib/Antd5/locale/uk_UA.js +0 -138
- package/lib/Antd5/locale/ur_PK.js +0 -127
- package/lib/Antd5/locale/useLocale.js +0 -28
- package/lib/Antd5/locale/uz_UZ.js +0 -143
- package/lib/Antd5/locale/vi_VN.js +0 -137
- package/lib/Antd5/locale/zh_CN.js +0 -145
- package/lib/Antd5/locale/zh_HK.js +0 -138
- package/lib/Antd5/locale/zh_TW.js +0 -139
- package/lib/Antd5/mentions/index.js +0 -198
- package/lib/Antd5/mentions/style/index.js +0 -205
- package/lib/Antd5/menu/MenuContext.js +0 -7
- package/lib/Antd5/menu/MenuDivider.js +0 -28
- package/lib/Antd5/menu/MenuItem.js +0 -82
- package/lib/Antd5/menu/OverrideContext.js +0 -39
- package/lib/Antd5/menu/SubMenu.js +0 -74
- package/lib/Antd5/menu/index.js +0 -39
- package/lib/Antd5/menu/interface.js +0 -1
- package/lib/Antd5/menu/menu.js +0 -174
- package/lib/Antd5/menu/style/horizontal.js +0 -38
- package/lib/Antd5/menu/style/index.js +0 -441
- package/lib/Antd5/menu/style/rtl.js +0 -23
- package/lib/Antd5/menu/style/theme.js +0 -158
- package/lib/Antd5/menu/style/vertical.js +0 -131
- package/lib/Antd5/message/PurePanel.js +0 -77
- package/lib/Antd5/message/index.js +0 -281
- package/lib/Antd5/message/interface.js +0 -1
- package/lib/Antd5/message/style/index.js +0 -128
- package/lib/Antd5/message/useMessage.js +0 -235
- package/lib/Antd5/message/util.js +0 -23
- package/lib/Antd5/modal/ConfirmDialog.js +0 -228
- package/lib/Antd5/modal/Modal.js +0 -162
- package/lib/Antd5/modal/PurePanel.js +0 -78
- package/lib/Antd5/modal/components/ConfirmCancelBtn.js +0 -32
- package/lib/Antd5/modal/components/ConfirmOkBtn.js +0 -33
- package/lib/Antd5/modal/components/NormalCancelBtn.js +0 -22
- package/lib/Antd5/modal/components/NormalOkBtn.js +0 -26
- package/lib/Antd5/modal/confirm.js +0 -169
- package/lib/Antd5/modal/context.js +0 -4
- package/lib/Antd5/modal/destroyFns.js +0 -2
- package/lib/Antd5/modal/index.js +0 -38
- package/lib/Antd5/modal/interface.js +0 -1
- package/lib/Antd5/modal/locale.js +0 -31
- package/lib/Antd5/modal/shared.js +0 -81
- package/lib/Antd5/modal/style/confirm.js +0 -83
- package/lib/Antd5/modal/style/index.js +0 -221
- package/lib/Antd5/modal/useModal/HookModal.js +0 -87
- package/lib/Antd5/modal/useModal/index.js +0 -128
- package/lib/Antd5/notification/PurePanel.js +0 -134
- package/lib/Antd5/notification/index.js +0 -215
- package/lib/Antd5/notification/interface.js +0 -1
- package/lib/Antd5/notification/style/index.js +0 -184
- package/lib/Antd5/notification/style/placement.js +0 -77
- package/lib/Antd5/notification/style/pure-panel.js +0 -18
- package/lib/Antd5/notification/style/stack.js +0 -81
- package/lib/Antd5/notification/useNotification.js +0 -201
- package/lib/Antd5/notification/util.js +0 -57
- package/lib/Antd5/pagination/Pagination.js +0 -135
- package/lib/Antd5/pagination/Select.js +0 -24
- package/lib/Antd5/pagination/design/behavior-pattern.js +0 -32
- package/lib/Antd5/pagination/index.js +0 -2
- package/lib/Antd5/pagination/style/bordered.js +0 -68
- package/lib/Antd5/pagination/style/index.js +0 -411
- package/lib/Antd5/popconfirm/PurePanel.js +0 -114
- package/lib/Antd5/popconfirm/index.js +0 -109
- package/lib/Antd5/popconfirm/style/index.js +0 -61
- package/lib/Antd5/popover/PurePanel.js +0 -77
- package/lib/Antd5/popover/index.js +0 -126
- package/lib/Antd5/popover/style/index.js +0 -137
- package/lib/Antd5/progress/Circle.js +0 -95
- package/lib/Antd5/progress/Line.js +0 -149
- package/lib/Antd5/progress/Steps.js +0 -55
- package/lib/Antd5/progress/design/behavior-pattern.js +0 -31
- package/lib/Antd5/progress/index.js +0 -2
- package/lib/Antd5/progress/progress.js +0 -144
- package/lib/Antd5/progress/style/index.js +0 -201
- package/lib/Antd5/progress/utils.js +0 -97
- package/lib/Antd5/qr-code/index.js +0 -125
- package/lib/Antd5/qr-code/interface.js +0 -1
- package/lib/Antd5/qr-code/style/index.js +0 -66
- package/lib/Antd5/qrcode/index.js +0 -4
- package/lib/Antd5/qrcode/interface.js +0 -3
- package/lib/Antd5/qrcode/style/index.js +0 -3
- package/lib/Antd5/radio/context.js +0 -6
- package/lib/Antd5/radio/group.js +0 -131
- package/lib/Antd5/radio/index.js +0 -9
- package/lib/Antd5/radio/interface.js +0 -1
- package/lib/Antd5/radio/radio.js +0 -137
- package/lib/Antd5/radio/radioButton.js +0 -31
- package/lib/Antd5/radio/style/index.js +0 -533
- package/lib/Antd5/rate/index.js +0 -69
- package/lib/Antd5/rate/style/index.js +0 -88
- package/lib/Antd5/result/index.js +0 -128
- package/lib/Antd5/result/noFound.js +0 -243
- package/lib/Antd5/result/serverError.js +0 -283
- package/lib/Antd5/result/style/index.js +0 -101
- package/lib/Antd5/result/unauthorized.js +0 -230
- package/lib/Antd5/row/index.js +0 -2
- package/lib/Antd5/row/style/index.js +0 -3
- package/lib/Antd5/segmented/index.js +0 -87
- package/lib/Antd5/segmented/style/index.js +0 -162
- package/lib/Antd5/select/index.js +0 -222
- package/lib/Antd5/select/mergedBuiltinPlacements.js +0 -40
- package/lib/Antd5/select/style/dropdown.js +0 -109
- package/lib/Antd5/select/style/index.js +0 -183
- package/lib/Antd5/select/style/multiple.js +0 -217
- package/lib/Antd5/select/style/single.js +0 -101
- package/lib/Antd5/select/style/token.js +0 -53
- package/lib/Antd5/select/style/variants.js +0 -126
- package/lib/Antd5/select/useIcons.js +0 -82
- package/lib/Antd5/select/useShowArrow.js +0 -9
- package/lib/Antd5/skeleton/Avatar.js +0 -48
- package/lib/Antd5/skeleton/Button.js +0 -47
- package/lib/Antd5/skeleton/Element.js +0 -30
- package/lib/Antd5/skeleton/Image.js +0 -49
- package/lib/Antd5/skeleton/Input.js +0 -46
- package/lib/Antd5/skeleton/Node.js +0 -43
- package/lib/Antd5/skeleton/Paragraph.js +0 -44
- package/lib/Antd5/skeleton/Skeleton.js +0 -153
- package/lib/Antd5/skeleton/Title.js +0 -23
- package/lib/Antd5/skeleton/index.js +0 -2
- package/lib/Antd5/skeleton/style/index.js +0 -247
- package/lib/Antd5/slider/SliderTooltip.js +0 -43
- package/lib/Antd5/slider/index.js +0 -236
- package/lib/Antd5/slider/style/index.js +0 -246
- package/lib/Antd5/slider/useRafLock.js +0 -32
- package/lib/Antd5/space/Compact.js +0 -103
- package/lib/Antd5/space/Item.js +0 -26
- package/lib/Antd5/space/context.js +0 -5
- package/lib/Antd5/space/index.js +0 -120
- package/lib/Antd5/space/style/compact.js +0 -18
- package/lib/Antd5/space/style/index.js +0 -79
- package/lib/Antd5/spin/index.js +0 -149
- package/lib/Antd5/spin/style/index.js +0 -206
- package/lib/Antd5/statistic/Countdown.js +0 -73
- package/lib/Antd5/statistic/Number.js +0 -47
- package/lib/Antd5/statistic/Statistic.js +0 -99
- package/lib/Antd5/statistic/index.js +0 -4
- package/lib/Antd5/statistic/interface.js +0 -1
- package/lib/Antd5/statistic/style/index.js +0 -51
- package/lib/Antd5/statistic/utils.js +0 -57
- package/lib/Antd5/steps/index.js +0 -120
- package/lib/Antd5/steps/style/custom-icon.js +0 -26
- package/lib/Antd5/steps/style/horizontal.js +0 -12
- package/lib/Antd5/steps/style/index.js +0 -249
- package/lib/Antd5/steps/style/inline.js +0 -95
- package/lib/Antd5/steps/style/label-placement.js +0 -46
- package/lib/Antd5/steps/style/nav.js +0 -109
- package/lib/Antd5/steps/style/progress-dot.js +0 -100
- package/lib/Antd5/steps/style/progress.js +0 -52
- package/lib/Antd5/steps/style/rtl.js +0 -25
- package/lib/Antd5/steps/style/small.js +0 -53
- package/lib/Antd5/steps/style/vertical.js +0 -55
- package/lib/Antd5/steps/useLegacyItems.js +0 -32
- package/lib/Antd5/style/compact-item-vertical.js +0 -33
- package/lib/Antd5/style/compact-item.js +0 -47
- package/lib/Antd5/style/index.js +0 -126
- package/lib/Antd5/style/motion/collapse.js +0 -16
- package/lib/Antd5/style/motion/fade.js +0 -34
- package/lib/Antd5/style/motion/index.js +0 -6
- package/lib/Antd5/style/motion/motion.js +0 -35
- package/lib/Antd5/style/motion/move.js +0 -133
- package/lib/Antd5/style/motion/slide.js +0 -137
- package/lib/Antd5/style/motion/zoom.js +0 -179
- package/lib/Antd5/style/operationUnit.js +0 -18
- package/lib/Antd5/style/placementArrow.js +0 -120
- package/lib/Antd5/style/reset.css +0 -253
- package/lib/Antd5/style/roundedArrow.js +0 -72
- package/lib/Antd5/switch/index.js +0 -97
- package/lib/Antd5/switch/style/index.js +0 -245
- package/lib/Antd5/table/Column.js +0 -7
- package/lib/Antd5/table/ColumnGroup.js +0 -7
- package/lib/Antd5/table/ExpandIcon.js +0 -28
- package/lib/Antd5/table/InternalTable.js +0 -451
- package/lib/Antd5/table/RcTable/VirtualTable.js +0 -9
- package/lib/Antd5/table/RcTable/index.js +0 -9
- package/lib/Antd5/table/Table.js +0 -34
- package/lib/Antd5/table/hooks/useContainerWidth.js +0 -14
- package/lib/Antd5/table/hooks/useFilter/FilterDropdown.js +0 -497
- package/lib/Antd5/table/hooks/useFilter/FilterSearch.js +0 -27
- package/lib/Antd5/table/hooks/useFilter/FilterWrapper.js +0 -24
- package/lib/Antd5/table/hooks/useFilter/index.js +0 -234
- package/lib/Antd5/table/hooks/useLazyKVMap.js +0 -30
- package/lib/Antd5/table/hooks/usePagination.js +0 -78
- package/lib/Antd5/table/hooks/useSelection.js +0 -578
- package/lib/Antd5/table/hooks/useSorter.js +0 -362
- package/lib/Antd5/table/hooks/useTitleColumns.js +0 -24
- package/lib/Antd5/table/index.js +0 -2
- package/lib/Antd5/table/interface.js +0 -3
- package/lib/Antd5/table/style/bordered.js +0 -68
- package/lib/Antd5/table/style/ellipsis.js +0 -24
- package/lib/Antd5/table/style/empty.js +0 -15
- package/lib/Antd5/table/style/expand.js +0 -106
- package/lib/Antd5/table/style/filter.js +0 -127
- package/lib/Antd5/table/style/fixed.js +0 -82
- package/lib/Antd5/table/style/index.js +0 -273
- package/lib/Antd5/table/style/pagination.js +0 -30
- package/lib/Antd5/table/style/radius.js +0 -35
- package/lib/Antd5/table/style/rtl.js +0 -40
- package/lib/Antd5/table/style/selection.js +0 -67
- package/lib/Antd5/table/style/size.js +0 -30
- package/lib/Antd5/table/style/sorter.js +0 -75
- package/lib/Antd5/table/style/sticky.js +0 -53
- package/lib/Antd5/table/style/summary.js +0 -25
- package/lib/Antd5/table/style/virtual.js +0 -49
- package/lib/Antd5/table/util.js +0 -31
- package/lib/Antd5/tabs/TabPane.js +0 -7
- package/lib/Antd5/tabs/hooks/useAnimateConfig.js +0 -40
- package/lib/Antd5/tabs/hooks/useLegacyItems.js +0 -43
- package/lib/Antd5/tabs/index.js +0 -115
- package/lib/Antd5/tabs/style/index.js +0 -633
- package/lib/Antd5/tabs/style/motion.js +0 -36
- package/lib/Antd5/tag/CheckableTag.js +0 -51
- package/lib/Antd5/tag/index.js +0 -133
- package/lib/Antd5/tag/style/index.js +0 -104
- package/lib/Antd5/tag/style/presetCmp.js +0 -34
- package/lib/Antd5/tag/style/statusCmp.js +0 -22
- package/lib/Antd5/theme/context.js +0 -15
- package/lib/Antd5/theme/getDesignToken.js +0 -18
- package/lib/Antd5/theme/index.js +0 -39
- package/lib/Antd5/theme/interface/alias.js +0 -1
- package/lib/Antd5/theme/interface/components.js +0 -1
- package/lib/Antd5/theme/interface/index.js +0 -1
- package/lib/Antd5/theme/interface/maps/colors.js +0 -1
- package/lib/Antd5/theme/interface/maps/font.js +0 -1
- package/lib/Antd5/theme/interface/maps/index.js +0 -4
- package/lib/Antd5/theme/interface/maps/size.js +0 -1
- package/lib/Antd5/theme/interface/maps/style.js +0 -1
- package/lib/Antd5/theme/interface/presetColors.js +0 -1
- package/lib/Antd5/theme/interface/seeds.js +0 -1
- package/lib/Antd5/theme/internal.js +0 -13
- package/lib/Antd5/theme/themes/ColorMap.js +0 -1
- package/lib/Antd5/theme/themes/compact/genCompactSizeMapToken.js +0 -16
- package/lib/Antd5/theme/themes/compact/index.js +0 -22
- package/lib/Antd5/theme/themes/dark/colorAlgorithm.js +0 -8
- package/lib/Antd5/theme/themes/dark/colors.js +0 -45
- package/lib/Antd5/theme/themes/dark/index.js +0 -32
- package/lib/Antd5/theme/themes/default/colorAlgorithm.js +0 -8
- package/lib/Antd5/theme/themes/default/colors.js +0 -43
- package/lib/Antd5/theme/themes/default/index.js +0 -31
- package/lib/Antd5/theme/themes/seed.js +0 -68
- package/lib/Antd5/theme/themes/shared/genColorMapToken.js +0 -85
- package/lib/Antd5/theme/themes/shared/genCommonMapToken.js +0 -21
- package/lib/Antd5/theme/themes/shared/genControlHeight.js +0 -9
- package/lib/Antd5/theme/themes/shared/genFontMapToken.js +0 -39
- package/lib/Antd5/theme/themes/shared/genFontSizes.js +0 -20
- package/lib/Antd5/theme/themes/shared/genRadius.js +0 -46
- package/lib/Antd5/theme/themes/shared/genSizeMapToken.js +0 -23
- package/lib/Antd5/theme/useToken.js +0 -129
- package/lib/Antd5/theme/util/alias.js +0 -143
- package/lib/Antd5/theme/util/calc/CSSCalculator.js +0 -119
- package/lib/Antd5/theme/util/calc/NumCalculator.js +0 -81
- package/lib/Antd5/theme/util/calc/calculator.js +0 -10
- package/lib/Antd5/theme/util/calc/index.js +0 -9
- package/lib/Antd5/theme/util/genComponentStyleHook.js +0 -243
- package/lib/Antd5/theme/util/genPresetColor.js +0 -21
- package/lib/Antd5/theme/util/getAlphaColor.js +0 -40
- package/lib/Antd5/theme/util/maxmin.js +0 -27
- package/lib/Antd5/theme/util/statistic.js +0 -74
- package/lib/Antd5/theme/util/useResetIconStyle.js +0 -39
- package/lib/Antd5/time-picker/index.js +0 -56
- package/lib/Antd5/time-picker/locale/ar_EG.js +0 -4
- package/lib/Antd5/time-picker/locale/az_AZ.js +0 -4
- package/lib/Antd5/time-picker/locale/bg_BG.js +0 -4
- package/lib/Antd5/time-picker/locale/bn_BD.js +0 -5
- package/lib/Antd5/time-picker/locale/by_BY.js +0 -5
- package/lib/Antd5/time-picker/locale/ca_ES.js +0 -4
- package/lib/Antd5/time-picker/locale/cs_CZ.js +0 -4
- package/lib/Antd5/time-picker/locale/da_DK.js +0 -5
- package/lib/Antd5/time-picker/locale/de_DE.js +0 -5
- package/lib/Antd5/time-picker/locale/el_GR.js +0 -4
- package/lib/Antd5/time-picker/locale/en_GB.js +0 -4
- package/lib/Antd5/time-picker/locale/en_US.js +0 -5
- package/lib/Antd5/time-picker/locale/es_ES.js +0 -4
- package/lib/Antd5/time-picker/locale/et_EE.js +0 -4
- package/lib/Antd5/time-picker/locale/eu_ES.js +0 -4
- package/lib/Antd5/time-picker/locale/fa_IR.js +0 -5
- package/lib/Antd5/time-picker/locale/fi_FI.js +0 -4
- package/lib/Antd5/time-picker/locale/fr_BE.js +0 -5
- package/lib/Antd5/time-picker/locale/fr_CA.js +0 -5
- package/lib/Antd5/time-picker/locale/fr_FR.js +0 -5
- package/lib/Antd5/time-picker/locale/ga_IE.js +0 -5
- package/lib/Antd5/time-picker/locale/gl_ES.js +0 -4
- package/lib/Antd5/time-picker/locale/he_IL.js +0 -4
- package/lib/Antd5/time-picker/locale/hi_IN.js +0 -5
- package/lib/Antd5/time-picker/locale/hr_HR.js +0 -5
- package/lib/Antd5/time-picker/locale/hu_HU.js +0 -4
- package/lib/Antd5/time-picker/locale/id_ID.js +0 -5
- package/lib/Antd5/time-picker/locale/is_IS.js +0 -4
- package/lib/Antd5/time-picker/locale/it_IT.js +0 -4
- package/lib/Antd5/time-picker/locale/ja_JP.js +0 -5
- package/lib/Antd5/time-picker/locale/ka_GE.js +0 -5
- package/lib/Antd5/time-picker/locale/kk_KZ.js +0 -5
- package/lib/Antd5/time-picker/locale/km_KH.js +0 -5
- package/lib/Antd5/time-picker/locale/kmr_IQ.js +0 -4
- package/lib/Antd5/time-picker/locale/kn_IN.js +0 -4
- package/lib/Antd5/time-picker/locale/ko_KR.js +0 -5
- package/lib/Antd5/time-picker/locale/lt_LT.js +0 -5
- package/lib/Antd5/time-picker/locale/lv_LV.js +0 -4
- package/lib/Antd5/time-picker/locale/mk_MK.js +0 -4
- package/lib/Antd5/time-picker/locale/ml_IN.js +0 -5
- package/lib/Antd5/time-picker/locale/mn_MN.js +0 -4
- package/lib/Antd5/time-picker/locale/ms_MY.js +0 -4
- package/lib/Antd5/time-picker/locale/my_MM.js +0 -5
- package/lib/Antd5/time-picker/locale/nb_NO.js +0 -5
- package/lib/Antd5/time-picker/locale/nl_BE.js +0 -5
- package/lib/Antd5/time-picker/locale/nl_NL.js +0 -5
- package/lib/Antd5/time-picker/locale/pl_PL.js +0 -4
- package/lib/Antd5/time-picker/locale/pt_BR.js +0 -4
- package/lib/Antd5/time-picker/locale/pt_PT.js +0 -4
- package/lib/Antd5/time-picker/locale/ro_RO.js +0 -4
- package/lib/Antd5/time-picker/locale/ru_RU.js +0 -5
- package/lib/Antd5/time-picker/locale/si_LK.js +0 -5
- package/lib/Antd5/time-picker/locale/sk_SK.js +0 -4
- package/lib/Antd5/time-picker/locale/sl_SI.js +0 -4
- package/lib/Antd5/time-picker/locale/sr_RS.js +0 -5
- package/lib/Antd5/time-picker/locale/sv_SE.js +0 -4
- package/lib/Antd5/time-picker/locale/ta_IN.js +0 -4
- package/lib/Antd5/time-picker/locale/th_TH.js +0 -4
- package/lib/Antd5/time-picker/locale/tk_TK.js +0 -5
- package/lib/Antd5/time-picker/locale/tr_TR.js +0 -5
- package/lib/Antd5/time-picker/locale/uk_UA.js +0 -4
- package/lib/Antd5/time-picker/locale/ur_PK.js +0 -5
- package/lib/Antd5/time-picker/locale/uz_UZ.js +0 -5
- package/lib/Antd5/time-picker/locale/vi_VN.js +0 -5
- package/lib/Antd5/time-picker/locale/zh_CN.js +0 -5
- package/lib/Antd5/time-picker/locale/zh_TW.js +0 -4
- package/lib/Antd5/timeline/Timeline.js +0 -65
- package/lib/Antd5/timeline/TimelineItem.js +0 -52
- package/lib/Antd5/timeline/TimelineItemList.js +0 -87
- package/lib/Antd5/timeline/index.js +0 -2
- package/lib/Antd5/timeline/style/index.js +0 -157
- package/lib/Antd5/timeline/useItems.js +0 -19
- package/lib/Antd5/tooltip/PurePanel.js +0 -55
- package/lib/Antd5/tooltip/index.js +0 -211
- package/lib/Antd5/tooltip/style/index.js +0 -104
- package/lib/Antd5/tooltip/util.js +0 -23
- package/lib/Antd5/tour/PurePanel.js +0 -78
- package/lib/Antd5/tour/index.js +0 -99
- package/lib/Antd5/tour/interface.js +0 -1
- package/lib/Antd5/tour/panelRender.js +0 -143
- package/lib/Antd5/tour/style/index.js +0 -187
- package/lib/Antd5/transfer/ListBody.js +0 -123
- package/lib/Antd5/transfer/ListItem.js +0 -72
- package/lib/Antd5/transfer/hooks/useData.js +0 -46
- package/lib/Antd5/transfer/hooks/useSelection.js +0 -59
- package/lib/Antd5/transfer/index.js +0 -361
- package/lib/Antd5/transfer/interface.js +0 -1
- package/lib/Antd5/transfer/list.js +0 -316
- package/lib/Antd5/transfer/operation.js +0 -43
- package/lib/Antd5/transfer/search.js +0 -32
- package/lib/Antd5/transfer/style/index.js +0 -264
- package/lib/Antd5/tree/DirectoryTree.js +0 -173
- package/lib/Antd5/tree/Tree.js +0 -123
- package/lib/Antd5/tree/index.js +0 -7
- package/lib/Antd5/tree/style/index.js +0 -348
- package/lib/Antd5/tree/utils/dictUtil.js +0 -74
- package/lib/Antd5/tree/utils/dropIndicator.js +0 -35
- package/lib/Antd5/tree/utils/iconUtil.js +0 -69
- package/lib/Antd5/tree-select/index.js +0 -228
- package/lib/Antd5/tree-select/style/index.js +0 -51
- package/lib/Antd5/typography/Base/CopyBtn.js +0 -43
- package/lib/Antd5/typography/Base/Ellipsis.js +0 -245
- package/lib/Antd5/typography/Base/EllipsisTooltip.js +0 -27
- package/lib/Antd5/typography/Base/index.js +0 -444
- package/lib/Antd5/typography/Base/util.js +0 -12
- package/lib/Antd5/typography/Editable.js +0 -119
- package/lib/Antd5/typography/Link.js +0 -33
- package/lib/Antd5/typography/Paragraph.js +0 -17
- package/lib/Antd5/typography/Text.js +0 -35
- package/lib/Antd5/typography/Title.js +0 -35
- package/lib/Antd5/typography/Typography.js +0 -70
- package/lib/Antd5/typography/hooks/useCopyClick.js +0 -95
- package/lib/Antd5/typography/hooks/useMergedConfig.js +0 -13
- package/lib/Antd5/typography/hooks/usePrevious.js +0 -9
- package/lib/Antd5/typography/hooks/useUpdatedEffect.js +0 -13
- package/lib/Antd5/typography/index.js +0 -11
- package/lib/Antd5/typography/style/index.js +0 -58
- package/lib/Antd5/typography/style/mixins.js +0 -216
- package/lib/Antd5/upload/Dragger.js +0 -32
- package/lib/Antd5/upload/Upload.js +0 -458
- package/lib/Antd5/upload/UploadList/ListItem.js +0 -197
- package/lib/Antd5/upload/UploadList/index.js +0 -250
- package/lib/Antd5/upload/index.js +0 -6
- package/lib/Antd5/upload/interface.js +0 -1
- package/lib/Antd5/upload/style/dragger.js +0 -51
- package/lib/Antd5/upload/style/index.js +0 -48
- package/lib/Antd5/upload/style/list.js +0 -86
- package/lib/Antd5/upload/style/motion.js +0 -39
- package/lib/Antd5/upload/style/picture.js +0 -175
- package/lib/Antd5/upload/style/rtl.js +0 -12
- package/lib/Antd5/upload/utils.js +0 -140
- package/lib/Antd5/version/index.js +0 -4
- package/lib/Antd5/version/token-meta.json +0 -1
- package/lib/Antd5/version/token.json +0 -1
- package/lib/Antd5/version/version.js +0 -1
- package/lib/Antd5/watermark/context.js +0 -22
- package/lib/Antd5/watermark/index.js +0 -253
- package/lib/Antd5/watermark/useClips.js +0 -118
- package/lib/Antd5/watermark/useRafDebounce.js +0 -21
- package/lib/Antd5/watermark/useWatermark.js +0 -61
- package/lib/Antd5/watermark/utils.js +0 -28
- package/lib/App/index.js +0 -2
- package/lib/AutoComplete/index.js +0 -2
- package/lib/Avatar/index.js +0 -2
- package/lib/BackTop/index.js +0 -2
- package/lib/Badge/index.js +0 -48
- package/lib/Badge/index.style.js +0 -65
- package/lib/BasicLayout/Breadcrumb.js +0 -78
- package/lib/BasicLayout/Nav.js +0 -37
- package/lib/BasicLayout/Sider.js +0 -159
- package/lib/BasicLayout/index.js +0 -396
- package/lib/BasicLayout/locale/en_US.js +0 -4
- package/lib/BasicLayout/locale/index.js +0 -11
- package/lib/BasicLayout/locale/zh_CN.js +0 -4
- package/lib/BasicLayout/locale/zh_TW.js +0 -4
- package/lib/BasicLayout/style/index.js +0 -101
- package/lib/BasicLayout/style/sider.js +0 -73
- package/lib/BasicLayout/utils.js +0 -7
- package/lib/Breadcrumb/index.js +0 -2
- package/lib/Button/index.js +0 -53
- package/lib/Button/index.style.js +0 -41
- package/lib/CWCascader/Cascader/index.js +0 -281
- package/lib/CWCascader/Cascader/utils/iconUtil.js +0 -81
- package/lib/CWCascader/Cascader/utils/motion.js +0 -13
- package/lib/CWCascader/index.js +0 -73
- package/lib/CWCascader/index.style.js +0 -42
- package/lib/CWCascader/rc-cascader/Cascader.js +0 -353
- package/lib/CWCascader/rc-cascader/OptionList/Checkbox.js +0 -21
- package/lib/CWCascader/rc-cascader/OptionList/Column.js +0 -274
- package/lib/CWCascader/rc-cascader/OptionList/index.js +0 -220
- package/lib/CWCascader/rc-cascader/OptionList/useActive.js +0 -33
- package/lib/CWCascader/rc-cascader/OptionList/useKeyboard.js +0 -172
- package/lib/CWCascader/rc-cascader/context.js +0 -3
- package/lib/CWCascader/rc-cascader/hooks/useDisplayValues.js +0 -85
- package/lib/CWCascader/rc-cascader/hooks/useEntities.js +0 -40
- package/lib/CWCascader/rc-cascader/hooks/useMissingValues.js +0 -19
- package/lib/CWCascader/rc-cascader/hooks/useRefFunc.js +0 -13
- package/lib/CWCascader/rc-cascader/hooks/useSearchConfig.js +0 -30
- package/lib/CWCascader/rc-cascader/hooks/useSearchOptions.js +0 -73
- package/lib/CWCascader/rc-cascader/index.js +0 -2
- package/lib/CWCascader/rc-cascader/utils/commonUtil.js +0 -54
- package/lib/CWCascader/rc-cascader/utils/treeUtil.js +0 -81
- package/lib/CWCascader/rc-cascader/utils/warningPropsUtil.js +0 -30
- package/lib/CWColorPicker/SketchPicker/components/common/Alpha.js +0 -132
- package/lib/CWColorPicker/SketchPicker/components/common/Checkboard.js +0 -40
- package/lib/CWColorPicker/SketchPicker/components/common/ColorWrap.js +0 -79
- package/lib/CWColorPicker/SketchPicker/components/common/EditableInput.js +0 -171
- package/lib/CWColorPicker/SketchPicker/components/common/Hue.js +0 -117
- package/lib/CWColorPicker/SketchPicker/components/common/Raised.js +0 -91
- package/lib/CWColorPicker/SketchPicker/components/common/Saturation.js +0 -138
- package/lib/CWColorPicker/SketchPicker/components/common/Swatch.js +0 -62
- package/lib/CWColorPicker/SketchPicker/components/common/index.js +0 -8
- package/lib/CWColorPicker/SketchPicker/components/sketch/SketchFields.js +0 -148
- package/lib/CWColorPicker/SketchPicker/components/sketch/SketchPresetColors.js +0 -72
- package/lib/CWColorPicker/SketchPicker/components/sketch/index.js +0 -160
- package/lib/CWColorPicker/SketchPicker/helpers/alpha.js +0 -46
- package/lib/CWColorPicker/SketchPicker/helpers/checkboard.js +0 -29
- package/lib/CWColorPicker/SketchPicker/helpers/color.js +0 -86
- package/lib/CWColorPicker/SketchPicker/helpers/hue.js +0 -48
- package/lib/CWColorPicker/SketchPicker/helpers/index.js +0 -2
- package/lib/CWColorPicker/SketchPicker/helpers/interaction.js +0 -54
- package/lib/CWColorPicker/SketchPicker/helpers/saturation.js +0 -28
- package/lib/CWColorPicker/index.js +0 -296
- package/lib/CWColorPicker/index.style.js +0 -81
- package/lib/CWColorPicker/utils.js +0 -15
- package/lib/CWMessage/CommonIcon.js +0 -16
- package/lib/CWMessage/MessageContent/TabList/index.js +0 -113
- package/lib/CWMessage/MessageContent/index.js +0 -268
- package/lib/CWMessage/index.js +0 -456
- package/lib/CWMessage/index.style.js +0 -141
- package/lib/CWMessage/message.svg +0 -14
- package/lib/CWMessage/messageSvg.js +0 -19
- package/lib/CWMessage/service/index.js +0 -35
- package/lib/CWMessage/utils/index.js +0 -33
- package/lib/CWRadioTabs/index.js +0 -150
- package/lib/CWRadioTabs/index.style.js +0 -33
- package/lib/CWRangePicker/DropdownMenu/MoreHistoryList/index.js +0 -37
- package/lib/CWRangePicker/DropdownMenu/MoreTimeList/index.js +0 -46
- package/lib/CWRangePicker/DropdownMenu/index.js +0 -240
- package/lib/CWRangePicker/DropdownMenu/index.style.js +0 -159
- package/lib/CWRangePicker/Refresh/index.js +0 -161
- package/lib/CWRangePicker/Refresh/index.style.js +0 -37
- package/lib/CWRangePicker/TimeSpan/index.js +0 -96
- package/lib/CWRangePicker/TimeSpan/index.style.js +0 -25
- package/lib/CWRangePicker/assets/Calendar.js +0 -15
- package/lib/CWRangePicker/assets/Calendar2.js +0 -15
- package/lib/CWRangePicker/assets/Recover.js +0 -18
- package/lib/CWRangePicker/assets/Refresh1.js +0 -14
- package/lib/CWRangePicker/assets/Refresh2.js +0 -14
- package/lib/CWRangePicker/assets/Refresh3.js +0 -14
- package/lib/CWRangePicker/assets/live.js +0 -19
- package/lib/CWRangePicker/assets/more.js +0 -23
- package/lib/CWRangePicker/index.js +0 -742
- package/lib/CWRangePicker/index.style.js +0 -78
- package/lib/CWRangePicker/locale/en_US.js +0 -29
- package/lib/CWRangePicker/locale/index.js +0 -11
- package/lib/CWRangePicker/locale/zh_CN.js +0 -29
- package/lib/CWRangePicker/locale/zh_TW.js +0 -29
- package/lib/CWRangePicker/utils/index.js +0 -706
- package/lib/CWSelect/index.js +0 -2
- package/lib/CWTable/CWTable.js +0 -605
- package/lib/CWTable/header.js +0 -55
- package/lib/CWTable/index.js +0 -217
- package/lib/CWTable/index.style.js +0 -96
- package/lib/CWTree/assets/Drag.js +0 -23
- package/lib/CWTree/index.js +0 -399
- package/lib/CWTree/index.style.js +0 -127
- package/lib/CWTree/locale/en_US.js +0 -3
- package/lib/CWTree/locale/index.js +0 -11
- package/lib/CWTree/locale/zh_CN.js +0 -3
- package/lib/CWTree/locale/zh_TW.js +0 -3
- package/lib/CWTree/utils/index.js +0 -99
- package/lib/Calendar/index.js +0 -2
- package/lib/Card/index.js +0 -2
- package/lib/CardSelect/index.js +0 -153
- package/lib/CardSelect/index.style.js +0 -76
- package/lib/Carousel/index.js +0 -2
- package/lib/Cascader/index.js +0 -2
- package/lib/ChangeIcon/index.js +0 -153
- package/lib/ChangeIcon/index.style.js +0 -89
- package/lib/Checkbox/index.js +0 -2
- package/lib/CitySelect/citys.js +0 -1457
- package/lib/CitySelect/index.js +0 -128
- package/lib/Col/index.js +0 -2
- package/lib/Collapse/index.js +0 -85
- package/lib/Collapse/index.style.js +0 -120
- package/lib/ColorPicker/index.js +0 -2
- package/lib/ConfigProvider/ConfigProvider.js +0 -92
- package/lib/ConfigProvider/Switch.js +0 -43
- package/lib/ConfigProvider/customTheme.js +0 -268
- package/lib/ConfigProvider/customTheme.json +0 -163
- package/lib/ConfigProvider/customToken.js +0 -41
- package/lib/ConfigProvider/index.js +0 -6
- package/lib/ConfigProvider/intlContext.js +0 -8
- package/lib/ConfigProvider/useLocale.js +0 -15
- package/lib/CustomScrollBar/index.js +0 -150
- package/lib/DataView/index.js +0 -72
- package/lib/DataView/index.style.js +0 -34
- package/lib/DatePicker/index.js +0 -2
- package/lib/DemoShow/index.js +0 -15
- package/lib/Descriptions/index.js +0 -2
- package/lib/Divider/index.js +0 -2
- package/lib/Documentation/Tocify.js +0 -114
- package/lib/Documentation/index.js +0 -147
- package/lib/Documentation/index.style.js +0 -180
- package/lib/Drawer/index.js +0 -107
- package/lib/Drawer/index.style.js +0 -93
- package/lib/Dropdown/DropdownButton.js +0 -20
- package/lib/Dropdown/index.js +0 -39
- package/lib/Dropdown/index.style.js +0 -22
- package/lib/EchartsArea/index.js +0 -113
- package/lib/EchartsBar/index.js +0 -212
- package/lib/EchartsBarRow/index.js +0 -86
- package/lib/EchartsBase/index.js +0 -217
- package/lib/EchartsLine/index.js +0 -173
- package/lib/EchartsPie/index.js +0 -121
- package/lib/EchartsRing/index.js +0 -102
- package/lib/Empty/index.js +0 -70
- package/lib/Empty/index.style.js +0 -36
- package/lib/ErrorBoundary/ErrorPage.js +0 -35
- package/lib/ErrorBoundary/assets/images/No-data.png +0 -0
- package/lib/ErrorBoundary/history.js +0 -81
- package/lib/ErrorBoundary/index.js +0 -93
- package/lib/ErrorBoundary/index.styles.js +0 -48
- package/lib/Exception/images/error.svg +0 -58
- package/lib/Exception/index.js +0 -99
- package/lib/Exception/index.style.js +0 -37
- package/lib/FilterDropDown/DragList.js +0 -106
- package/lib/FilterDropDown/assets/DragSvg.js +0 -33
- package/lib/FilterDropDown/assets/ShowSvgIcon.js +0 -14
- package/lib/FilterDropDown/index.js +0 -271
- package/lib/FilterDropDown/index.style.js +0 -83
- package/lib/Flex/index.js +0 -2
- package/lib/FloatButton/index.js +0 -2
- package/lib/Flow/BasicLayout/Chain.js +0 -112
- package/lib/Flow/BasicLayout/config.js +0 -21
- package/lib/Flow/BasicLayout/util.js +0 -106
- package/lib/Flow/Flow.js +0 -183
- package/lib/Flow/commons/initCommands.js +0 -150
- package/lib/Flow/components/PluginWrapper.js +0 -25
- package/lib/Flow/index.js +0 -7
- package/lib/Flow/layouts/callChain.js +0 -121
- package/lib/Flow/layouts/index.js +0 -4
- package/lib/Flow/plugins/CommandLifeCycle.js +0 -215
- package/lib/Flow/plugins/InitSideBarPlugin.js +0 -81
- package/lib/Flow/plugins/InitToolBarPlugin.js +0 -99
- package/lib/Flow/shape/index.js +0 -4
- package/lib/Flow/shape/nodes/baseNode.js +0 -99
- package/lib/Flow/shape/nodes/index.js +0 -4
- package/lib/Flow/tools/index.js +0 -22
- package/lib/Flow/types/index.js +0 -1
- package/lib/Form/FormItem.js +0 -79
- package/lib/Form/consts.js +0 -2
- package/lib/Form/context.js +0 -3
- package/lib/Form/hook/useForm3.js +0 -117
- package/lib/Form/index.js +0 -77
- package/lib/Form/index.style.js +0 -56
- package/lib/FormItemWrapper/index.js +0 -52
- package/lib/FormItemWrapper/index.style.js +0 -32
- package/lib/GlobalTabs/index.js +0 -49
- package/lib/GlobalTabs/index.style.js +0 -31
- package/lib/Grid/index.js +0 -2
- package/lib/Header/CommonDropMenu.js +0 -90
- package/lib/Header/CommonIcon.js +0 -26
- package/lib/Header/Document/icon.svg +0 -14
- package/lib/Header/Document/index.js +0 -29
- package/lib/Header/LocaleSwitcher.js +0 -41
- package/lib/Header/Message/index.js +0 -21
- package/lib/Header/TopNavigationMenu/index.js +0 -73
- package/lib/Header/TopNavigationMenu/index.style.js +0 -47
- package/lib/Header/UserSetting/TenantList.js +0 -26
- package/lib/Header/UserSetting/TenantTree.js +0 -33
- package/lib/Header/UserSetting/index.js +0 -202
- package/lib/Header/UserSetting/index.style.js +0 -60
- package/lib/Header/UserSetting/utils.js +0 -30
- package/lib/Header/assets/home.svg +0 -13
- package/lib/Header/assets/logo.svg +0 -20
- package/lib/Header/index.js +0 -320
- package/lib/Header/index.style.js +0 -154
- package/lib/Icon/index.js +0 -23
- package/lib/Icon/utils.js +0 -20
- package/lib/IconSelect/components/CustomImg/index.js +0 -84
- package/lib/IconSelect/components/SearchIcon/index.js +0 -98
- package/lib/IconSelect/constants/icon.js +0 -13291
- package/lib/IconSelect/index.js +0 -144
- package/lib/IconSelect/index.style.js +0 -75
- package/lib/Image/index.js +0 -2
- package/lib/Input/InputComponent.js +0 -71
- package/lib/Input/index.js +0 -93
- package/lib/Input/index.style.js +0 -23
- package/lib/InputNumber/index.js +0 -27
- package/lib/Joyride/List.js +0 -85
- package/lib/Joyride/img/finishImg.png +0 -0
- package/lib/Joyride/img/welcomeImg.png +0 -0
- package/lib/Joyride/index.js +0 -448
- package/lib/Joyride/style/index.style.js +0 -67
- package/lib/Joyride/style/list.style.js +0 -115
- package/lib/Layout/index.js +0 -2
- package/lib/LayoutWrapper/Footer.js +0 -31
- package/lib/LayoutWrapper/Header.js +0 -59
- package/lib/LayoutWrapper/LeftArrow.js +0 -17
- package/lib/LayoutWrapper/assets/left-arrow.svg +0 -21
- package/lib/LayoutWrapper/index.js +0 -196
- package/lib/LayoutWrapper/style/footer.js +0 -25
- package/lib/LayoutWrapper/style/header.js +0 -46
- package/lib/LayoutWrapper/style/index.js +0 -58
- package/lib/LeftNavigation/index.js +0 -80
- package/lib/LeftNavigation/index.style.js +0 -34
- package/lib/List/index.js +0 -2
- package/lib/Mentions/index.js +0 -2
- package/lib/Menu/index.js +0 -2
- package/lib/Modal/Modal.js +0 -176
- package/lib/Modal/assets/Close.js +0 -22
- package/lib/Modal/confirmGlobalStyle.js +0 -37
- package/lib/Modal/custom-backup/entiretyDrag.js +0 -142
- package/lib/Modal/custom-backup/index.less +0 -76
- package/lib/Modal/index.js +0 -274
- package/lib/Modal/index.style.js +0 -53
- package/lib/ModuleFederation/ErrorBoundary/index.js +0 -52
- package/lib/ModuleFederation/index.js +0 -10
- package/lib/ModuleFederation/react-dynamic-remote-component/RemoteComponent.js +0 -185
- package/lib/ModuleFederation/react-dynamic-remote-component/attach-script.js +0 -42
- package/lib/ModuleFederation/react-dynamic-remote-component/index.js +0 -1
- package/lib/ModuleFederation/react-dynamic-remote-component/load-module.js +0 -44
- package/lib/ModuleFederation/react-dynamic-remote-component/loading-script.js +0 -35
- package/lib/ModuleFederation/react-dynamic-remote-component/suspend.js +0 -28
- package/lib/ModuleFederation/react-dynamic-remote-component/utils.js +0 -7
- package/lib/ModuleTitle/index.js +0 -30
- package/lib/ModuleTitle/index.style.js +0 -34
- package/lib/Overview/index.js +0 -2
- package/lib/Pagination/index.js +0 -363
- package/lib/Pagination/index.style.js +0 -137
- package/lib/Popconfirm/index.js +0 -2
- package/lib/Popover/index.js +0 -2
- package/lib/Progress/index.js +0 -2
- package/lib/QrCode/index.js +0 -2
- package/lib/QuickRangePicker/index.js +0 -149
- package/lib/QuickRangePicker/index.style.js +0 -45
- package/lib/QuickTransfer/Drag.js +0 -56
- package/lib/QuickTransfer/DragList.js +0 -114
- package/lib/QuickTransfer/NoDrag.js +0 -33
- package/lib/QuickTransfer/NotDragList.js +0 -41
- package/lib/QuickTransfer/assets/DragSvg.js +0 -14
- package/lib/QuickTransfer/assets/LockSvg.js +0 -15
- package/lib/QuickTransfer/index.js +0 -938
- package/lib/QuickTransfer/index.style.js +0 -185
- package/lib/QuickTransfer/utils.js +0 -291
- package/lib/Radio/index.js +0 -2
- package/lib/RangePicker/index.js +0 -2
- package/lib/Rate/index.js +0 -2
- package/lib/Result/index.js +0 -2
- package/lib/Row/index.js +0 -2
- package/lib/ScrollLoad/index.js +0 -134
- package/lib/SearchBar/OutSearch.js +0 -107
- package/lib/SearchBar/index.js +0 -680
- package/lib/SearchBar/index.style.js +0 -91
- package/lib/SearchBar/locale/en_US.js +0 -6
- package/lib/SearchBar/locale/index.js +0 -11
- package/lib/SearchBar/locale/zh_CN.js +0 -6
- package/lib/SearchBar/locale/zh_TW.js +0 -6
- package/lib/Segmented/index.js +0 -2
- package/lib/Select/index.js +0 -2
- package/lib/SiderMenu/index.js +0 -215
- package/lib/SiderMenu/index.style.js +0 -23
- package/lib/SimpleCard/index.js +0 -121
- package/lib/SimpleCard/index.style.js +0 -76
- package/lib/SimplePagination/index.js +0 -188
- package/lib/SimplePagination/index.style.js +0 -105
- package/lib/SingleSpa/import-html/index.js +0 -51
- package/lib/SingleSpa/import-html/process-tpl.js +0 -189
- package/lib/SingleSpa/import-html/utils.js +0 -147
- package/lib/SingleSpa/index.js +0 -131
- package/lib/SingleSpa/singleSpa/single-spa.dev.js +0 -1505
- package/lib/SingleSpa/system/amd.js +0 -153
- package/lib/SingleSpa/system/index.js +0 -11
- package/lib/SingleSpa/system/system.js +0 -771
- package/lib/SingleSpa/system/systemjs-css.js +0 -96
- package/lib/SingleSpa/utils.js +0 -73
- package/lib/Skeleton/index.js +0 -2
- package/lib/Slider/assets/slider.png +0 -0
- package/lib/Slider/index.js +0 -32
- package/lib/Slider/index.style.js +0 -116
- package/lib/Space/index.js +0 -2
- package/lib/Spin/index.js +0 -2
- package/lib/Statistic/index.js +0 -2
- package/lib/Steps/index.js +0 -2
- package/lib/Switch/index.js +0 -2
- package/lib/Table/index.js +0 -2
- package/lib/Tabs/index.js +0 -52
- package/lib/Tabs/index.style.js +0 -58
- package/lib/Tag/CheckableTag.js +0 -53
- package/lib/Tag/assets/LeftBottomCorner.js +0 -22
- package/lib/Tag/assets/LeftTopCorner.js +0 -22
- package/lib/Tag/assets/RightBottomCorner.js +0 -22
- package/lib/Tag/assets/RightTopCorner.js +0 -14
- package/lib/Tag/index.js +0 -109
- package/lib/Tag/index.style.js +0 -156
- package/lib/Theme/index.js +0 -2
- package/lib/ThemeProvider/Switcher.js +0 -25
- package/lib/ThemeProvider/index.js +0 -5
- package/lib/ThemeProvider/main.js +0 -185
- package/lib/ThemeProvider/utils.js +0 -60
- package/lib/TimePicker/index.js +0 -2
- package/lib/Timeline/index.js +0 -2
- package/lib/Tooltip/index.js +0 -54
- package/lib/Tooltip/index.style.js +0 -23
- package/lib/TooltipText/ResizeObserverManager.js +0 -56
- package/lib/TooltipText/index.js +0 -138
- package/lib/TooltipText/index.style.js +0 -46
- package/lib/Tour/index.js +0 -2
- package/lib/Transfer/index.js +0 -2
- package/lib/Tree/index.js +0 -2
- package/lib/TreeSelect/index.js +0 -2
- package/lib/Typography/index.js +0 -2
- package/lib/Upload/index.js +0 -2
- package/lib/WangEditor/editor4.js +0 -652
- package/lib/WangEditor/index.js +0 -298
- package/lib/WangEditor/index.style.js +0 -203
- package/lib/WangEditor/locale/index.js +0 -62
- package/lib/WangEditor/release/wangEditor.js +0 -5390
- package/lib/WangEditor/resizeable.js +0 -112
- package/lib/WangEditor/usePreview.js +0 -39
- package/lib/WangEditor/wangEditor.js +0 -4627
- package/lib/Watermark/index.js +0 -2
- package/lib/antd-style/context/ThemeModeContext.js +0 -11
- package/lib/antd-style/context/index.js +0 -1
- package/lib/antd-style/core/CacheManager.js +0 -56
- package/lib/antd-style/core/createCSS.js +0 -42
- package/lib/antd-style/core/createEmotion.js +0 -1
- package/lib/antd-style/core/createSerializeStyles.js +0 -11
- package/lib/antd-style/core/index.js +0 -5
- package/lib/antd-style/core/insertStyles.js +0 -35
- package/lib/antd-style/factories/createEmotionContext.js +0 -4
- package/lib/antd-style/factories/createGlobalStyle.js +0 -28
- package/lib/antd-style/factories/createStyish.js +0 -14
- package/lib/antd-style/factories/createStyleProvider/index.js +0 -69
- package/lib/antd-style/factories/createStyledThemeProvider.js +0 -16
- package/lib/antd-style/factories/createStyles/index.js +0 -114
- package/lib/antd-style/factories/createStyles/response.js +0 -43
- package/lib/antd-style/factories/createStyles/types.js +0 -1
- package/lib/antd-style/factories/createThemeProvider/AntdProvider.js +0 -78
- package/lib/antd-style/factories/createThemeProvider/ThemeSwitcher.js +0 -130
- package/lib/antd-style/factories/createThemeProvider/TokenContainer.js +0 -75
- package/lib/antd-style/factories/createThemeProvider/index.js +0 -77
- package/lib/antd-style/factories/createThemeProvider/type.js +0 -1
- package/lib/antd-style/factories/createUseTheme.js +0 -33
- package/lib/antd-style/functions/createInstance.js +0 -95
- package/lib/antd-style/functions/extractStaticStyle.js +0 -63
- package/lib/antd-style/functions/index.js +0 -21
- package/lib/antd-style/functions/setupStyled.js +0 -11
- package/lib/antd-style/hooks/index.js +0 -5
- package/lib/antd-style/hooks/useAntdStylish.js +0 -20
- package/lib/antd-style/hooks/useAntdTheme.js +0 -18
- package/lib/antd-style/hooks/useAntdToken.js +0 -6
- package/lib/antd-style/hooks/useResponsive.js +0 -9
- package/lib/antd-style/hooks/useThemeMode.js +0 -5
- package/lib/antd-style/index.js +0 -5
- package/lib/antd-style/stylish/button.js +0 -19
- package/lib/antd-style/types/appearance.js +0 -1
- package/lib/antd-style/types/css.js +0 -1
- package/lib/antd-style/types/function.js +0 -1
- package/lib/antd-style/types/genericUtils.js +0 -1
- package/lib/antd-style/types/index.js +0 -8
- package/lib/antd-style/types/response.js +0 -1
- package/lib/antd-style/types/styleManager.js +0 -1
- package/lib/antd-style/types/styled.js +0 -1
- package/lib/antd-style/types/theme.js +0 -1
- package/lib/antd-style/utils/convertStylish.js +0 -18
- package/lib/antd-style/utils/css.js +0 -59
- package/lib/antd-style/utils/css.test.js +0 -20
- package/lib/antd-style/utils/index.js +0 -1
- package/lib/antd-style/utils/matchBrowserPrefers.js +0 -9
- package/lib/antd-style/utils/responsive.js +0 -14
- package/lib/antd-style/utils/safeStartTransition.js +0 -8
- package/lib/configHoc/index.js +0 -23
- package/lib/index.js +0 -5
- package/lib/locales/en_US.json +0 -78
- package/lib/locales/index.js +0 -57
- package/lib/locales/intl.js +0 -46
- package/lib/locales/zh_CN.json +0 -78
- package/lib/locales/zh_TW.json +0 -78
- package/lib/message/index.js +0 -2
- package/lib/noticeManager/event.js +0 -52
- package/lib/noticeManager/globalState.js +0 -26
- package/lib/noticeManager/index.js +0 -16
- package/lib/notification/index.js +0 -2
- package/lib/portalNoticeManager/event.js +0 -52
- package/lib/portalNoticeManager/index.js +0 -14
- package/lib/portalNoticeManager/usePortalDispatchNotice.js +0 -37
- package/lib/portalNoticeManager/withPortalDispatchNotice.js +0 -10
- package/lib/treeLoad/index.js +0 -43
- package/lib/useChartTheme/index.js +0 -36
- package/lib/useConfigContext/index.js +0 -6
- package/lib/utils/index.js +0 -90
|
@@ -1,1505 +0,0 @@
|
|
|
1
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
3
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5
|
-
/* single-spa@5.5.2 - ES2015 - dev */
|
|
6
|
-
var singleSpa = /*#__PURE__*/Object.freeze({
|
|
7
|
-
__proto__: null,
|
|
8
|
-
get start() {
|
|
9
|
-
return start;
|
|
10
|
-
},
|
|
11
|
-
get ensureJQuerySupport() {
|
|
12
|
-
return ensureJQuerySupport;
|
|
13
|
-
},
|
|
14
|
-
get setBootstrapMaxTime() {
|
|
15
|
-
return setBootstrapMaxTime;
|
|
16
|
-
},
|
|
17
|
-
get setMountMaxTime() {
|
|
18
|
-
return setMountMaxTime;
|
|
19
|
-
},
|
|
20
|
-
get setUnmountMaxTime() {
|
|
21
|
-
return setUnmountMaxTime;
|
|
22
|
-
},
|
|
23
|
-
get setUnloadMaxTime() {
|
|
24
|
-
return setUnloadMaxTime;
|
|
25
|
-
},
|
|
26
|
-
get registerApplication() {
|
|
27
|
-
return registerApplication;
|
|
28
|
-
},
|
|
29
|
-
get getMountedApps() {
|
|
30
|
-
return getMountedApps;
|
|
31
|
-
},
|
|
32
|
-
get getAppStatus() {
|
|
33
|
-
return getAppStatus;
|
|
34
|
-
},
|
|
35
|
-
get unloadApplication() {
|
|
36
|
-
return unloadApplication;
|
|
37
|
-
},
|
|
38
|
-
get checkActivityFunctions() {
|
|
39
|
-
return checkActivityFunctions;
|
|
40
|
-
},
|
|
41
|
-
get getAppNames() {
|
|
42
|
-
return getAppNames;
|
|
43
|
-
},
|
|
44
|
-
get pathToActiveWhen() {
|
|
45
|
-
return pathToActiveWhen;
|
|
46
|
-
},
|
|
47
|
-
get navigateToUrl() {
|
|
48
|
-
return navigateToUrl;
|
|
49
|
-
},
|
|
50
|
-
get triggerAppChange() {
|
|
51
|
-
return triggerAppChange;
|
|
52
|
-
},
|
|
53
|
-
get addErrorHandler() {
|
|
54
|
-
return addErrorHandler;
|
|
55
|
-
},
|
|
56
|
-
get removeErrorHandler() {
|
|
57
|
-
return removeErrorHandler;
|
|
58
|
-
},
|
|
59
|
-
get mountRootParcel() {
|
|
60
|
-
return mountRootParcel;
|
|
61
|
-
},
|
|
62
|
-
get NOT_LOADED() {
|
|
63
|
-
return NOT_LOADED;
|
|
64
|
-
},
|
|
65
|
-
get LOADING_SOURCE_CODE() {
|
|
66
|
-
return LOADING_SOURCE_CODE;
|
|
67
|
-
},
|
|
68
|
-
get NOT_BOOTSTRAPPED() {
|
|
69
|
-
return NOT_BOOTSTRAPPED;
|
|
70
|
-
},
|
|
71
|
-
get BOOTSTRAPPING() {
|
|
72
|
-
return BOOTSTRAPPING;
|
|
73
|
-
},
|
|
74
|
-
get NOT_MOUNTED() {
|
|
75
|
-
return NOT_MOUNTED;
|
|
76
|
-
},
|
|
77
|
-
get MOUNTING() {
|
|
78
|
-
return MOUNTING;
|
|
79
|
-
},
|
|
80
|
-
get UPDATING() {
|
|
81
|
-
return UPDATING;
|
|
82
|
-
},
|
|
83
|
-
get LOAD_ERROR() {
|
|
84
|
-
return LOAD_ERROR;
|
|
85
|
-
},
|
|
86
|
-
get MOUNTED() {
|
|
87
|
-
return MOUNTED;
|
|
88
|
-
},
|
|
89
|
-
get UNMOUNTING() {
|
|
90
|
-
return UNMOUNTING;
|
|
91
|
-
},
|
|
92
|
-
get SKIP_BECAUSE_BROKEN() {
|
|
93
|
-
return SKIP_BECAUSE_BROKEN;
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
97
|
-
var NativeCustomEvent = commonjsGlobal.CustomEvent;
|
|
98
|
-
function useNative() {
|
|
99
|
-
try {
|
|
100
|
-
var p = new NativeCustomEvent('cat', {
|
|
101
|
-
detail: {
|
|
102
|
-
foo: 'bar'
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
return 'cat' === p.type && 'bar' === p.detail.foo;
|
|
106
|
-
} catch (e) {}
|
|
107
|
-
return false;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Cross-browser `CustomEvent` constructor.
|
|
112
|
-
*
|
|
113
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent
|
|
114
|
-
*
|
|
115
|
-
* @public
|
|
116
|
-
*/
|
|
117
|
-
|
|
118
|
-
var customEvent = useNative() ? NativeCustomEvent :
|
|
119
|
-
// IE >= 9
|
|
120
|
-
'undefined' !== typeof document && 'function' === typeof document.createEvent ? function CustomEvent(type, params) {
|
|
121
|
-
var e = document.createEvent('CustomEvent');
|
|
122
|
-
if (params) {
|
|
123
|
-
e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail);
|
|
124
|
-
} else {
|
|
125
|
-
e.initCustomEvent(type, false, false, void 0);
|
|
126
|
-
}
|
|
127
|
-
return e;
|
|
128
|
-
} :
|
|
129
|
-
// IE <= 8
|
|
130
|
-
function CustomEvent(type, params) {
|
|
131
|
-
var e = document.createEventObject();
|
|
132
|
-
e.type = type;
|
|
133
|
-
if (params) {
|
|
134
|
-
e.bubbles = Boolean(params.bubbles);
|
|
135
|
-
e.cancelable = Boolean(params.cancelable);
|
|
136
|
-
e.detail = params.detail;
|
|
137
|
-
} else {
|
|
138
|
-
e.bubbles = false;
|
|
139
|
-
e.cancelable = false;
|
|
140
|
-
e.detail = void 0;
|
|
141
|
-
}
|
|
142
|
-
return e;
|
|
143
|
-
};
|
|
144
|
-
var errorHandlers = [];
|
|
145
|
-
function handleAppError(err, app, newStatus) {
|
|
146
|
-
var transformedErr = transformErr(err, app, newStatus);
|
|
147
|
-
if (errorHandlers.length) {
|
|
148
|
-
errorHandlers.forEach(function (handler) {
|
|
149
|
-
return handler(transformedErr);
|
|
150
|
-
});
|
|
151
|
-
} else {
|
|
152
|
-
setTimeout(function () {
|
|
153
|
-
throw transformedErr;
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
function addErrorHandler(handler) {
|
|
158
|
-
if (typeof handler !== "function") {
|
|
159
|
-
throw Error(formatErrorMessage(28, "a single-spa error handler must be a function"));
|
|
160
|
-
}
|
|
161
|
-
errorHandlers.push(handler);
|
|
162
|
-
}
|
|
163
|
-
function removeErrorHandler(handler) {
|
|
164
|
-
if (typeof handler !== "function") {
|
|
165
|
-
throw Error(formatErrorMessage(29, "a single-spa error handler must be a function"));
|
|
166
|
-
}
|
|
167
|
-
var removedSomething = false;
|
|
168
|
-
errorHandlers = errorHandlers.filter(function (h) {
|
|
169
|
-
var isHandler = h === handler;
|
|
170
|
-
removedSomething = removedSomething || isHandler;
|
|
171
|
-
return !isHandler;
|
|
172
|
-
});
|
|
173
|
-
return removedSomething;
|
|
174
|
-
}
|
|
175
|
-
function formatErrorMessage(code, msg) {
|
|
176
|
-
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
177
|
-
args[_key - 2] = arguments[_key];
|
|
178
|
-
}
|
|
179
|
-
return "single-spa minified message #".concat(code, ": ").concat(msg ? msg + " " : "", "See https://single-spa.js.org/error/?code=").concat(code).concat(args.length ? "&arg=".concat(args.join("&arg=")) : "");
|
|
180
|
-
}
|
|
181
|
-
function transformErr(ogErr, appOrParcel, newStatus) {
|
|
182
|
-
var errPrefix = "".concat(objectType(appOrParcel), " '").concat(toName(appOrParcel), "' died in status ").concat(appOrParcel.status, ": ");
|
|
183
|
-
var result;
|
|
184
|
-
if (ogErr instanceof Error) {
|
|
185
|
-
try {
|
|
186
|
-
ogErr.message = errPrefix + ogErr.message;
|
|
187
|
-
} catch (err) {
|
|
188
|
-
/* Some errors have read-only message properties, in which case there is nothing
|
|
189
|
-
* that we can do.
|
|
190
|
-
*/
|
|
191
|
-
}
|
|
192
|
-
result = ogErr;
|
|
193
|
-
} else {
|
|
194
|
-
console.warn(formatErrorMessage(30, "While ".concat(appOrParcel.status, ", '").concat(toName(appOrParcel), "' rejected its lifecycle function promise with a non-Error. This will cause stack traces to not be accurate."), appOrParcel.status, toName(appOrParcel)));
|
|
195
|
-
try {
|
|
196
|
-
result = Error(errPrefix + JSON.stringify(ogErr));
|
|
197
|
-
} catch (err) {
|
|
198
|
-
// If it's not an Error and you can't stringify it, then what else can you even do to it?
|
|
199
|
-
result = ogErr;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
result.appOrParcelName = toName(appOrParcel); // We set the status after transforming the error so that the error message
|
|
203
|
-
// references the state the application was in before the status change.
|
|
204
|
-
|
|
205
|
-
appOrParcel.status = newStatus;
|
|
206
|
-
return result;
|
|
207
|
-
}
|
|
208
|
-
var NOT_LOADED = "NOT_LOADED";
|
|
209
|
-
var LOADING_SOURCE_CODE = "LOADING_SOURCE_CODE";
|
|
210
|
-
var NOT_BOOTSTRAPPED = "NOT_BOOTSTRAPPED";
|
|
211
|
-
var BOOTSTRAPPING = "BOOTSTRAPPING";
|
|
212
|
-
var NOT_MOUNTED = "NOT_MOUNTED";
|
|
213
|
-
var MOUNTING = "MOUNTING";
|
|
214
|
-
var MOUNTED = "MOUNTED";
|
|
215
|
-
var UPDATING = "UPDATING";
|
|
216
|
-
var UNMOUNTING = "UNMOUNTING";
|
|
217
|
-
var UNLOADING = "UNLOADING";
|
|
218
|
-
var LOAD_ERROR = "LOAD_ERROR";
|
|
219
|
-
var SKIP_BECAUSE_BROKEN = "SKIP_BECAUSE_BROKEN";
|
|
220
|
-
function isActive(app) {
|
|
221
|
-
return app.status === MOUNTED;
|
|
222
|
-
}
|
|
223
|
-
function shouldBeActive(app) {
|
|
224
|
-
try {
|
|
225
|
-
return app.activeWhen(window.location);
|
|
226
|
-
} catch (err) {
|
|
227
|
-
handleAppError(err, app, SKIP_BECAUSE_BROKEN);
|
|
228
|
-
return false;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
function toName(app) {
|
|
232
|
-
return app.name;
|
|
233
|
-
}
|
|
234
|
-
function isParcel(appOrParcel) {
|
|
235
|
-
return Boolean(appOrParcel.unmountThisParcel);
|
|
236
|
-
}
|
|
237
|
-
function objectType(appOrParcel) {
|
|
238
|
-
return isParcel(appOrParcel) ? "parcel" : "application";
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
// Object.assign() is not available in IE11. And the babel compiled output for object spread
|
|
242
|
-
// syntax checks a bunch of Symbol stuff and is almost a kb. So this function is the smaller replacement.
|
|
243
|
-
function assign() {
|
|
244
|
-
for (var i = arguments.length - 1; i > 0; i--) {
|
|
245
|
-
for (var key in arguments[i]) {
|
|
246
|
-
if (key === "__proto__") {
|
|
247
|
-
continue;
|
|
248
|
-
}
|
|
249
|
-
arguments[i - 1][key] = arguments[i][key];
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
return arguments[0];
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/* the array.prototype.find polyfill on npmjs.com is ~20kb (not worth it)
|
|
256
|
-
* and lodash is ~200kb (not worth it)
|
|
257
|
-
*/
|
|
258
|
-
function find(arr, func) {
|
|
259
|
-
for (var i = 0; i < arr.length; i++) {
|
|
260
|
-
if (func(arr[i])) {
|
|
261
|
-
return arr[i];
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
return null;
|
|
265
|
-
}
|
|
266
|
-
function validLifecycleFn(fn) {
|
|
267
|
-
return fn && (typeof fn === "function" || isArrayOfFns(fn));
|
|
268
|
-
function isArrayOfFns(arr) {
|
|
269
|
-
return Array.isArray(arr) && !find(arr, function (item) {
|
|
270
|
-
return typeof item !== "function";
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
function flattenFnArray(appOrParcel, lifecycle) {
|
|
275
|
-
var fns = appOrParcel[lifecycle] || [];
|
|
276
|
-
fns = Array.isArray(fns) ? fns : [fns];
|
|
277
|
-
if (fns.length === 0) {
|
|
278
|
-
fns = [function () {
|
|
279
|
-
return Promise.resolve();
|
|
280
|
-
}];
|
|
281
|
-
}
|
|
282
|
-
var type = objectType(appOrParcel);
|
|
283
|
-
var name = toName(appOrParcel);
|
|
284
|
-
return function (props) {
|
|
285
|
-
return fns.reduce(function (resultPromise, fn, index) {
|
|
286
|
-
return resultPromise.then(function () {
|
|
287
|
-
var thisPromise = fn(props);
|
|
288
|
-
return smellsLikeAPromise(thisPromise) ? thisPromise : Promise.reject(formatErrorMessage(15, "Within ".concat(type, " ").concat(name, ", the lifecycle function ").concat(lifecycle, " at array index ").concat(index, " did not return a promise"), type, name, lifecycle, index));
|
|
289
|
-
});
|
|
290
|
-
}, Promise.resolve());
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
function smellsLikeAPromise(promise) {
|
|
294
|
-
return promise && typeof promise.then === "function" && typeof promise["catch"] === "function";
|
|
295
|
-
}
|
|
296
|
-
function toBootstrapPromise(appOrParcel, hardFail) {
|
|
297
|
-
return Promise.resolve().then(function () {
|
|
298
|
-
if (appOrParcel.status !== NOT_BOOTSTRAPPED) {
|
|
299
|
-
return appOrParcel;
|
|
300
|
-
}
|
|
301
|
-
appOrParcel.status = BOOTSTRAPPING;
|
|
302
|
-
return reasonableTime(appOrParcel, "bootstrap").then(function () {
|
|
303
|
-
appOrParcel.status = NOT_MOUNTED;
|
|
304
|
-
return appOrParcel;
|
|
305
|
-
})["catch"](function (err) {
|
|
306
|
-
if (hardFail) {
|
|
307
|
-
throw transformErr(err, appOrParcel, SKIP_BECAUSE_BROKEN);
|
|
308
|
-
} else {
|
|
309
|
-
handleAppError(err, appOrParcel, SKIP_BECAUSE_BROKEN);
|
|
310
|
-
return appOrParcel;
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
function toUnmountPromise(appOrParcel, hardFail) {
|
|
316
|
-
return Promise.resolve().then(function () {
|
|
317
|
-
if (appOrParcel.status !== MOUNTED) {
|
|
318
|
-
return appOrParcel;
|
|
319
|
-
}
|
|
320
|
-
appOrParcel.status = UNMOUNTING;
|
|
321
|
-
var unmountChildrenParcels = Object.keys(appOrParcel.parcels).map(function (parcelId) {
|
|
322
|
-
return appOrParcel.parcels[parcelId].unmountThisParcel();
|
|
323
|
-
});
|
|
324
|
-
return Promise.all(unmountChildrenParcels).then(unmountAppOrParcel, function (parcelError) {
|
|
325
|
-
// There is a parcel unmount error
|
|
326
|
-
return unmountAppOrParcel().then(function () {
|
|
327
|
-
// Unmounting the app/parcel succeeded, but unmounting its children parcels did not
|
|
328
|
-
var parentError = Error(parcelError.message);
|
|
329
|
-
if (hardFail) {
|
|
330
|
-
throw transformErr(parentError, appOrParcel, SKIP_BECAUSE_BROKEN);
|
|
331
|
-
} else {
|
|
332
|
-
handleAppError(parentError, appOrParcel, SKIP_BECAUSE_BROKEN);
|
|
333
|
-
}
|
|
334
|
-
});
|
|
335
|
-
}).then(function () {
|
|
336
|
-
return appOrParcel;
|
|
337
|
-
});
|
|
338
|
-
function unmountAppOrParcel() {
|
|
339
|
-
// We always try to unmount the appOrParcel, even if the children parcels failed to unmount.
|
|
340
|
-
return reasonableTime(appOrParcel, "unmount").then(function () {
|
|
341
|
-
// The appOrParcel needs to stay in a broken status if its children parcels fail to unmount
|
|
342
|
-
{
|
|
343
|
-
appOrParcel.status = NOT_MOUNTED;
|
|
344
|
-
}
|
|
345
|
-
})["catch"](function (err) {
|
|
346
|
-
if (hardFail) {
|
|
347
|
-
throw transformErr(err, appOrParcel, SKIP_BECAUSE_BROKEN);
|
|
348
|
-
} else {
|
|
349
|
-
handleAppError(err, appOrParcel, SKIP_BECAUSE_BROKEN);
|
|
350
|
-
}
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
var beforeFirstMountFired = false;
|
|
356
|
-
var firstMountFired = false;
|
|
357
|
-
function toMountPromise(appOrParcel, hardFail) {
|
|
358
|
-
return Promise.resolve().then(function () {
|
|
359
|
-
if (appOrParcel.status !== NOT_MOUNTED) {
|
|
360
|
-
return appOrParcel;
|
|
361
|
-
}
|
|
362
|
-
if (!beforeFirstMountFired) {
|
|
363
|
-
window.dispatchEvent(new customEvent("single-spa:before-first-mount"));
|
|
364
|
-
beforeFirstMountFired = true;
|
|
365
|
-
}
|
|
366
|
-
return reasonableTime(appOrParcel, "mount").then(function () {
|
|
367
|
-
appOrParcel.status = MOUNTED;
|
|
368
|
-
if (!firstMountFired) {
|
|
369
|
-
window.dispatchEvent(new customEvent("single-spa:first-mount"));
|
|
370
|
-
firstMountFired = true;
|
|
371
|
-
}
|
|
372
|
-
return appOrParcel;
|
|
373
|
-
})["catch"](function (err) {
|
|
374
|
-
// If we fail to mount the appOrParcel, we should attempt to unmount it before putting in SKIP_BECAUSE_BROKEN
|
|
375
|
-
// We temporarily put the appOrParcel into MOUNTED status so that toUnmountPromise actually attempts to unmount it
|
|
376
|
-
// instead of just doing a no-op.
|
|
377
|
-
appOrParcel.status = MOUNTED;
|
|
378
|
-
return toUnmountPromise(appOrParcel, true).then(setSkipBecauseBroken, setSkipBecauseBroken);
|
|
379
|
-
function setSkipBecauseBroken() {
|
|
380
|
-
if (!hardFail) {
|
|
381
|
-
handleAppError(err, appOrParcel, SKIP_BECAUSE_BROKEN);
|
|
382
|
-
return appOrParcel;
|
|
383
|
-
} else {
|
|
384
|
-
throw transformErr(err, appOrParcel, SKIP_BECAUSE_BROKEN);
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
});
|
|
388
|
-
});
|
|
389
|
-
}
|
|
390
|
-
function toUpdatePromise(parcel) {
|
|
391
|
-
return Promise.resolve().then(function () {
|
|
392
|
-
if (parcel.status !== MOUNTED) {
|
|
393
|
-
throw Error(formatErrorMessage(32, "Cannot update parcel '".concat(toName(parcel), "' because it is not mounted"), toName(parcel)));
|
|
394
|
-
}
|
|
395
|
-
parcel.status = UPDATING;
|
|
396
|
-
return reasonableTime(parcel, "update").then(function () {
|
|
397
|
-
parcel.status = MOUNTED;
|
|
398
|
-
return parcel;
|
|
399
|
-
})["catch"](function (err) {
|
|
400
|
-
throw transformErr(err, parcel, SKIP_BECAUSE_BROKEN);
|
|
401
|
-
});
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
var parcelCount = 0;
|
|
405
|
-
var rootParcels = {
|
|
406
|
-
parcels: {}
|
|
407
|
-
}; // This is a public api, exported to users of single-spa
|
|
408
|
-
|
|
409
|
-
function mountRootParcel() {
|
|
410
|
-
return mountParcel.apply(rootParcels, arguments);
|
|
411
|
-
}
|
|
412
|
-
function mountParcel(config, customProps) {
|
|
413
|
-
var owningAppOrParcel = this; // Validate inputs
|
|
414
|
-
|
|
415
|
-
if (!config || _typeof(config) !== "object" && typeof config !== "function") {
|
|
416
|
-
throw Error(formatErrorMessage(2, "Cannot mount parcel without a config object or config loading function"));
|
|
417
|
-
}
|
|
418
|
-
if (config.name && typeof config.name !== "string") {
|
|
419
|
-
throw Error(formatErrorMessage(3, "Parcel name must be a string, if provided. Was given ".concat(_typeof(config.name)), _typeof(config.name)));
|
|
420
|
-
}
|
|
421
|
-
if (_typeof(customProps) !== "object") {
|
|
422
|
-
throw Error(formatErrorMessage(4, "Parcel ".concat(name, " has invalid customProps -- must be an object but was given ").concat(_typeof(customProps)), name, _typeof(customProps)));
|
|
423
|
-
}
|
|
424
|
-
if (!customProps.domElement) {
|
|
425
|
-
throw Error(formatErrorMessage(5, "Parcel ".concat(name, " cannot be mounted without a domElement provided as a prop"), name));
|
|
426
|
-
}
|
|
427
|
-
var id = parcelCount++;
|
|
428
|
-
var passedConfigLoadingFunction = typeof config === "function";
|
|
429
|
-
var configLoadingFunction = passedConfigLoadingFunction ? config : function () {
|
|
430
|
-
return Promise.resolve(config);
|
|
431
|
-
}; // Internal representation
|
|
432
|
-
|
|
433
|
-
var parcel = {
|
|
434
|
-
id: id,
|
|
435
|
-
parcels: {},
|
|
436
|
-
status: passedConfigLoadingFunction ? LOADING_SOURCE_CODE : NOT_BOOTSTRAPPED,
|
|
437
|
-
customProps: customProps,
|
|
438
|
-
parentName: toName(owningAppOrParcel),
|
|
439
|
-
unmountThisParcel: function unmountThisParcel() {
|
|
440
|
-
if (parcel.status !== MOUNTED) {
|
|
441
|
-
throw Error(formatErrorMessage(6, "Cannot unmount parcel '".concat(name, "' -- it is in a ").concat(parcel.status, " status"), name, parcel.status));
|
|
442
|
-
}
|
|
443
|
-
return toUnmountPromise(parcel, true).then(function (value) {
|
|
444
|
-
if (parcel.parentName) {
|
|
445
|
-
delete owningAppOrParcel.parcels[parcel.id];
|
|
446
|
-
}
|
|
447
|
-
return value;
|
|
448
|
-
}).then(function (value) {
|
|
449
|
-
resolveUnmount(value);
|
|
450
|
-
return value;
|
|
451
|
-
})["catch"](function (err) {
|
|
452
|
-
parcel.status = SKIP_BECAUSE_BROKEN;
|
|
453
|
-
rejectUnmount(err);
|
|
454
|
-
throw err;
|
|
455
|
-
});
|
|
456
|
-
}
|
|
457
|
-
}; // We return an external representation
|
|
458
|
-
|
|
459
|
-
var externalRepresentation; // Add to owning app or parcel
|
|
460
|
-
|
|
461
|
-
owningAppOrParcel.parcels[id] = parcel;
|
|
462
|
-
var loadPromise = configLoadingFunction();
|
|
463
|
-
if (!loadPromise || typeof loadPromise.then !== "function") {
|
|
464
|
-
throw Error(formatErrorMessage(7, "When mounting a parcel, the config loading function must return a promise that resolves with the parcel config"));
|
|
465
|
-
}
|
|
466
|
-
loadPromise = loadPromise.then(function (config) {
|
|
467
|
-
if (!config) {
|
|
468
|
-
throw Error(formatErrorMessage(8, "When mounting a parcel, the config loading function returned a promise that did not resolve with a parcel config"));
|
|
469
|
-
}
|
|
470
|
-
var name = config.name || "parcel-".concat(id);
|
|
471
|
-
if (!validLifecycleFn(config.bootstrap)) {
|
|
472
|
-
throw Error(formatErrorMessage(9, "Parcel ".concat(name, " must have a valid bootstrap function"), name));
|
|
473
|
-
}
|
|
474
|
-
if (!validLifecycleFn(config.mount)) {
|
|
475
|
-
throw Error(formatErrorMessage(10, "Parcel ".concat(name, " must have a valid mount function"), name));
|
|
476
|
-
}
|
|
477
|
-
if (!validLifecycleFn(config.unmount)) {
|
|
478
|
-
throw Error(formatErrorMessage(11, "Parcel ".concat(name, " must have a valid unmount function"), name));
|
|
479
|
-
}
|
|
480
|
-
if (config.update && !validLifecycleFn(config.update)) {
|
|
481
|
-
throw Error(formatErrorMessage(12, "Parcel ".concat(name, " provided an invalid update function"), name));
|
|
482
|
-
}
|
|
483
|
-
var bootstrap = flattenFnArray(config, "bootstrap");
|
|
484
|
-
var mount = flattenFnArray(config, "mount");
|
|
485
|
-
var unmount = flattenFnArray(config, "unmount");
|
|
486
|
-
parcel.status = NOT_BOOTSTRAPPED;
|
|
487
|
-
parcel.name = name;
|
|
488
|
-
parcel.bootstrap = bootstrap;
|
|
489
|
-
parcel.mount = mount;
|
|
490
|
-
parcel.unmount = unmount;
|
|
491
|
-
parcel.timeouts = ensureValidAppTimeouts(config.timeouts);
|
|
492
|
-
if (config.update) {
|
|
493
|
-
parcel.update = flattenFnArray(config, "update");
|
|
494
|
-
externalRepresentation.update = function (customProps) {
|
|
495
|
-
parcel.customProps = customProps;
|
|
496
|
-
return promiseWithoutReturnValue(toUpdatePromise(parcel));
|
|
497
|
-
};
|
|
498
|
-
}
|
|
499
|
-
}); // Start bootstrapping and mounting
|
|
500
|
-
// The .then() causes the work to be put on the event loop instead of happening immediately
|
|
501
|
-
|
|
502
|
-
var bootstrapPromise = loadPromise.then(function () {
|
|
503
|
-
return toBootstrapPromise(parcel, true);
|
|
504
|
-
});
|
|
505
|
-
var mountPromise = bootstrapPromise.then(function () {
|
|
506
|
-
return toMountPromise(parcel, true);
|
|
507
|
-
});
|
|
508
|
-
var resolveUnmount, rejectUnmount;
|
|
509
|
-
var unmountPromise = new Promise(function (resolve, reject) {
|
|
510
|
-
resolveUnmount = resolve;
|
|
511
|
-
rejectUnmount = reject;
|
|
512
|
-
});
|
|
513
|
-
externalRepresentation = {
|
|
514
|
-
mount: function mount() {
|
|
515
|
-
return promiseWithoutReturnValue(Promise.resolve().then(function () {
|
|
516
|
-
if (parcel.status !== NOT_MOUNTED) {
|
|
517
|
-
throw Error(formatErrorMessage(13, "Cannot mount parcel '".concat(name, "' -- it is in a ").concat(parcel.status, " status"), name, parcel.status));
|
|
518
|
-
} // Add to owning app or parcel
|
|
519
|
-
|
|
520
|
-
owningAppOrParcel.parcels[id] = parcel;
|
|
521
|
-
return toMountPromise(parcel);
|
|
522
|
-
}));
|
|
523
|
-
},
|
|
524
|
-
unmount: function unmount() {
|
|
525
|
-
return promiseWithoutReturnValue(parcel.unmountThisParcel());
|
|
526
|
-
},
|
|
527
|
-
getStatus: function getStatus() {
|
|
528
|
-
return parcel.status;
|
|
529
|
-
},
|
|
530
|
-
loadPromise: promiseWithoutReturnValue(loadPromise),
|
|
531
|
-
bootstrapPromise: promiseWithoutReturnValue(bootstrapPromise),
|
|
532
|
-
mountPromise: promiseWithoutReturnValue(mountPromise),
|
|
533
|
-
unmountPromise: promiseWithoutReturnValue(unmountPromise)
|
|
534
|
-
};
|
|
535
|
-
return externalRepresentation;
|
|
536
|
-
}
|
|
537
|
-
function promiseWithoutReturnValue(promise) {
|
|
538
|
-
return promise.then(function () {
|
|
539
|
-
return null;
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
|
-
function getProps(appOrParcel) {
|
|
543
|
-
var name = toName(appOrParcel);
|
|
544
|
-
var customProps = typeof appOrParcel.customProps === "function" ? appOrParcel.customProps(name, window.location) : appOrParcel.customProps;
|
|
545
|
-
if (_typeof(customProps) !== "object" || customProps === null || Array.isArray(customProps)) {
|
|
546
|
-
customProps = {};
|
|
547
|
-
console.warn(formatErrorMessage(40, "single-spa: ".concat(name, "'s customProps function must return an object. Received ").concat(customProps)), name, customProps);
|
|
548
|
-
}
|
|
549
|
-
var result = assign({}, customProps, {
|
|
550
|
-
name: name,
|
|
551
|
-
mountParcel: mountParcel.bind(appOrParcel),
|
|
552
|
-
singleSpa: singleSpa
|
|
553
|
-
});
|
|
554
|
-
if (isParcel(appOrParcel)) {
|
|
555
|
-
result.unmountSelf = appOrParcel.unmountThisParcel;
|
|
556
|
-
}
|
|
557
|
-
return result;
|
|
558
|
-
}
|
|
559
|
-
var defaultWarningMillis = 1000;
|
|
560
|
-
var globalTimeoutConfig = {
|
|
561
|
-
bootstrap: {
|
|
562
|
-
millis: 4000,
|
|
563
|
-
dieOnTimeout: false,
|
|
564
|
-
warningMillis: defaultWarningMillis
|
|
565
|
-
},
|
|
566
|
-
mount: {
|
|
567
|
-
millis: 3000,
|
|
568
|
-
dieOnTimeout: false,
|
|
569
|
-
warningMillis: defaultWarningMillis
|
|
570
|
-
},
|
|
571
|
-
unmount: {
|
|
572
|
-
millis: 3000,
|
|
573
|
-
dieOnTimeout: false,
|
|
574
|
-
warningMillis: defaultWarningMillis
|
|
575
|
-
},
|
|
576
|
-
unload: {
|
|
577
|
-
millis: 3000,
|
|
578
|
-
dieOnTimeout: false,
|
|
579
|
-
warningMillis: defaultWarningMillis
|
|
580
|
-
},
|
|
581
|
-
update: {
|
|
582
|
-
millis: 3000,
|
|
583
|
-
dieOnTimeout: false,
|
|
584
|
-
warningMillis: defaultWarningMillis
|
|
585
|
-
}
|
|
586
|
-
};
|
|
587
|
-
function setBootstrapMaxTime(time, dieOnTimeout, warningMillis) {
|
|
588
|
-
if (typeof time !== "number" || time <= 0) {
|
|
589
|
-
throw Error(formatErrorMessage(16, "bootstrap max time must be a positive integer number of milliseconds"));
|
|
590
|
-
}
|
|
591
|
-
globalTimeoutConfig.bootstrap = {
|
|
592
|
-
millis: time,
|
|
593
|
-
dieOnTimeout: dieOnTimeout,
|
|
594
|
-
warningMillis: warningMillis || defaultWarningMillis
|
|
595
|
-
};
|
|
596
|
-
}
|
|
597
|
-
function setMountMaxTime(time, dieOnTimeout, warningMillis) {
|
|
598
|
-
if (typeof time !== "number" || time <= 0) {
|
|
599
|
-
throw Error(formatErrorMessage(17, "mount max time must be a positive integer number of milliseconds"));
|
|
600
|
-
}
|
|
601
|
-
globalTimeoutConfig.mount = {
|
|
602
|
-
millis: time,
|
|
603
|
-
dieOnTimeout: dieOnTimeout,
|
|
604
|
-
warningMillis: warningMillis || defaultWarningMillis
|
|
605
|
-
};
|
|
606
|
-
}
|
|
607
|
-
function setUnmountMaxTime(time, dieOnTimeout, warningMillis) {
|
|
608
|
-
if (typeof time !== "number" || time <= 0) {
|
|
609
|
-
throw Error(formatErrorMessage(18, "unmount max time must be a positive integer number of milliseconds"));
|
|
610
|
-
}
|
|
611
|
-
globalTimeoutConfig.unmount = {
|
|
612
|
-
millis: time,
|
|
613
|
-
dieOnTimeout: dieOnTimeout,
|
|
614
|
-
warningMillis: warningMillis || defaultWarningMillis
|
|
615
|
-
};
|
|
616
|
-
}
|
|
617
|
-
function setUnloadMaxTime(time, dieOnTimeout, warningMillis) {
|
|
618
|
-
if (typeof time !== "number" || time <= 0) {
|
|
619
|
-
throw Error(formatErrorMessage(19, "unload max time must be a positive integer number of milliseconds"));
|
|
620
|
-
}
|
|
621
|
-
globalTimeoutConfig.unload = {
|
|
622
|
-
millis: time,
|
|
623
|
-
dieOnTimeout: dieOnTimeout,
|
|
624
|
-
warningMillis: warningMillis || defaultWarningMillis
|
|
625
|
-
};
|
|
626
|
-
}
|
|
627
|
-
function reasonableTime(appOrParcel, lifecycle) {
|
|
628
|
-
var timeoutConfig = appOrParcel.timeouts[lifecycle];
|
|
629
|
-
var warningPeriod = timeoutConfig.warningMillis;
|
|
630
|
-
var type = objectType(appOrParcel);
|
|
631
|
-
return new Promise(function (resolve, reject) {
|
|
632
|
-
var finished = false;
|
|
633
|
-
var errored = false;
|
|
634
|
-
appOrParcel[lifecycle](getProps(appOrParcel)).then(function (val) {
|
|
635
|
-
finished = true;
|
|
636
|
-
resolve(val);
|
|
637
|
-
})["catch"](function (val) {
|
|
638
|
-
finished = true;
|
|
639
|
-
reject(val);
|
|
640
|
-
});
|
|
641
|
-
setTimeout(function () {
|
|
642
|
-
return maybeTimingOut(1);
|
|
643
|
-
}, warningPeriod);
|
|
644
|
-
setTimeout(function () {
|
|
645
|
-
return maybeTimingOut(true);
|
|
646
|
-
}, timeoutConfig.millis);
|
|
647
|
-
var errMsg = formatErrorMessage(31, "Lifecycle function ".concat(lifecycle, " for ").concat(type, " ").concat(toName(appOrParcel), " lifecycle did not resolve or reject for ").concat(timeoutConfig.millis, " ms."), lifecycle, type, toName(appOrParcel), timeoutConfig.millis);
|
|
648
|
-
function maybeTimingOut(shouldError) {
|
|
649
|
-
if (!finished) {
|
|
650
|
-
if (shouldError === true) {
|
|
651
|
-
errored = true;
|
|
652
|
-
if (timeoutConfig.dieOnTimeout) {
|
|
653
|
-
reject(Error(errMsg));
|
|
654
|
-
} else {
|
|
655
|
-
console.error(errMsg); //don't resolve or reject, we're waiting this one out
|
|
656
|
-
}
|
|
657
|
-
} else if (!errored) {
|
|
658
|
-
var numWarnings = shouldError;
|
|
659
|
-
var numMillis = numWarnings * warningPeriod;
|
|
660
|
-
console.warn(errMsg);
|
|
661
|
-
if (numMillis + warningPeriod < timeoutConfig.millis) {
|
|
662
|
-
setTimeout(function () {
|
|
663
|
-
return maybeTimingOut(numWarnings + 1);
|
|
664
|
-
}, warningPeriod);
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
});
|
|
670
|
-
}
|
|
671
|
-
function ensureValidAppTimeouts(timeouts) {
|
|
672
|
-
var result = {};
|
|
673
|
-
for (var key in globalTimeoutConfig) {
|
|
674
|
-
result[key] = assign({}, globalTimeoutConfig[key], timeouts && timeouts[key] || {});
|
|
675
|
-
}
|
|
676
|
-
return result;
|
|
677
|
-
}
|
|
678
|
-
function toLoadPromise(app) {
|
|
679
|
-
return Promise.resolve().then(function () {
|
|
680
|
-
if (app.loadPromise) {
|
|
681
|
-
return app.loadPromise;
|
|
682
|
-
}
|
|
683
|
-
if (app.status !== NOT_LOADED && app.status !== LOAD_ERROR) {
|
|
684
|
-
return app;
|
|
685
|
-
}
|
|
686
|
-
app.status = LOADING_SOURCE_CODE;
|
|
687
|
-
var appOpts, isUserErr;
|
|
688
|
-
return app.loadPromise = Promise.resolve().then(function () {
|
|
689
|
-
var loadPromise = app.loadApp(getProps(app));
|
|
690
|
-
if (!smellsLikeAPromise(loadPromise)) {
|
|
691
|
-
// The name of the app will be prepended to this error message inside of the handleAppError function
|
|
692
|
-
isUserErr = true;
|
|
693
|
-
throw Error(formatErrorMessage(33, "single-spa loading function did not return a promise. Check the second argument to registerApplication('".concat(toName(app), "', loadingFunction, activityFunction)"), toName(app)));
|
|
694
|
-
}
|
|
695
|
-
return loadPromise.then(function (val) {
|
|
696
|
-
app.loadErrorTime = null;
|
|
697
|
-
appOpts = val;
|
|
698
|
-
var validationErrMessage, validationErrCode;
|
|
699
|
-
if (_typeof(appOpts) !== "object") {
|
|
700
|
-
validationErrCode = 34;
|
|
701
|
-
{
|
|
702
|
-
validationErrMessage = "does not export anything";
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
if (!validLifecycleFn(appOpts.bootstrap)) {
|
|
706
|
-
validationErrCode = 35;
|
|
707
|
-
{
|
|
708
|
-
validationErrMessage = "does not export a bootstrap function or array of functions";
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
if (!validLifecycleFn(appOpts.mount)) {
|
|
712
|
-
validationErrCode = 36;
|
|
713
|
-
{
|
|
714
|
-
validationErrMessage = "does not export a bootstrap function or array of functions";
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
if (!validLifecycleFn(appOpts.unmount)) {
|
|
718
|
-
validationErrCode = 37;
|
|
719
|
-
{
|
|
720
|
-
validationErrMessage = "does not export a bootstrap function or array of functions";
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
var type = objectType(appOpts);
|
|
724
|
-
if (validationErrCode) {
|
|
725
|
-
var appOptsStr;
|
|
726
|
-
try {
|
|
727
|
-
appOptsStr = JSON.stringify(appOpts);
|
|
728
|
-
} catch (_unused) {}
|
|
729
|
-
console.error(formatErrorMessage(validationErrCode, "The loading function for single-spa ".concat(type, " '").concat(toName(app), "' resolved with the following, which does not have bootstrap, mount, and unmount functions"), type, toName(app), appOptsStr), appOpts);
|
|
730
|
-
handleAppError(validationErrMessage, app, SKIP_BECAUSE_BROKEN);
|
|
731
|
-
return app;
|
|
732
|
-
}
|
|
733
|
-
if (appOpts.devtools && appOpts.devtools.overlays) {
|
|
734
|
-
app.devtools.overlays = assign({}, app.devtools.overlays, appOpts.devtools.overlays);
|
|
735
|
-
}
|
|
736
|
-
app.status = NOT_BOOTSTRAPPED;
|
|
737
|
-
app.bootstrap = flattenFnArray(appOpts, "bootstrap");
|
|
738
|
-
app.mount = flattenFnArray(appOpts, "mount");
|
|
739
|
-
app.unmount = flattenFnArray(appOpts, "unmount");
|
|
740
|
-
app.unload = flattenFnArray(appOpts, "unload");
|
|
741
|
-
app.timeouts = ensureValidAppTimeouts(appOpts.timeouts);
|
|
742
|
-
delete app.loadPromise;
|
|
743
|
-
return app;
|
|
744
|
-
});
|
|
745
|
-
})["catch"](function (err) {
|
|
746
|
-
delete app.loadPromise;
|
|
747
|
-
var newStatus;
|
|
748
|
-
if (isUserErr) {
|
|
749
|
-
newStatus = SKIP_BECAUSE_BROKEN;
|
|
750
|
-
} else {
|
|
751
|
-
newStatus = LOAD_ERROR;
|
|
752
|
-
app.loadErrorTime = new Date().getTime();
|
|
753
|
-
}
|
|
754
|
-
handleAppError(err, app, newStatus);
|
|
755
|
-
return app;
|
|
756
|
-
});
|
|
757
|
-
});
|
|
758
|
-
}
|
|
759
|
-
var isInBrowser = typeof window !== "undefined";
|
|
760
|
-
|
|
761
|
-
/* We capture navigation event listeners so that we can make sure
|
|
762
|
-
* that application navigation listeners are not called until
|
|
763
|
-
* single-spa has ensured that the correct applications are
|
|
764
|
-
* unmounted and mounted.
|
|
765
|
-
*/
|
|
766
|
-
|
|
767
|
-
var capturedEventListeners = {
|
|
768
|
-
hashchange: [],
|
|
769
|
-
popstate: []
|
|
770
|
-
};
|
|
771
|
-
var routingEventsListeningTo = ["hashchange", "popstate"];
|
|
772
|
-
function navigateToUrl(obj) {
|
|
773
|
-
var url;
|
|
774
|
-
if (typeof obj === "string") {
|
|
775
|
-
url = obj;
|
|
776
|
-
} else if (this && this.href) {
|
|
777
|
-
url = this.href;
|
|
778
|
-
} else if (obj && obj.currentTarget && obj.currentTarget.href && obj.preventDefault) {
|
|
779
|
-
url = obj.currentTarget.href;
|
|
780
|
-
obj.preventDefault();
|
|
781
|
-
} else {
|
|
782
|
-
throw Error(formatErrorMessage(14, "singleSpaNavigate/navigateToUrl must be either called with a string url, with an <a> tag as its context, or with an event whose currentTarget is an <a> tag"));
|
|
783
|
-
}
|
|
784
|
-
var current = parseUri(window.location.href);
|
|
785
|
-
var destination = parseUri(url);
|
|
786
|
-
if (url.indexOf("#") === 0) {
|
|
787
|
-
window.location.hash = destination.hash;
|
|
788
|
-
} else if (current.host !== destination.host && destination.host) {
|
|
789
|
-
{
|
|
790
|
-
window.location.href = url;
|
|
791
|
-
}
|
|
792
|
-
} else if (destination.pathname === current.pathname && destination.search === current.search) {
|
|
793
|
-
window.location.hash = destination.hash;
|
|
794
|
-
} else {
|
|
795
|
-
// different path, host, or query params
|
|
796
|
-
window.history.pushState(null, null, url);
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
function callCapturedEventListeners(eventArguments) {
|
|
800
|
-
var _this = this;
|
|
801
|
-
if (eventArguments) {
|
|
802
|
-
var eventType = eventArguments[0].type;
|
|
803
|
-
if (routingEventsListeningTo.indexOf(eventType) >= 0) {
|
|
804
|
-
capturedEventListeners[eventType].forEach(function (listener) {
|
|
805
|
-
try {
|
|
806
|
-
// The error thrown by application event listener should not break single-spa down.
|
|
807
|
-
// Just like https://github.com/single-spa/single-spa/blob/85f5042dff960e40936f3a5069d56fc9477fac04/src/navigation/reroute.js#L140-L146 did
|
|
808
|
-
listener.apply(_this, eventArguments);
|
|
809
|
-
} catch (e) {
|
|
810
|
-
setTimeout(function () {
|
|
811
|
-
throw e;
|
|
812
|
-
});
|
|
813
|
-
}
|
|
814
|
-
});
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
var urlRerouteOnly;
|
|
819
|
-
function setUrlRerouteOnly(val) {
|
|
820
|
-
urlRerouteOnly = val;
|
|
821
|
-
}
|
|
822
|
-
function urlReroute() {
|
|
823
|
-
reroute([], arguments);
|
|
824
|
-
}
|
|
825
|
-
function patchedUpdateState(updateState, methodName) {
|
|
826
|
-
return function () {
|
|
827
|
-
var urlBefore = window.location.href;
|
|
828
|
-
var result = updateState.apply(this, arguments);
|
|
829
|
-
var urlAfter = window.location.href;
|
|
830
|
-
if (!urlRerouteOnly || urlBefore !== urlAfter) {
|
|
831
|
-
urlReroute(createPopStateEvent(window.history.state, methodName));
|
|
832
|
-
}
|
|
833
|
-
return result;
|
|
834
|
-
};
|
|
835
|
-
}
|
|
836
|
-
function createPopStateEvent(state, originalMethodName) {
|
|
837
|
-
// https://github.com/single-spa/single-spa/issues/224 and https://github.com/single-spa/single-spa-angular/issues/49
|
|
838
|
-
// We need a popstate event even though the browser doesn't do one by default when you call replaceState, so that
|
|
839
|
-
// all the applications can reroute. We explicitly identify this extraneous event by setting singleSpa=true and
|
|
840
|
-
// singleSpaTrigger=<pushState|replaceState> on the event instance.
|
|
841
|
-
var evt;
|
|
842
|
-
try {
|
|
843
|
-
evt = new PopStateEvent("popstate", {
|
|
844
|
-
state: state
|
|
845
|
-
});
|
|
846
|
-
} catch (err) {
|
|
847
|
-
// IE 11 compatibility https://github.com/single-spa/single-spa/issues/299
|
|
848
|
-
// https://docs.microsoft.com/en-us/openspecs/ie_standards/ms-html5e/bd560f47-b349-4d2c-baa8-f1560fb489dd
|
|
849
|
-
evt = document.createEvent("PopStateEvent");
|
|
850
|
-
evt.initPopStateEvent("popstate", false, false, state);
|
|
851
|
-
}
|
|
852
|
-
evt.singleSpa = true;
|
|
853
|
-
evt.singleSpaTrigger = originalMethodName;
|
|
854
|
-
return evt;
|
|
855
|
-
}
|
|
856
|
-
if (isInBrowser) {
|
|
857
|
-
// We will trigger an app change for any routing events.
|
|
858
|
-
window.addEventListener("hashchange", urlReroute);
|
|
859
|
-
window.addEventListener("popstate", urlReroute); // Monkeypatch addEventListener so that we can ensure correct timing
|
|
860
|
-
|
|
861
|
-
var originalAddEventListener = window.addEventListener;
|
|
862
|
-
var originalRemoveEventListener = window.removeEventListener;
|
|
863
|
-
window.addEventListener = function (eventName, fn) {
|
|
864
|
-
if (typeof fn === "function") {
|
|
865
|
-
if (routingEventsListeningTo.indexOf(eventName) >= 0 && !find(capturedEventListeners[eventName], function (listener) {
|
|
866
|
-
return listener === fn;
|
|
867
|
-
})) {
|
|
868
|
-
capturedEventListeners[eventName].push(fn);
|
|
869
|
-
return;
|
|
870
|
-
}
|
|
871
|
-
}
|
|
872
|
-
return originalAddEventListener.apply(this, arguments);
|
|
873
|
-
};
|
|
874
|
-
window.removeEventListener = function (eventName, listenerFn) {
|
|
875
|
-
if (typeof listenerFn === "function") {
|
|
876
|
-
if (routingEventsListeningTo.indexOf(eventName) >= 0) {
|
|
877
|
-
capturedEventListeners[eventName] = capturedEventListeners[eventName].filter(function (fn) {
|
|
878
|
-
return fn !== listenerFn;
|
|
879
|
-
});
|
|
880
|
-
return;
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
return originalRemoveEventListener.apply(this, arguments);
|
|
884
|
-
};
|
|
885
|
-
window.history.pushState = patchedUpdateState(window.history.pushState, "pushState");
|
|
886
|
-
window.history.replaceState = patchedUpdateState(window.history.replaceState, "replaceState");
|
|
887
|
-
/* For convenience in `onclick` attributes, we expose a global function for navigating to
|
|
888
|
-
* whatever an <a> tag's href is.
|
|
889
|
-
*/
|
|
890
|
-
|
|
891
|
-
window.singleSpaNavigate = navigateToUrl;
|
|
892
|
-
}
|
|
893
|
-
function parseUri(str) {
|
|
894
|
-
var anchor = document.createElement("a");
|
|
895
|
-
anchor.href = str;
|
|
896
|
-
return anchor;
|
|
897
|
-
}
|
|
898
|
-
var hasInitialized = false;
|
|
899
|
-
function ensureJQuerySupport() {
|
|
900
|
-
var jQuery = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.jQuery;
|
|
901
|
-
if (!jQuery) {
|
|
902
|
-
if (window.$ && window.$.fn && window.$.fn.jquery) {
|
|
903
|
-
jQuery = window.$;
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
if (jQuery && !hasInitialized) {
|
|
907
|
-
var originalJQueryOn = jQuery.fn.on;
|
|
908
|
-
var originalJQueryOff = jQuery.fn.off;
|
|
909
|
-
jQuery.fn.on = function (eventString, fn) {
|
|
910
|
-
return captureRoutingEvents.call(this, originalJQueryOn, window.addEventListener, eventString, fn, arguments);
|
|
911
|
-
};
|
|
912
|
-
jQuery.fn.off = function (eventString, fn) {
|
|
913
|
-
return captureRoutingEvents.call(this, originalJQueryOff, window.removeEventListener, eventString, fn, arguments);
|
|
914
|
-
};
|
|
915
|
-
hasInitialized = true;
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
function captureRoutingEvents(originalJQueryFunction, nativeFunctionToCall, eventString, fn, originalArgs) {
|
|
919
|
-
if (typeof eventString !== "string") {
|
|
920
|
-
return originalJQueryFunction.apply(this, originalArgs);
|
|
921
|
-
}
|
|
922
|
-
var eventNames = eventString.split(/\s+/);
|
|
923
|
-
eventNames.forEach(function (eventName) {
|
|
924
|
-
if (routingEventsListeningTo.indexOf(eventName) >= 0) {
|
|
925
|
-
nativeFunctionToCall(eventName, fn);
|
|
926
|
-
eventString = eventString.replace(eventName, "");
|
|
927
|
-
}
|
|
928
|
-
});
|
|
929
|
-
if (eventString.trim() === "") {
|
|
930
|
-
return this;
|
|
931
|
-
} else {
|
|
932
|
-
return originalJQueryFunction.apply(this, originalArgs);
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
var appsToUnload = {};
|
|
936
|
-
function toUnloadPromise(app) {
|
|
937
|
-
return Promise.resolve().then(function () {
|
|
938
|
-
var unloadInfo = appsToUnload[toName(app)];
|
|
939
|
-
if (!unloadInfo) {
|
|
940
|
-
/* No one has called unloadApplication for this app,
|
|
941
|
-
*/
|
|
942
|
-
return app;
|
|
943
|
-
}
|
|
944
|
-
if (app.status === NOT_LOADED) {
|
|
945
|
-
/* This app is already unloaded. We just need to clean up
|
|
946
|
-
* anything that still thinks we need to unload the app.
|
|
947
|
-
*/
|
|
948
|
-
finishUnloadingApp(app, unloadInfo);
|
|
949
|
-
return app;
|
|
950
|
-
}
|
|
951
|
-
if (app.status === UNLOADING) {
|
|
952
|
-
/* Both unloadApplication and reroute want to unload this app.
|
|
953
|
-
* It only needs to be done once, though.
|
|
954
|
-
*/
|
|
955
|
-
return unloadInfo.promise.then(function () {
|
|
956
|
-
return app;
|
|
957
|
-
});
|
|
958
|
-
}
|
|
959
|
-
if (app.status !== NOT_MOUNTED) {
|
|
960
|
-
/* The app cannot be unloaded until it is unmounted.
|
|
961
|
-
*/
|
|
962
|
-
return app;
|
|
963
|
-
}
|
|
964
|
-
app.status = UNLOADING;
|
|
965
|
-
return reasonableTime(app, "unload").then(function () {
|
|
966
|
-
finishUnloadingApp(app, unloadInfo);
|
|
967
|
-
return app;
|
|
968
|
-
})["catch"](function (err) {
|
|
969
|
-
errorUnloadingApp(app, unloadInfo, err);
|
|
970
|
-
return app;
|
|
971
|
-
});
|
|
972
|
-
});
|
|
973
|
-
}
|
|
974
|
-
function finishUnloadingApp(app, unloadInfo) {
|
|
975
|
-
delete appsToUnload[toName(app)]; // Unloaded apps don't have lifecycles
|
|
976
|
-
|
|
977
|
-
delete app.bootstrap;
|
|
978
|
-
delete app.mount;
|
|
979
|
-
delete app.unmount;
|
|
980
|
-
delete app.unload;
|
|
981
|
-
app.status = NOT_LOADED;
|
|
982
|
-
/* resolve the promise of whoever called unloadApplication.
|
|
983
|
-
* This should be done after all other cleanup/bookkeeping
|
|
984
|
-
*/
|
|
985
|
-
|
|
986
|
-
unloadInfo.resolve();
|
|
987
|
-
}
|
|
988
|
-
function errorUnloadingApp(app, unloadInfo, err) {
|
|
989
|
-
delete appsToUnload[toName(app)]; // Unloaded apps don't have lifecycles
|
|
990
|
-
|
|
991
|
-
delete app.bootstrap;
|
|
992
|
-
delete app.mount;
|
|
993
|
-
delete app.unmount;
|
|
994
|
-
delete app.unload;
|
|
995
|
-
handleAppError(err, app, SKIP_BECAUSE_BROKEN);
|
|
996
|
-
unloadInfo.reject(err);
|
|
997
|
-
}
|
|
998
|
-
function addAppToUnload(app, promiseGetter, resolve, reject) {
|
|
999
|
-
appsToUnload[toName(app)] = {
|
|
1000
|
-
app: app,
|
|
1001
|
-
resolve: resolve,
|
|
1002
|
-
reject: reject
|
|
1003
|
-
};
|
|
1004
|
-
Object.defineProperty(appsToUnload[toName(app)], "promise", {
|
|
1005
|
-
get: promiseGetter
|
|
1006
|
-
});
|
|
1007
|
-
}
|
|
1008
|
-
function getAppUnloadInfo(appName) {
|
|
1009
|
-
return appsToUnload[appName];
|
|
1010
|
-
}
|
|
1011
|
-
var apps = [];
|
|
1012
|
-
function getAppChanges() {
|
|
1013
|
-
var appsToUnload = [],
|
|
1014
|
-
appsToUnmount = [],
|
|
1015
|
-
appsToLoad = [],
|
|
1016
|
-
appsToMount = []; // We re-attempt to download applications in LOAD_ERROR after a timeout of 200 milliseconds
|
|
1017
|
-
|
|
1018
|
-
var currentTime = new Date().getTime();
|
|
1019
|
-
apps.forEach(function (app) {
|
|
1020
|
-
var appShouldBeActive = app.status !== SKIP_BECAUSE_BROKEN && shouldBeActive(app);
|
|
1021
|
-
switch (app.status) {
|
|
1022
|
-
case LOAD_ERROR:
|
|
1023
|
-
if (currentTime - app.loadErrorTime >= 200) {
|
|
1024
|
-
appsToLoad.push(app);
|
|
1025
|
-
}
|
|
1026
|
-
break;
|
|
1027
|
-
case NOT_LOADED:
|
|
1028
|
-
if (appShouldBeActive) {
|
|
1029
|
-
appsToLoad.push(app);
|
|
1030
|
-
}
|
|
1031
|
-
break;
|
|
1032
|
-
case NOT_BOOTSTRAPPED:
|
|
1033
|
-
case NOT_MOUNTED:
|
|
1034
|
-
if (!appShouldBeActive && getAppUnloadInfo(toName(app))) {
|
|
1035
|
-
appsToUnload.push(app);
|
|
1036
|
-
} else if (appShouldBeActive) {
|
|
1037
|
-
appsToMount.push(app);
|
|
1038
|
-
}
|
|
1039
|
-
break;
|
|
1040
|
-
case MOUNTED:
|
|
1041
|
-
if (!appShouldBeActive) {
|
|
1042
|
-
appsToUnmount.push(app);
|
|
1043
|
-
}
|
|
1044
|
-
break;
|
|
1045
|
-
// all other statuses are ignored
|
|
1046
|
-
}
|
|
1047
|
-
});
|
|
1048
|
-
return {
|
|
1049
|
-
appsToUnload: appsToUnload,
|
|
1050
|
-
appsToUnmount: appsToUnmount,
|
|
1051
|
-
appsToLoad: appsToLoad,
|
|
1052
|
-
appsToMount: appsToMount
|
|
1053
|
-
};
|
|
1054
|
-
}
|
|
1055
|
-
function getMountedApps() {
|
|
1056
|
-
return apps.filter(isActive).map(toName);
|
|
1057
|
-
}
|
|
1058
|
-
function getAppNames() {
|
|
1059
|
-
return apps.map(toName);
|
|
1060
|
-
} // used in devtools, not (currently) exposed as a single-spa API
|
|
1061
|
-
|
|
1062
|
-
function getRawAppData() {
|
|
1063
|
-
return [].concat(apps);
|
|
1064
|
-
}
|
|
1065
|
-
function getAppStatus(appName) {
|
|
1066
|
-
var app = find(apps, function (app) {
|
|
1067
|
-
return toName(app) === appName;
|
|
1068
|
-
});
|
|
1069
|
-
return app ? app.status : null;
|
|
1070
|
-
}
|
|
1071
|
-
function registerApplication(appNameOrConfig, appOrLoadApp, activeWhen, customProps) {
|
|
1072
|
-
var registration = sanitizeArguments(appNameOrConfig, appOrLoadApp, activeWhen, customProps);
|
|
1073
|
-
if (getAppNames().indexOf(registration.name) !== -1) throw Error(formatErrorMessage(21, "There is already an app registered with name ".concat(registration.name), registration.name));
|
|
1074
|
-
apps.push(assign({
|
|
1075
|
-
loadErrorTime: null,
|
|
1076
|
-
status: NOT_LOADED,
|
|
1077
|
-
parcels: {},
|
|
1078
|
-
devtools: {
|
|
1079
|
-
overlays: {
|
|
1080
|
-
options: {},
|
|
1081
|
-
selectors: []
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
}, registration));
|
|
1085
|
-
if (isInBrowser) {
|
|
1086
|
-
ensureJQuerySupport();
|
|
1087
|
-
reroute();
|
|
1088
|
-
}
|
|
1089
|
-
}
|
|
1090
|
-
function checkActivityFunctions() {
|
|
1091
|
-
var location = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.location;
|
|
1092
|
-
return apps.filter(function (app) {
|
|
1093
|
-
return app.activeWhen(location);
|
|
1094
|
-
}).map(toName);
|
|
1095
|
-
}
|
|
1096
|
-
function unregisterApplication(appName, opts) {
|
|
1097
|
-
if (apps.filter(function (app) {
|
|
1098
|
-
return toName(app) === appName;
|
|
1099
|
-
}).length === 0) {
|
|
1100
|
-
throw Error(formatErrorMessage(25, "Cannot unregister application '".concat(appName, "' because no such application has been registered"), appName));
|
|
1101
|
-
}
|
|
1102
|
-
return unloadApplication(appName, opts).then(function () {
|
|
1103
|
-
var appIndex = apps.map(toName).indexOf(appName);
|
|
1104
|
-
apps.splice(appIndex, 1);
|
|
1105
|
-
});
|
|
1106
|
-
}
|
|
1107
|
-
function unloadApplication(appName) {
|
|
1108
|
-
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
1109
|
-
waitForUnmount: false
|
|
1110
|
-
};
|
|
1111
|
-
if (typeof appName !== "string") {
|
|
1112
|
-
throw Error(formatErrorMessage(26, "unloadApplication requires a string 'appName'"));
|
|
1113
|
-
}
|
|
1114
|
-
var app = find(apps, function (App) {
|
|
1115
|
-
return toName(App) === appName;
|
|
1116
|
-
});
|
|
1117
|
-
if (!app) {
|
|
1118
|
-
throw Error(formatErrorMessage(27, "Could not unload application '".concat(appName, "' because no such application has been registered"), appName));
|
|
1119
|
-
}
|
|
1120
|
-
var appUnloadInfo = getAppUnloadInfo(toName(app));
|
|
1121
|
-
if (opts && opts.waitForUnmount) {
|
|
1122
|
-
// We need to wait for unmount before unloading the app
|
|
1123
|
-
if (appUnloadInfo) {
|
|
1124
|
-
// Someone else is already waiting for this, too
|
|
1125
|
-
return appUnloadInfo.promise;
|
|
1126
|
-
} else {
|
|
1127
|
-
// We're the first ones wanting the app to be resolved.
|
|
1128
|
-
var promise = new Promise(function (resolve, reject) {
|
|
1129
|
-
addAppToUnload(app, function () {
|
|
1130
|
-
return promise;
|
|
1131
|
-
}, resolve, reject);
|
|
1132
|
-
});
|
|
1133
|
-
return promise;
|
|
1134
|
-
}
|
|
1135
|
-
} else {
|
|
1136
|
-
/* We should unmount the app, unload it, and remount it immediately.
|
|
1137
|
-
*/
|
|
1138
|
-
var resultPromise;
|
|
1139
|
-
if (appUnloadInfo) {
|
|
1140
|
-
// Someone else is already waiting for this app to unload
|
|
1141
|
-
resultPromise = appUnloadInfo.promise;
|
|
1142
|
-
immediatelyUnloadApp(app, appUnloadInfo.resolve, appUnloadInfo.reject);
|
|
1143
|
-
} else {
|
|
1144
|
-
// We're the first ones wanting the app to be resolved.
|
|
1145
|
-
resultPromise = new Promise(function (resolve, reject) {
|
|
1146
|
-
addAppToUnload(app, function () {
|
|
1147
|
-
return resultPromise;
|
|
1148
|
-
}, resolve, reject);
|
|
1149
|
-
immediatelyUnloadApp(app, resolve, reject);
|
|
1150
|
-
});
|
|
1151
|
-
}
|
|
1152
|
-
return resultPromise;
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
function immediatelyUnloadApp(app, resolve, reject) {
|
|
1156
|
-
toUnmountPromise(app).then(toUnloadPromise).then(function () {
|
|
1157
|
-
resolve();
|
|
1158
|
-
setTimeout(function () {
|
|
1159
|
-
// reroute, but the unload promise is done
|
|
1160
|
-
reroute();
|
|
1161
|
-
});
|
|
1162
|
-
})["catch"](reject);
|
|
1163
|
-
}
|
|
1164
|
-
function validateRegisterWithArguments(name, appOrLoadApp, activeWhen, customProps) {
|
|
1165
|
-
if (typeof name !== "string" || name.length === 0) throw Error(formatErrorMessage(20, "The 1st argument to registerApplication must be a non-empty string 'appName'"));
|
|
1166
|
-
if (!appOrLoadApp) throw Error(formatErrorMessage(23, "The 2nd argument to registerApplication must be an application or loading application function"));
|
|
1167
|
-
if (typeof activeWhen !== "function") throw Error(formatErrorMessage(24, "The 3rd argument to registerApplication must be an activeWhen function"));
|
|
1168
|
-
if (!validCustomProps(customProps)) throw Error(formatErrorMessage(22, "The optional 4th argument is a customProps and must be an object"));
|
|
1169
|
-
}
|
|
1170
|
-
function validateRegisterWithConfig(config) {
|
|
1171
|
-
if (Array.isArray(config) || config === null) throw Error(formatErrorMessage(39, "Configuration object can't be an Array or null!"));
|
|
1172
|
-
var validKeys = ["name", "app", "activeWhen", "customProps"];
|
|
1173
|
-
var invalidKeys = Object.keys(config).reduce(function (invalidKeys, prop) {
|
|
1174
|
-
return validKeys.indexOf(prop) >= 0 ? invalidKeys : invalidKeys.concat(prop);
|
|
1175
|
-
}, []);
|
|
1176
|
-
if (invalidKeys.length !== 0) throw Error(formatErrorMessage(38, "The configuration object accepts only: ".concat(validKeys.join(", "), ". Invalid keys: ").concat(invalidKeys.join(", "), "."), validKeys.join(", "), invalidKeys.join(", ")));
|
|
1177
|
-
if (typeof config.name !== "string" || config.name.length === 0) throw Error(formatErrorMessage(20, "The config.name on registerApplication must be a non-empty string"));
|
|
1178
|
-
if (_typeof(config.app) !== "object" && typeof config.app !== "function") throw Error(formatErrorMessage(20, "The config.app on registerApplication must be an application or a loading function"));
|
|
1179
|
-
var allowsStringAndFunction = function allowsStringAndFunction(activeWhen) {
|
|
1180
|
-
return typeof activeWhen === "string" || typeof activeWhen === "function";
|
|
1181
|
-
};
|
|
1182
|
-
if (!allowsStringAndFunction(config.activeWhen) && !(Array.isArray(config.activeWhen) && config.activeWhen.every(allowsStringAndFunction))) throw Error(formatErrorMessage(24, "The config.activeWhen on registerApplication must be a string, function or an array with both"));
|
|
1183
|
-
if (!validCustomProps(config.customProps)) throw Error(formatErrorMessage(22, "The optional config.customProps must be an object"));
|
|
1184
|
-
}
|
|
1185
|
-
function validCustomProps(customProps) {
|
|
1186
|
-
return !customProps || typeof customProps === "function" || _typeof(customProps) === "object" && customProps !== null && !Array.isArray(customProps);
|
|
1187
|
-
}
|
|
1188
|
-
function sanitizeArguments(appNameOrConfig, appOrLoadApp, activeWhen, customProps) {
|
|
1189
|
-
var usingObjectAPI = _typeof(appNameOrConfig) === "object";
|
|
1190
|
-
var registration = {
|
|
1191
|
-
name: null,
|
|
1192
|
-
loadApp: null,
|
|
1193
|
-
activeWhen: null,
|
|
1194
|
-
customProps: null
|
|
1195
|
-
};
|
|
1196
|
-
if (usingObjectAPI) {
|
|
1197
|
-
validateRegisterWithConfig(appNameOrConfig);
|
|
1198
|
-
registration.name = appNameOrConfig.name;
|
|
1199
|
-
registration.loadApp = appNameOrConfig.app;
|
|
1200
|
-
registration.activeWhen = appNameOrConfig.activeWhen;
|
|
1201
|
-
registration.customProps = appNameOrConfig.customProps;
|
|
1202
|
-
} else {
|
|
1203
|
-
validateRegisterWithArguments(appNameOrConfig, appOrLoadApp, activeWhen, customProps);
|
|
1204
|
-
registration.name = appNameOrConfig;
|
|
1205
|
-
registration.loadApp = appOrLoadApp;
|
|
1206
|
-
registration.activeWhen = activeWhen;
|
|
1207
|
-
registration.customProps = customProps;
|
|
1208
|
-
}
|
|
1209
|
-
registration.loadApp = sanitizeLoadApp(registration.loadApp);
|
|
1210
|
-
registration.customProps = sanitizeCustomProps(registration.customProps);
|
|
1211
|
-
registration.activeWhen = sanitizeActiveWhen(registration.activeWhen);
|
|
1212
|
-
return registration;
|
|
1213
|
-
}
|
|
1214
|
-
function sanitizeLoadApp(loadApp) {
|
|
1215
|
-
if (typeof loadApp !== "function") {
|
|
1216
|
-
return function () {
|
|
1217
|
-
return Promise.resolve(loadApp);
|
|
1218
|
-
};
|
|
1219
|
-
}
|
|
1220
|
-
return loadApp;
|
|
1221
|
-
}
|
|
1222
|
-
function sanitizeCustomProps(customProps) {
|
|
1223
|
-
return customProps ? customProps : {};
|
|
1224
|
-
}
|
|
1225
|
-
function sanitizeActiveWhen(activeWhen) {
|
|
1226
|
-
var activeWhenArray = Array.isArray(activeWhen) ? activeWhen : [activeWhen];
|
|
1227
|
-
activeWhenArray = activeWhenArray.map(function (activeWhenOrPath) {
|
|
1228
|
-
return typeof activeWhenOrPath === "function" ? activeWhenOrPath : pathToActiveWhen(activeWhenOrPath);
|
|
1229
|
-
});
|
|
1230
|
-
return function (location) {
|
|
1231
|
-
return activeWhenArray.some(function (activeWhen) {
|
|
1232
|
-
return activeWhen(location);
|
|
1233
|
-
});
|
|
1234
|
-
};
|
|
1235
|
-
}
|
|
1236
|
-
function pathToActiveWhen(path) {
|
|
1237
|
-
var regex = toDynamicPathValidatorRegex(path);
|
|
1238
|
-
return function (location) {
|
|
1239
|
-
var route = location.href.replace(location.origin, "");
|
|
1240
|
-
return regex.test(route);
|
|
1241
|
-
};
|
|
1242
|
-
}
|
|
1243
|
-
function toDynamicPathValidatorRegex(path) {
|
|
1244
|
-
var lastIndex = 0,
|
|
1245
|
-
inDynamic = false,
|
|
1246
|
-
regexStr = "^";
|
|
1247
|
-
for (var charIndex = 0; charIndex < path.length; charIndex++) {
|
|
1248
|
-
var _char = path[charIndex];
|
|
1249
|
-
var startOfDynamic = !inDynamic && _char === ":";
|
|
1250
|
-
var endOfDynamic = inDynamic && _char === "/";
|
|
1251
|
-
if (startOfDynamic || endOfDynamic) {
|
|
1252
|
-
appendToRegex(charIndex);
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
|
-
appendToRegex(path.length);
|
|
1256
|
-
return new RegExp(regexStr, "i");
|
|
1257
|
-
function appendToRegex(index) {
|
|
1258
|
-
var anyCharMaybeTrailingSlashRegex = "[^/]+/?";
|
|
1259
|
-
var commonStringSubPath = escapeStrRegex(path.slice(lastIndex, index));
|
|
1260
|
-
regexStr += inDynamic ? anyCharMaybeTrailingSlashRegex : commonStringSubPath;
|
|
1261
|
-
if (index === path.length && !inDynamic) {
|
|
1262
|
-
regexStr =
|
|
1263
|
-
// use charAt instead as we could not use es6 method endsWith
|
|
1264
|
-
regexStr.charAt(regexStr.length - 1) === "/" ? "".concat(regexStr, ".*$") : "".concat(regexStr, "(/.*)?$");
|
|
1265
|
-
}
|
|
1266
|
-
inDynamic = !inDynamic;
|
|
1267
|
-
lastIndex = index;
|
|
1268
|
-
}
|
|
1269
|
-
function escapeStrRegex(str) {
|
|
1270
|
-
// borrowed from https://github.com/sindresorhus/escape-string-regexp/blob/master/index.js
|
|
1271
|
-
return str.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
|
|
1272
|
-
}
|
|
1273
|
-
}
|
|
1274
|
-
var appChangeUnderway = false,
|
|
1275
|
-
peopleWaitingOnAppChange = [];
|
|
1276
|
-
function triggerAppChange() {
|
|
1277
|
-
// Call reroute with no arguments, intentionally
|
|
1278
|
-
return reroute();
|
|
1279
|
-
}
|
|
1280
|
-
function reroute() {
|
|
1281
|
-
var pendingPromises = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
1282
|
-
var eventArguments = arguments.length > 1 ? arguments[1] : undefined;
|
|
1283
|
-
if (appChangeUnderway) {
|
|
1284
|
-
return new Promise(function (resolve, reject) {
|
|
1285
|
-
peopleWaitingOnAppChange.push({
|
|
1286
|
-
resolve: resolve,
|
|
1287
|
-
reject: reject,
|
|
1288
|
-
eventArguments: eventArguments
|
|
1289
|
-
});
|
|
1290
|
-
});
|
|
1291
|
-
}
|
|
1292
|
-
var _getAppChanges = getAppChanges(),
|
|
1293
|
-
appsToUnload = _getAppChanges.appsToUnload,
|
|
1294
|
-
appsToUnmount = _getAppChanges.appsToUnmount,
|
|
1295
|
-
appsToLoad = _getAppChanges.appsToLoad,
|
|
1296
|
-
appsToMount = _getAppChanges.appsToMount;
|
|
1297
|
-
var appsThatChanged;
|
|
1298
|
-
if (isStarted()) {
|
|
1299
|
-
appChangeUnderway = true;
|
|
1300
|
-
appsThatChanged = appsToUnload.concat(appsToLoad, appsToUnmount, appsToMount);
|
|
1301
|
-
return performAppChanges();
|
|
1302
|
-
} else {
|
|
1303
|
-
appsThatChanged = appsToLoad;
|
|
1304
|
-
return loadApps();
|
|
1305
|
-
}
|
|
1306
|
-
function loadApps() {
|
|
1307
|
-
return Promise.resolve().then(function () {
|
|
1308
|
-
var loadPromises = appsToLoad.map(toLoadPromise);
|
|
1309
|
-
return Promise.all(loadPromises).then(callAllEventListeners) // there are no mounted apps, before start() is called, so we always return []
|
|
1310
|
-
.then(function () {
|
|
1311
|
-
return [];
|
|
1312
|
-
})["catch"](function (err) {
|
|
1313
|
-
callAllEventListeners();
|
|
1314
|
-
throw err;
|
|
1315
|
-
});
|
|
1316
|
-
});
|
|
1317
|
-
}
|
|
1318
|
-
function performAppChanges() {
|
|
1319
|
-
return Promise.resolve().then(function () {
|
|
1320
|
-
// https://github.com/single-spa/single-spa/issues/545
|
|
1321
|
-
window.dispatchEvent(new customEvent(appsThatChanged.length === 0 ? "single-spa:before-no-app-change" : "single-spa:before-app-change", getCustomEventDetail(true)));
|
|
1322
|
-
window.dispatchEvent(new customEvent("single-spa:before-routing-event", getCustomEventDetail(true)));
|
|
1323
|
-
var unloadPromises = appsToUnload.map(toUnloadPromise);
|
|
1324
|
-
var unmountUnloadPromises = appsToUnmount.map(toUnmountPromise).map(function (unmountPromise) {
|
|
1325
|
-
return unmountPromise.then(toUnloadPromise);
|
|
1326
|
-
});
|
|
1327
|
-
var allUnmountPromises = unmountUnloadPromises.concat(unloadPromises);
|
|
1328
|
-
var unmountAllPromise = Promise.all(allUnmountPromises);
|
|
1329
|
-
unmountAllPromise.then(function () {
|
|
1330
|
-
window.dispatchEvent(new customEvent("single-spa:before-mount-routing-event", getCustomEventDetail(true)));
|
|
1331
|
-
});
|
|
1332
|
-
/* We load and bootstrap apps while other apps are unmounting, but we
|
|
1333
|
-
* wait to mount the app until all apps are finishing unmounting
|
|
1334
|
-
*/
|
|
1335
|
-
|
|
1336
|
-
var loadThenMountPromises = appsToLoad.map(function (app) {
|
|
1337
|
-
return toLoadPromise(app).then(function (app) {
|
|
1338
|
-
return tryToBootstrapAndMount(app, unmountAllPromise);
|
|
1339
|
-
});
|
|
1340
|
-
});
|
|
1341
|
-
/* These are the apps that are already bootstrapped and just need
|
|
1342
|
-
* to be mounted. They each wait for all unmounting apps to finish up
|
|
1343
|
-
* before they mount.
|
|
1344
|
-
*/
|
|
1345
|
-
|
|
1346
|
-
var mountPromises = appsToMount.filter(function (appToMount) {
|
|
1347
|
-
return appsToLoad.indexOf(appToMount) < 0;
|
|
1348
|
-
}).map(function (appToMount) {
|
|
1349
|
-
return tryToBootstrapAndMount(appToMount, unmountAllPromise);
|
|
1350
|
-
});
|
|
1351
|
-
return unmountAllPromise["catch"](function (err) {
|
|
1352
|
-
callAllEventListeners();
|
|
1353
|
-
throw err;
|
|
1354
|
-
}).then(function () {
|
|
1355
|
-
/* Now that the apps that needed to be unmounted are unmounted, their DOM navigation
|
|
1356
|
-
* events (like hashchange or popstate) should have been cleaned up. So it's safe
|
|
1357
|
-
* to let the remaining captured event listeners to handle about the DOM event.
|
|
1358
|
-
*/
|
|
1359
|
-
callAllEventListeners();
|
|
1360
|
-
return Promise.all(loadThenMountPromises.concat(mountPromises))["catch"](function (err) {
|
|
1361
|
-
pendingPromises.forEach(function (promise) {
|
|
1362
|
-
return promise.reject(err);
|
|
1363
|
-
});
|
|
1364
|
-
throw err;
|
|
1365
|
-
}).then(finishUpAndReturn);
|
|
1366
|
-
});
|
|
1367
|
-
});
|
|
1368
|
-
}
|
|
1369
|
-
function finishUpAndReturn() {
|
|
1370
|
-
var returnValue = getMountedApps();
|
|
1371
|
-
pendingPromises.forEach(function (promise) {
|
|
1372
|
-
return promise.resolve(returnValue);
|
|
1373
|
-
});
|
|
1374
|
-
try {
|
|
1375
|
-
var appChangeEventName = appsThatChanged.length === 0 ? "single-spa:no-app-change" : "single-spa:app-change";
|
|
1376
|
-
window.dispatchEvent(new customEvent(appChangeEventName, getCustomEventDetail()));
|
|
1377
|
-
window.dispatchEvent(new customEvent("single-spa:routing-event", getCustomEventDetail()));
|
|
1378
|
-
} catch (err) {
|
|
1379
|
-
/* We use a setTimeout because if someone else's event handler throws an error, single-spa
|
|
1380
|
-
* needs to carry on. If a listener to the event throws an error, it's their own fault, not
|
|
1381
|
-
* single-spa's.
|
|
1382
|
-
*/
|
|
1383
|
-
setTimeout(function () {
|
|
1384
|
-
throw err;
|
|
1385
|
-
});
|
|
1386
|
-
}
|
|
1387
|
-
/* Setting this allows for subsequent calls to reroute() to actually perform
|
|
1388
|
-
* a reroute instead of just getting queued behind the current reroute call.
|
|
1389
|
-
* We want to do this after the mounting/unmounting is done but before we
|
|
1390
|
-
* resolve the promise for the `reroute` function.
|
|
1391
|
-
*/
|
|
1392
|
-
|
|
1393
|
-
appChangeUnderway = false;
|
|
1394
|
-
if (peopleWaitingOnAppChange.length > 0) {
|
|
1395
|
-
/* While we were rerouting, someone else triggered another reroute that got queued.
|
|
1396
|
-
* So we need reroute again.
|
|
1397
|
-
*/
|
|
1398
|
-
var nextPendingPromises = peopleWaitingOnAppChange;
|
|
1399
|
-
peopleWaitingOnAppChange = [];
|
|
1400
|
-
reroute(nextPendingPromises);
|
|
1401
|
-
}
|
|
1402
|
-
return returnValue;
|
|
1403
|
-
}
|
|
1404
|
-
/* We need to call all event listeners that have been delayed because they were
|
|
1405
|
-
* waiting on single-spa. This includes haschange and popstate events for both
|
|
1406
|
-
* the current run of performAppChanges(), but also all of the queued event listeners.
|
|
1407
|
-
* We want to call the listeners in the same order as if they had not been delayed by
|
|
1408
|
-
* single-spa, which means queued ones first and then the most recent one.
|
|
1409
|
-
*/
|
|
1410
|
-
|
|
1411
|
-
function callAllEventListeners() {
|
|
1412
|
-
pendingPromises.forEach(function (pendingPromise) {
|
|
1413
|
-
callCapturedEventListeners(pendingPromise.eventArguments);
|
|
1414
|
-
});
|
|
1415
|
-
callCapturedEventListeners(eventArguments);
|
|
1416
|
-
}
|
|
1417
|
-
function getCustomEventDetail() {
|
|
1418
|
-
var isBeforeChanges = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
1419
|
-
var newAppStatuses = {};
|
|
1420
|
-
var appsByNewStatus = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, MOUNTED, []), NOT_MOUNTED, []), NOT_LOADED, []), SKIP_BECAUSE_BROKEN, []);
|
|
1421
|
-
if (isBeforeChanges) {
|
|
1422
|
-
appsToLoad.concat(appsToMount).forEach(function (app, index) {
|
|
1423
|
-
addApp(app, MOUNTED);
|
|
1424
|
-
});
|
|
1425
|
-
appsToUnload.forEach(function (app) {
|
|
1426
|
-
addApp(app, NOT_LOADED);
|
|
1427
|
-
});
|
|
1428
|
-
appsToUnmount.forEach(function (app) {
|
|
1429
|
-
addApp(app, NOT_MOUNTED);
|
|
1430
|
-
});
|
|
1431
|
-
} else {
|
|
1432
|
-
appsThatChanged.forEach(function (app) {
|
|
1433
|
-
addApp(app);
|
|
1434
|
-
});
|
|
1435
|
-
}
|
|
1436
|
-
return {
|
|
1437
|
-
detail: {
|
|
1438
|
-
newAppStatuses: newAppStatuses,
|
|
1439
|
-
appsByNewStatus: appsByNewStatus,
|
|
1440
|
-
totalAppChanges: appsThatChanged.length,
|
|
1441
|
-
originalEvent: eventArguments === null || eventArguments === void 0 ? void 0 : eventArguments[0]
|
|
1442
|
-
}
|
|
1443
|
-
};
|
|
1444
|
-
function addApp(app, status) {
|
|
1445
|
-
var appName = toName(app);
|
|
1446
|
-
status = status || getAppStatus(appName);
|
|
1447
|
-
newAppStatuses[appName] = status;
|
|
1448
|
-
var statusArr = appsByNewStatus[status] = appsByNewStatus[status] || [];
|
|
1449
|
-
statusArr.push(appName);
|
|
1450
|
-
}
|
|
1451
|
-
}
|
|
1452
|
-
}
|
|
1453
|
-
/**
|
|
1454
|
-
* Let's imagine that some kind of delay occurred during application loading.
|
|
1455
|
-
* The user without waiting for the application to load switched to another route,
|
|
1456
|
-
* this means that we shouldn't bootstrap and mount that application, thus we check
|
|
1457
|
-
* twice if that application should be active before bootstrapping and mounting.
|
|
1458
|
-
* https://github.com/single-spa/single-spa/issues/524
|
|
1459
|
-
*/
|
|
1460
|
-
|
|
1461
|
-
function tryToBootstrapAndMount(app, unmountAllPromise) {
|
|
1462
|
-
if (shouldBeActive(app)) {
|
|
1463
|
-
return toBootstrapPromise(app).then(function (app) {
|
|
1464
|
-
return unmountAllPromise.then(function () {
|
|
1465
|
-
return shouldBeActive(app) ? toMountPromise(app) : app;
|
|
1466
|
-
});
|
|
1467
|
-
});
|
|
1468
|
-
} else {
|
|
1469
|
-
return unmountAllPromise.then(function () {
|
|
1470
|
-
return app;
|
|
1471
|
-
});
|
|
1472
|
-
}
|
|
1473
|
-
}
|
|
1474
|
-
var started = false;
|
|
1475
|
-
function start(opts) {
|
|
1476
|
-
started = true;
|
|
1477
|
-
if (opts && opts.urlRerouteOnly) {
|
|
1478
|
-
setUrlRerouteOnly(opts.urlRerouteOnly);
|
|
1479
|
-
}
|
|
1480
|
-
if (isInBrowser) {
|
|
1481
|
-
reroute();
|
|
1482
|
-
}
|
|
1483
|
-
}
|
|
1484
|
-
function isStarted() {
|
|
1485
|
-
return started;
|
|
1486
|
-
}
|
|
1487
|
-
if (isInBrowser) {
|
|
1488
|
-
setTimeout(function () {
|
|
1489
|
-
if (!started) {
|
|
1490
|
-
console.warn(formatErrorMessage(1, "singleSpa.start() has not been called, 5000ms after single-spa was loaded. Before start() is called, apps can be declared and loaded, but not bootstrapped or mounted."));
|
|
1491
|
-
}
|
|
1492
|
-
}, 5000);
|
|
1493
|
-
}
|
|
1494
|
-
var devtools = {
|
|
1495
|
-
getRawAppData: getRawAppData,
|
|
1496
|
-
reroute: reroute,
|
|
1497
|
-
NOT_LOADED: NOT_LOADED,
|
|
1498
|
-
toLoadPromise: toLoadPromise,
|
|
1499
|
-
toBootstrapPromise: toBootstrapPromise,
|
|
1500
|
-
unregisterApplication: unregisterApplication
|
|
1501
|
-
};
|
|
1502
|
-
if (isInBrowser && window.__SINGLE_SPA_DEVTOOLS__) {
|
|
1503
|
-
window.__SINGLE_SPA_DEVTOOLS__.exposedMethods = devtools;
|
|
1504
|
-
}
|
|
1505
|
-
export { BOOTSTRAPPING, LOADING_SOURCE_CODE, LOAD_ERROR, MOUNTED, MOUNTING, NOT_BOOTSTRAPPED, NOT_LOADED, NOT_MOUNTED, SKIP_BECAUSE_BROKEN, UNMOUNTING, UPDATING, addErrorHandler, checkActivityFunctions, ensureJQuerySupport, getAppNames, getAppStatus, getMountedApps, mountRootParcel, navigateToUrl, pathToActiveWhen, registerApplication, removeErrorHandler, setBootstrapMaxTime, setMountMaxTime, setUnloadMaxTime, setUnmountMaxTime, start, triggerAppChange, unloadApplication, unregisterApplication };
|