iglooform 2.5.52 → 3.0.0-alpha
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/.dumi/overrides.less +70 -0
- package/.dumi/tmp/core/EmptyRoute.tsx +9 -0
- package/.dumi/tmp/core/defineApp.ts +17 -0
- package/.dumi/tmp/core/exportStaticRuntimePlugin.ts +11 -0
- package/.dumi/tmp/core/helmet.ts +10 -0
- package/.dumi/tmp/core/helmetContext.ts +4 -0
- package/.dumi/tmp/core/history.ts +66 -0
- package/.dumi/tmp/core/historyIntelli.ts +132 -0
- package/.dumi/tmp/core/plugin.ts +60 -0
- package/.dumi/tmp/core/pluginConfig.ts +292 -0
- package/.dumi/tmp/core/pluginConfigJoi.d.ts +54 -0
- package/.dumi/tmp/core/polyfill.ts +201 -0
- package/.dumi/tmp/core/route.tsx +50 -0
- package/.dumi/tmp/core/terminal.ts +37 -0
- package/.dumi/tmp/dumi/exports.ts +5 -0
- package/.dumi/tmp/dumi/locales/config.ts +87 -0
- package/.dumi/tmp/dumi/locales/runtime.tsx +39 -0
- package/.dumi/tmp/dumi/meta/atoms.ts +4 -0
- package/.dumi/tmp/dumi/meta/index.ts +255 -0
- package/.dumi/tmp/dumi/meta/runtime.ts +31 -0
- package/.dumi/tmp/dumi/meta/tabs.ts +5 -0
- package/.dumi/tmp/dumi/theme/ContextWrapper.tsx +58 -0
- package/.dumi/tmp/dumi/theme/builtins/API.ts +4 -0
- package/.dumi/tmp/dumi/theme/builtins/Badge.ts +4 -0
- package/.dumi/tmp/dumi/theme/builtins/Container.ts +4 -0
- package/.dumi/tmp/dumi/theme/builtins/Previewer.ts +4 -0
- package/.dumi/tmp/dumi/theme/builtins/SourceCode.ts +4 -0
- package/.dumi/tmp/dumi/theme/builtins/Table.ts +4 -0
- package/.dumi/tmp/dumi/theme/builtins/Tree.ts +4 -0
- package/.dumi/tmp/dumi/theme/layouts/DocLayout.ts +4 -0
- package/.dumi/tmp/dumi/theme/nprogress.css +59 -0
- package/.dumi/tmp/dumi/theme/slots/ColorSwitch.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Content.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/ContentTabs.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Features.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Footer.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Header.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/HeaderExtra.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Hero.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/HeroTitle.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/LangSwitch.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Logo.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Navbar.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/NavbarExtra.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/NotFound.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/PreviewerActions.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/PreviewerActionsExtra.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/RtlSwitch.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/SearchBar.ts +5 -0
- package/.dumi/tmp/dumi/theme/slots/SearchResult.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Sidebar.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/SocialIcon.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Toc.ts +4 -0
- package/.dumi/tmp/exports.ts +17 -0
- package/.dumi/tmp/plugin-antd/runtime.tsx +65 -0
- package/.dumi/tmp/plugin-antd/runtimeConfig.d.ts +6 -0
- package/.dumi/tmp/plugin-antd/types.d.ts +14 -0
- package/.dumi/tmp/plugin-html2sketch/index.ts +35 -0
- package/.dumi/tmp/testBrowser.tsx +90 -0
- package/.dumi/tmp/umi.ts +106 -0
- package/.dumirc.ts +27 -0
- package/es/admin-upload/float.d.ts +2 -2
- package/es/admin-upload/float.js +30 -42
- package/es/admin-upload/index.js +178 -242
- package/es/admin-upload/job-list.js +90 -105
- package/es/admin-upload/modal.d.ts +2 -2
- package/es/admin-upload/modal.js +31 -45
- package/es/admin-upload/style/index.js +1 -1
- package/es/admin-upload/style/index.less +6 -6
- package/es/alert-message/index.js +23 -36
- package/es/alert-message/style/index.js +1 -1
- package/es/alert-message/style/index.less +1 -1
- package/es/amount/index.js +17 -25
- package/es/amount/style/index.d.ts +0 -1
- package/es/amount/style/index.js +0 -1
- package/es/back-top/index.js +18 -32
- package/es/back-top/style/index.js +1 -1
- package/es/back-top/style/index.less +36 -25
- package/es/button/index.js +57 -88
- package/es/button/style/index.js +1 -1
- package/es/button/style/index.less +159 -109
- package/es/card-detail/card-group.d.ts +2 -2
- package/es/card-detail/card-group.js +14 -22
- package/es/card-detail/card-item.d.ts +2 -2
- package/es/card-detail/card-item.js +12 -23
- package/es/card-detail/card-page.js +18 -24
- package/es/card-detail/card.js +21 -32
- package/es/card-detail/index.js +4 -4
- package/es/card-detail/style/index.js +1 -1
- package/es/card-detail/style/index.less +4 -4
- package/es/card-detail/utils.d.ts +2 -2
- package/es/card-detail/utils.js +15 -21
- package/es/checkbox/index.d.ts +3 -2
- package/es/checkbox/index.js +73 -96
- package/es/checkbox/style/index.js +1 -1
- package/es/checkbox/style/index.less +42 -20
- package/es/claim-list/index.d.ts +1 -1
- package/es/claim-list/index.js +83 -129
- package/es/claim-list/style/index.js +1 -1
- package/es/claim-list/style/index.less +14 -8
- package/es/confirmation/index.js +29 -47
- package/es/confirmation/style/index.d.ts +0 -1
- package/es/confirmation/style/index.js +0 -1
- package/es/currency-context/style/index.d.ts +0 -1
- package/es/currency-context/style/index.js +0 -1
- package/es/date-picker/buddhist.js +31 -46
- package/es/date-picker/index.d.ts +2 -2
- package/es/date-picker/index.js +89 -118
- package/es/date-picker/style/index.js +1 -1
- package/es/date-picker/style/index.less +43 -22
- package/es/declaration/index.js +21 -34
- package/es/declaration/style/index.js +1 -1
- package/es/declaration/style/index.less +3 -3
- package/es/detail-panel/index.d.ts +2 -2
- package/es/detail-panel/index.js +48 -67
- package/es/detail-panel/style/index.js +1 -1
- package/es/detail-panel/style/index.less +3 -3
- package/es/documents/index.js +55 -73
- package/es/documents/style/index.js +1 -1
- package/es/filter/checkBox.d.ts +1 -1
- package/es/filter/checkBox.js +43 -64
- package/es/filter/customize.d.ts +1 -1
- package/es/filter/customize.js +8 -10
- package/es/filter/index.d.ts +1 -1
- package/es/filter/index.js +261 -359
- package/es/filter/radioBox.d.ts +1 -1
- package/es/filter/radioBox.js +26 -35
- package/es/filter/rangePicker.d.ts +1 -1
- package/es/filter/rangePicker.js +64 -83
- package/es/filter/style/index.js +1 -1
- package/es/filter/style/index.less +11 -11
- package/es/form/addable-section/index.js +71 -110
- package/es/form/addable-section/style/index.js +1 -1
- package/es/form/divider/index.js +11 -18
- package/es/form/divider/style/index.js +1 -1
- package/es/form/element/index.js +81 -140
- package/es/form/element/style/index.js +1 -1
- package/es/form/element/style/index.less +5 -5
- package/es/form/elements.js +15 -18
- package/es/form/hstep/index.js +53 -77
- package/es/form/hstep/style/index.js +1 -1
- package/es/form/hstep/style/index.less +2 -2
- package/es/form/hsteps/index.js +187 -245
- package/es/form/hsteps/style/index.js +1 -1
- package/es/form/index.js +133 -194
- package/es/form/login/index.js +24 -35
- package/es/form/login/style/index.js +1 -1
- package/es/form/login/style/index.less +1 -1
- package/es/form/page/index.js +42 -60
- package/es/form/page/style/index.js +1 -1
- package/es/form/pages/index.js +102 -139
- package/es/form/pages/style/index.js +1 -1
- package/es/form/render/index.js +12 -17
- package/es/form/render/style/index.js +1 -1
- package/es/form/section/index.js +58 -81
- package/es/form/section/style/index.js +1 -1
- package/es/form/step/index.js +57 -84
- package/es/form/step/style/index.js +1 -1
- package/es/form/step/style/index.less +3 -3
- package/es/form/steps/index.js +129 -174
- package/es/form/steps/style/index.js +1 -1
- package/es/form/style/index.js +1 -1
- package/es/form/style/index.less +1 -1
- package/es/form-context.d.ts +1 -1
- package/es/form-step-context.d.ts +1 -1
- package/es/free-form/addable-section/index.js +79 -137
- package/es/free-form/addable-section/style/index.js +1 -1
- package/es/free-form/element/index.js +63 -115
- package/es/free-form/element/style/index.js +1 -1
- package/es/free-form/element/style/index.less +4 -4
- package/es/free-form/index.d.ts +2 -2
- package/es/free-form/index.js +107 -157
- package/es/free-form/page/index.js +106 -144
- package/es/free-form/page/style/index.js +1 -1
- package/es/free-form/pages/index.js +17 -36
- package/es/free-form/pages/style/index.js +1 -1
- package/es/free-form/section/index.js +49 -87
- package/es/free-form/section/style/index.js +1 -1
- package/es/free-form/step/index.js +141 -197
- package/es/free-form/step/style/index.js +1 -1
- package/es/free-form/step/style/index.less +3 -3
- package/es/free-form/steps/index.d.ts +2 -2
- package/es/free-form/steps/index.js +37 -60
- package/es/free-form/steps/style/index.js +1 -1
- package/es/free-form/style/index.js +1 -1
- package/es/free-form/style/index.less +1 -1
- package/es/global-message/index.d.ts +1 -1
- package/es/global-message/index.js +23 -35
- package/es/global-message/style/index.js +1 -1
- package/es/global-message/style/index.less +4 -0
- package/es/home-menu/index.d.ts +1 -1
- package/es/home-menu/index.js +46 -63
- package/es/home-menu/style/index.js +1 -1
- package/es/home-menu/style/index.less +12 -7
- package/es/index.js +44 -44
- package/es/input/amount.js +28 -44
- package/es/input/credit-card.js +40 -78
- package/es/input/email.js +13 -16
- package/es/input/expiry-date.js +59 -96
- package/es/input/index.js +12 -12
- package/es/input/input-date.js +48 -88
- package/es/input/input-id.js +18 -31
- package/es/input/input-number.js +19 -35
- package/es/input/input.js +17 -27
- package/es/input/otp.d.ts +1 -1
- package/es/input/otp.js +51 -79
- package/es/input/password.js +15 -19
- package/es/input/phone-number.js +31 -50
- package/es/input/style/index.js +1 -1
- package/es/input/style/index.less +68 -70
- package/es/input/text-area.js +31 -55
- package/es/layout/defaultFooter.js +38 -43
- package/es/layout/defaultHeader.js +11 -16
- package/es/layout/footer.js +79 -85
- package/es/layout/header.js +61 -94
- package/es/layout/index.d.ts +2 -3
- package/es/layout/index.js +32 -48
- package/es/layout/style/index.js +1 -1
- package/es/layout/style/index.less +2 -2
- package/es/locale/en-US.js +1 -2
- package/es/locale/format-message.js +2 -6
- package/es/locale/formatted-message.js +2 -3
- package/es/locale/id-ID.js +1 -2
- package/es/locale/index.js +4 -4
- package/es/locale/locale-context.js +2 -4
- package/es/locale/locale-provider.d.ts +2 -1
- package/es/locale/locale-provider.js +20 -28
- package/es/locale/ms-MY.js +1 -2
- package/es/locale/th-TH.js +1 -2
- package/es/locale/vi-VN.js +1 -2
- package/es/locale/zh-CN.js +1 -2
- package/es/locale/zh-TW.js +1 -2
- package/es/login-page/index.d.ts +2 -2
- package/es/login-page/index.js +24 -29
- package/es/login-page/style/index.js +1 -1
- package/es/media/index.js +59 -104
- package/es/media/media.js +27 -45
- package/es/media/preview.js +103 -149
- package/es/media/style/index.js +1 -1
- package/es/media/style/index.less +6 -6
- package/es/mobile-insurer-detail/index.d.ts +1 -1
- package/es/mobile-insurer-detail/index.js +52 -59
- package/es/mobile-insurer-detail/style/index.js +1 -1
- package/es/mobile-insurer-list/index.d.ts +1 -1
- package/es/mobile-insurer-list/index.js +34 -37
- package/es/mobile-insurer-list/style/index.js +1 -1
- package/es/modal/index.d.ts +2 -2
- package/es/modal/index.js +136 -154
- package/es/modal/style/index.js +1 -1
- package/es/modal/style/index.less +59 -51
- package/es/platform/index.js +2 -2
- package/es/platform/platform-card/index.js +18 -29
- package/es/platform/platform-card/style/index.js +1 -1
- package/es/platform/switch-platform/index.js +29 -53
- package/es/platform/switch-platform/style/index.js +1 -1
- package/es/platform/switch-platform/style/index.less +1 -1
- package/es/policy-list/index.d.ts +1 -1
- package/es/policy-list/index.js +21 -30
- package/es/policy-list/policy-card.d.ts +1 -1
- package/es/policy-list/policy-card.js +107 -142
- package/es/policy-list/style/index.js +1 -1
- package/es/policy-list/style/index.less +1 -0
- package/es/radio/index.d.ts +2 -1
- package/es/radio/index.js +65 -85
- package/es/radio/radio-group-with-other.d.ts +3 -2
- package/es/radio/radio-group-with-other.js +30 -55
- package/es/radio/style/index.js +1 -1
- package/es/radio/style/index.less +63 -45
- package/es/search-box/index.js +66 -98
- package/es/search-box/style/index.js +1 -1
- package/es/search-box/style/index.less +2 -2
- package/es/select/attached-select.d.ts +3 -3
- package/es/select/attached-select.js +67 -107
- package/es/select/index.js +3 -3
- package/es/select/select.d.ts +3 -3
- package/es/select/select.js +33 -50
- package/es/select/style/index.js +1 -1
- package/es/select/style/index.less +154 -112
- package/es/select/time-select.js +64 -108
- package/es/status-box/index.d.ts +2 -3
- package/es/status-box/index.js +14 -16
- package/es/status-box/style/index.js +1 -1
- package/es/status-box/style/index.less +2 -2
- package/es/table/index.js +119 -168
- package/es/table/style/index.js +1 -1
- package/es/table/style/index.less +137 -109
- package/es/tabs/index.d.ts +4 -3
- package/es/tabs/index.js +12 -16
- package/es/tabs/style/index.js +1 -1
- package/es/types.d.ts +1 -2
- package/es/types.js +2 -1
- package/es/typography/index.d.ts +2 -1
- package/es/typography/index.js +11 -17
- package/es/typography/style/index.js +1 -1
- package/es/typography/style/index.less +4 -0
- package/es/upload/index.js +253 -335
- package/es/upload/style/index.js +1 -1
- package/es/upload/style/index.less +8 -6
- package/es/upload-photo/index.js +321 -450
- package/es/upload-photo/media.js +16 -29
- package/es/upload-photo/style/index.js +1 -1
- package/es/upload-photo/style/index.less +4 -4
- package/es/upload-preview/index.js +63 -85
- package/es/upload-preview/media.js +42 -77
- package/es/upload-preview/style/index.js +1 -1
- package/es/upload-preview/style/index.less +1 -1
- package/es/utils/form-methods.js +1 -1
- package/es/utils/form-utils.d.ts +9 -8
- package/es/utils/form-utils.js +162 -260
- package/es/utils/option-utils.d.ts +3 -2
- package/es/utils/option-utils.js +106 -163
- package/es/utils/tools.js +0 -8
- package/lib/admin-upload/float.d.ts +2 -2
- package/lib/admin-upload/float.js +27 -46
- package/lib/admin-upload/index.js +171 -251
- package/lib/admin-upload/job-list.js +82 -109
- package/lib/admin-upload/modal.d.ts +2 -2
- package/lib/admin-upload/modal.js +27 -52
- package/lib/admin-upload/style/index.less +6 -6
- package/lib/alert-message/index.js +21 -43
- package/lib/alert-message/style/index.less +1 -1
- package/lib/amount/index.js +15 -31
- package/lib/amount/style/index.d.ts +0 -1
- package/lib/back-top/index.js +17 -39
- package/lib/back-top/style/index.less +36 -25
- package/lib/button/index.js +54 -101
- package/lib/button/style/index.less +159 -109
- package/lib/card-detail/card-group.d.ts +2 -2
- package/lib/card-detail/card-group.js +11 -29
- package/lib/card-detail/card-item.d.ts +2 -2
- package/lib/card-detail/card-item.js +9 -27
- package/lib/card-detail/card-page.js +14 -29
- package/lib/card-detail/card.js +17 -37
- package/lib/card-detail/index.js +0 -5
- package/lib/card-detail/style/index.less +4 -4
- package/lib/card-detail/utils.d.ts +2 -2
- package/lib/card-detail/utils.js +13 -28
- package/lib/checkbox/index.d.ts +3 -2
- package/lib/checkbox/index.js +64 -107
- package/lib/checkbox/style/index.less +42 -20
- package/lib/claim-list/index.d.ts +1 -1
- package/lib/claim-list/index.js +75 -143
- package/lib/claim-list/style/index.less +14 -8
- package/lib/confirmation/index.js +22 -50
- package/lib/confirmation/style/index.d.ts +0 -1
- package/lib/currency-context/index.js +0 -3
- package/lib/currency-context/style/index.d.ts +0 -1
- package/lib/date-picker/buddhist.js +34 -61
- package/lib/date-picker/index.d.ts +2 -2
- package/lib/date-picker/index.js +98 -145
- package/lib/date-picker/style/index.less +43 -22
- package/lib/declaration/index.js +17 -42
- package/lib/declaration/style/index.less +3 -3
- package/lib/detail-panel/index.d.ts +2 -2
- package/lib/detail-panel/index.js +44 -77
- package/lib/detail-panel/style/index.less +3 -3
- package/lib/documents/index.js +56 -78
- package/lib/filter/checkBox.d.ts +1 -1
- package/lib/filter/checkBox.js +40 -74
- package/lib/filter/customize.d.ts +1 -1
- package/lib/filter/customize.js +6 -14
- package/lib/filter/index.d.ts +1 -1
- package/lib/filter/index.js +258 -382
- package/lib/filter/radioBox.d.ts +1 -1
- package/lib/filter/radioBox.js +24 -45
- package/lib/filter/rangePicker.d.ts +1 -1
- package/lib/filter/rangePicker.js +64 -96
- package/lib/filter/style/index.less +11 -11
- package/lib/form/addable-section/index.js +65 -121
- package/lib/form/divider/index.js +9 -24
- package/lib/form/element/index.js +73 -156
- package/lib/form/element/style/index.less +5 -5
- package/lib/form/elements.js +1 -24
- package/lib/form/hstep/index.js +44 -87
- package/lib/form/hstep/style/index.less +2 -2
- package/lib/form/hsteps/index.js +177 -257
- package/lib/form/index.js +124 -201
- package/lib/form/login/index.js +18 -46
- package/lib/form/login/style/index.less +1 -1
- package/lib/form/page/index.js +35 -69
- package/lib/form/pages/index.js +94 -148
- package/lib/form/render/index.js +15 -21
- package/lib/form/section/index.js +52 -92
- package/lib/form/step/index.js +50 -96
- package/lib/form/step/style/index.less +3 -3
- package/lib/form/steps/index.js +125 -179
- package/lib/form/style/index.less +1 -1
- package/lib/form-context.d.ts +1 -1
- package/lib/form-context.js +0 -4
- package/lib/form-step-context.d.ts +1 -1
- package/lib/form-step-context.js +0 -4
- package/lib/free-form/addable-section/index.js +73 -148
- package/lib/free-form/element/index.js +58 -131
- package/lib/free-form/element/style/index.less +4 -4
- package/lib/free-form/index.d.ts +2 -2
- package/lib/free-form/index.js +104 -164
- package/lib/free-form/page/index.js +99 -150
- package/lib/free-form/pages/index.js +18 -39
- package/lib/free-form/section/index.js +46 -94
- package/lib/free-form/step/index.js +135 -209
- package/lib/free-form/step/style/index.less +3 -3
- package/lib/free-form/steps/index.d.ts +2 -2
- package/lib/free-form/steps/index.js +34 -66
- package/lib/free-form/style/index.less +1 -1
- package/lib/global-message/index.d.ts +1 -1
- package/lib/global-message/index.js +22 -40
- package/lib/global-message/style/index.less +4 -0
- package/lib/home-menu/index.d.ts +1 -1
- package/lib/home-menu/index.js +43 -74
- package/lib/home-menu/style/index.less +12 -7
- package/lib/index.js +0 -50
- package/lib/input/amount.js +25 -50
- package/lib/input/credit-card.js +37 -85
- package/lib/input/email.js +11 -20
- package/lib/input/expiry-date.js +54 -102
- package/lib/input/index.js +0 -14
- package/lib/input/input-date.js +46 -98
- package/lib/input/input-id.js +15 -35
- package/lib/input/input-number.js +16 -39
- package/lib/input/input.js +14 -33
- package/lib/input/otp.d.ts +1 -1
- package/lib/input/otp.js +47 -87
- package/lib/input/password.js +14 -25
- package/lib/input/phone-number.js +27 -56
- package/lib/input/style/index.less +68 -70
- package/lib/input/text-area.js +27 -61
- package/lib/layout/defaultFooter.js +33 -49
- package/lib/layout/defaultHeader.js +10 -21
- package/lib/layout/footer.js +74 -93
- package/lib/layout/header.js +56 -110
- package/lib/layout/index.d.ts +2 -3
- package/lib/layout/index.js +26 -52
- package/lib/layout/style/index.less +2 -2
- package/lib/locale/en-US.js +1 -3
- package/lib/locale/format-message.js +1 -7
- package/lib/locale/formatted-message.js +1 -6
- package/lib/locale/id-ID.js +1 -3
- package/lib/locale/index.js +0 -5
- package/lib/locale/locale-context.js +1 -7
- package/lib/locale/locale-provider.d.ts +2 -1
- package/lib/locale/locale-provider.js +18 -49
- package/lib/locale/ms-MY.js +1 -3
- package/lib/locale/th-TH.js +1 -3
- package/lib/locale/vi-VN.js +1 -3
- package/lib/locale/zh-CN.js +1 -3
- package/lib/locale/zh-TW.js +1 -3
- package/lib/login-page/index.d.ts +2 -2
- package/lib/login-page/index.js +22 -34
- package/lib/media/index.js +57 -110
- package/lib/media/media.js +28 -51
- package/lib/media/preview.js +99 -159
- package/lib/media/style/index.less +6 -6
- package/lib/mobile-insurer-detail/index.d.ts +1 -1
- package/lib/mobile-insurer-detail/index.js +46 -62
- package/lib/mobile-insurer-list/index.d.ts +1 -1
- package/lib/mobile-insurer-list/index.js +30 -42
- package/lib/modal/index.d.ts +2 -2
- package/lib/modal/index.js +130 -163
- package/lib/modal/style/index.less +59 -51
- package/lib/platform/index.js +0 -3
- package/lib/platform/platform-card/index.js +15 -34
- package/lib/platform/switch-platform/index.js +26 -64
- package/lib/platform/switch-platform/style/index.less +1 -1
- package/lib/policy-list/index.d.ts +1 -1
- package/lib/policy-list/index.js +18 -35
- package/lib/policy-list/policy-card.d.ts +1 -1
- package/lib/policy-list/policy-card.js +101 -152
- package/lib/policy-list/style/index.less +1 -0
- package/lib/radio/index.d.ts +2 -1
- package/lib/radio/index.js +58 -97
- package/lib/radio/radio-group-with-other.d.ts +3 -2
- package/lib/radio/radio-group-with-other.js +26 -58
- package/lib/radio/style/index.less +63 -45
- package/lib/search-box/index.js +57 -103
- package/lib/search-box/style/index.less +2 -2
- package/lib/select/attached-select.d.ts +3 -3
- package/lib/select/attached-select.js +59 -118
- package/lib/select/index.js +0 -5
- package/lib/select/select.d.ts +3 -3
- package/lib/select/select.js +29 -61
- package/lib/select/style/index.less +154 -112
- package/lib/select/time-select.js +58 -115
- package/lib/status-box/index.d.ts +2 -3
- package/lib/status-box/index.js +12 -19
- package/lib/status-box/style/index.less +2 -2
- package/lib/table/index.js +115 -196
- package/lib/table/style/index.less +137 -109
- package/lib/tabs/index.d.ts +4 -3
- package/lib/tabs/index.js +11 -23
- package/lib/types.d.ts +1 -2
- package/lib/types.js +8 -1
- package/lib/typography/index.d.ts +2 -1
- package/lib/typography/index.js +10 -20
- package/lib/typography/style/index.less +4 -0
- package/lib/upload/index.js +242 -344
- package/lib/upload/style/index.less +8 -6
- package/lib/upload-photo/index.js +309 -467
- package/lib/upload-photo/media.js +18 -32
- package/lib/upload-photo/style/index.less +4 -4
- package/lib/upload-preview/index.js +55 -90
- package/lib/upload-preview/media.js +36 -87
- package/lib/upload-preview/style/index.less +1 -1
- package/lib/utils/agent-detect.js +0 -1
- package/lib/utils/form-methods.js +1 -1
- package/lib/utils/form-utils.d.ts +9 -8
- package/lib/utils/form-utils.js +168 -288
- package/lib/utils/option-utils.d.ts +3 -2
- package/lib/utils/option-utils.js +105 -173
- package/lib/utils/tools.js +0 -11
- package/package.json +15 -18
- package/lib/global.less +0 -63
- /package/{es → .dumi}/global.less +0 -0
package/es/layout/header.js
CHANGED
|
@@ -1,141 +1,111 @@
|
|
|
1
|
-
import "antd/es/avatar/style";
|
|
2
|
-
import _Avatar from "antd/es/avatar";
|
|
3
|
-
import "antd/es/space/style";
|
|
4
|
-
import _Space from "antd/es/space";
|
|
5
|
-
import "antd/es/col/style";
|
|
6
|
-
import _Col from "antd/es/col";
|
|
7
|
-
import "antd/es/row/style";
|
|
8
|
-
import _Row from "antd/es/row";
|
|
9
|
-
import "antd/es/badge/style";
|
|
10
|
-
import _Badge from "antd/es/badge";
|
|
11
|
-
import "antd/es/grid/style";
|
|
12
|
-
import _Grid from "antd/es/grid";
|
|
13
|
-
|
|
14
1
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15
|
-
|
|
16
2
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
3
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
5
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
20
6
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
21
|
-
|
|
22
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
|
-
|
|
24
8
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25
|
-
|
|
26
9
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
31
|
-
|
|
10
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
32
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
33
|
-
|
|
34
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
35
13
|
import { useState, useEffect } from 'react';
|
|
14
|
+
import { Grid, Row, Col, Space, Avatar, Badge } from 'antd';
|
|
36
15
|
import classnames from 'classnames';
|
|
37
|
-
import Typography from
|
|
38
|
-
import HomeMenu from
|
|
39
|
-
import defaultAvatar from
|
|
40
|
-
import
|
|
41
|
-
|
|
16
|
+
import Typography from "../typography";
|
|
17
|
+
import HomeMenu from "../home-menu/index";
|
|
18
|
+
import defaultAvatar from "./style/avatar.svg";
|
|
19
|
+
import "./style/index";
|
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
22
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
42
23
|
var LayoutHeader = function LayoutHeader(_ref) {
|
|
43
24
|
var hiddenIglooIcon = _ref.hiddenIglooIcon,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
var useBreakpoint =
|
|
56
|
-
|
|
25
|
+
_ref$menus = _ref.menus,
|
|
26
|
+
menus = _ref$menus === void 0 ? [] : _ref$menus,
|
|
27
|
+
_ref$defaultSelected = _ref.defaultSelected,
|
|
28
|
+
defaultSelected = _ref$defaultSelected === void 0 ? '' : _ref$defaultSelected,
|
|
29
|
+
selectedKey = _ref.selectedKey,
|
|
30
|
+
onMenuChange = _ref.onMenuChange,
|
|
31
|
+
dropMenuConfig = _ref.dropMenuConfig,
|
|
32
|
+
userName = _ref.userName,
|
|
33
|
+
_ref$userAvatar = _ref.userAvatar,
|
|
34
|
+
userAvatar = _ref$userAvatar === void 0 ? defaultAvatar : _ref$userAvatar,
|
|
35
|
+
children = _ref.children;
|
|
36
|
+
var useBreakpoint = Grid.useBreakpoint;
|
|
57
37
|
var _useBreakpoint = useBreakpoint(),
|
|
58
|
-
|
|
59
|
-
|
|
38
|
+
md = _useBreakpoint.md;
|
|
60
39
|
var _useState = useState(selectedKey),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
40
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
41
|
+
selectedMenu = _useState2[0],
|
|
42
|
+
setSelectedMenu = _useState2[1];
|
|
65
43
|
var _useState3 = useState(defaultSelected),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
44
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
45
|
+
activeMenu = _useState4[0],
|
|
46
|
+
setActiveMenu = _useState4[1];
|
|
70
47
|
var onlyHaveIconButNotShow = hiddenIglooIcon && menus.length === 0 && Object.keys(dropMenuConfig || {}).length === 0 && !userName && !children;
|
|
71
48
|
useEffect(function () {
|
|
72
49
|
if (selectedKey) {
|
|
73
50
|
setSelectedMenu(selectedKey);
|
|
74
51
|
}
|
|
75
52
|
}, [selectedKey]);
|
|
76
|
-
|
|
77
53
|
var defaultMenuOnClick = function defaultMenuOnClick(menuConfig) {
|
|
78
54
|
var key = menuConfig.key;
|
|
79
55
|
setActiveMenu(key);
|
|
80
56
|
};
|
|
81
|
-
|
|
82
57
|
function getMenuDom(activeMenu, menuInfo) {
|
|
83
58
|
var badge = menuInfo.badge;
|
|
84
|
-
|
|
85
59
|
switch (_typeof(badge)) {
|
|
86
60
|
case 'string':
|
|
87
|
-
return _jsxs(_Fragment, {
|
|
88
|
-
children: [_jsx(Typography, {
|
|
61
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
62
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
|
89
63
|
className: classnames({
|
|
90
64
|
'active-menu': activeMenu === menuInfo.key
|
|
91
65
|
}),
|
|
92
66
|
level: activeMenu === menuInfo.key ? 'h4' : 'body1',
|
|
93
67
|
children: menuInfo.title
|
|
94
|
-
}), _jsx(
|
|
68
|
+
}), /*#__PURE__*/_jsx(Badge, {
|
|
95
69
|
dot: true,
|
|
96
70
|
color: '#F52209'
|
|
97
71
|
})]
|
|
98
72
|
});
|
|
99
|
-
|
|
100
73
|
case 'number':
|
|
101
|
-
return _jsxs(_Fragment, {
|
|
102
|
-
children: [_jsx(Typography, {
|
|
74
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
75
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
|
103
76
|
className: classnames({
|
|
104
77
|
'active-menu': activeMenu === menuInfo.key
|
|
105
78
|
}),
|
|
106
79
|
level: activeMenu === menuInfo.key ? 'h4' : 'body1',
|
|
107
80
|
children: menuInfo.title
|
|
108
|
-
}), _jsx(
|
|
81
|
+
}), /*#__PURE__*/_jsx(Badge, {
|
|
109
82
|
count: badge,
|
|
110
83
|
style: {
|
|
111
84
|
backgroundColor: '#F52209'
|
|
112
85
|
}
|
|
113
86
|
})]
|
|
114
87
|
});
|
|
115
|
-
|
|
116
88
|
case 'object':
|
|
117
|
-
return _jsxs(_Fragment, {
|
|
118
|
-
children: [_jsx(Typography, {
|
|
89
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
90
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
|
119
91
|
className: classnames({
|
|
120
92
|
'active-menu': activeMenu === menuInfo.key
|
|
121
93
|
}),
|
|
122
94
|
level: activeMenu === menuInfo.key ? 'h4' : 'body1',
|
|
123
95
|
children: menuInfo.title
|
|
124
|
-
}), _jsx(
|
|
96
|
+
}), /*#__PURE__*/_jsx(Badge, _objectSpread({}, badge))]
|
|
125
97
|
});
|
|
126
|
-
|
|
127
98
|
case 'undefined':
|
|
128
|
-
return _jsx(Typography, {
|
|
99
|
+
return /*#__PURE__*/_jsx(Typography, {
|
|
129
100
|
className: classnames({
|
|
130
101
|
'active-menu': activeMenu === menuInfo.key
|
|
131
102
|
}),
|
|
132
103
|
level: activeMenu === menuInfo.key ? 'h4' : 'body1',
|
|
133
104
|
children: menuInfo.title
|
|
134
105
|
});
|
|
135
|
-
|
|
136
106
|
case 'function':
|
|
137
|
-
return _jsxs(_Fragment, {
|
|
138
|
-
children: [_jsx(Typography, {
|
|
107
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
108
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
|
139
109
|
className: classnames({
|
|
140
110
|
'active-menu': activeMenu === menuInfo.key
|
|
141
111
|
}),
|
|
@@ -145,26 +115,24 @@ var LayoutHeader = function LayoutHeader(_ref) {
|
|
|
145
115
|
});
|
|
146
116
|
}
|
|
147
117
|
}
|
|
148
|
-
|
|
149
118
|
if (onlyHaveIconButNotShow) return null;
|
|
150
|
-
|
|
151
119
|
if (md) {
|
|
152
|
-
return _jsx("div", {
|
|
120
|
+
return /*#__PURE__*/_jsx("div", {
|
|
153
121
|
className: classnames({
|
|
154
122
|
'igloo-layout-header': true,
|
|
155
123
|
'igloo-layout-header-fix': Boolean(menus === null || menus === void 0 ? void 0 : menus.length) || Boolean(dropMenuConfig)
|
|
156
124
|
}),
|
|
157
|
-
children: _jsxs("div", {
|
|
125
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
158
126
|
className: classnames('header-content', {
|
|
159
127
|
'header-content-noSpaceBetween': children
|
|
160
128
|
}),
|
|
161
|
-
children: [_jsxs("div", {
|
|
129
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
162
130
|
className: "header-left",
|
|
163
|
-
children: [!hiddenIglooIcon && _jsx("div", {
|
|
131
|
+
children: [!hiddenIglooIcon && /*#__PURE__*/_jsx("div", {
|
|
164
132
|
className: "igloo-logo"
|
|
165
|
-
}), Boolean(menus === null || menus === void 0 ? void 0 : menus.length) && !children && _jsx(
|
|
133
|
+
}), Boolean(menus === null || menus === void 0 ? void 0 : menus.length) && !children && /*#__PURE__*/_jsx(Row, {
|
|
166
134
|
children: menus.map(function (menu) {
|
|
167
|
-
return _jsx(
|
|
135
|
+
return /*#__PURE__*/_jsx(Col, {
|
|
168
136
|
className: classnames('menu-item'),
|
|
169
137
|
onClick: function onClick() {
|
|
170
138
|
onMenuChange ? onMenuChange(menu) : defaultMenuOnClick(menu);
|
|
@@ -173,45 +141,45 @@ var LayoutHeader = function LayoutHeader(_ref) {
|
|
|
173
141
|
}, menu.key);
|
|
174
142
|
})
|
|
175
143
|
})]
|
|
176
|
-
}), dropMenuConfig && !children && _jsxs(
|
|
144
|
+
}), dropMenuConfig && !children && /*#__PURE__*/_jsxs(Space, {
|
|
177
145
|
size: 8,
|
|
178
|
-
children: [_jsx(
|
|
146
|
+
children: [/*#__PURE__*/_jsx(Avatar, {
|
|
179
147
|
size: 32,
|
|
180
148
|
src: userAvatar
|
|
181
|
-
}), _jsx(Typography, {
|
|
149
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
182
150
|
level: "body1",
|
|
183
151
|
style: {
|
|
184
152
|
color: '#666666'
|
|
185
153
|
},
|
|
186
154
|
children: userName
|
|
187
|
-
}), dropMenuConfig && _jsx(HomeMenu, _objectSpread({}, dropMenuConfig))]
|
|
155
|
+
}), dropMenuConfig && /*#__PURE__*/_jsx(HomeMenu, _objectSpread({}, dropMenuConfig))]
|
|
188
156
|
}), children]
|
|
189
157
|
})
|
|
190
158
|
});
|
|
191
159
|
} else {
|
|
192
|
-
return _jsxs(_Fragment, {
|
|
193
|
-
children: [_jsxs("div", {
|
|
160
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
161
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
194
162
|
className: classnames({
|
|
195
163
|
'igloo-layout-header': true,
|
|
196
164
|
'igloo-layout-header-fix': Boolean(menus === null || menus === void 0 ? void 0 : menus.length) || Boolean(dropMenuConfig)
|
|
197
165
|
}),
|
|
198
|
-
children: [!hiddenIglooIcon && _jsx("div", {
|
|
166
|
+
children: [!hiddenIglooIcon && /*#__PURE__*/_jsx("div", {
|
|
199
167
|
className: "igloo-logo"
|
|
200
|
-
}), dropMenuConfig && !children && _jsx(HomeMenu, _objectSpread({
|
|
168
|
+
}), dropMenuConfig && !children && /*#__PURE__*/_jsx(HomeMenu, _objectSpread({
|
|
201
169
|
userAvatar: userAvatar,
|
|
202
170
|
userName: userName
|
|
203
171
|
}, dropMenuConfig)), children]
|
|
204
|
-
}), Boolean(menus === null || menus === void 0 ? void 0 : menus.length) && _jsx(
|
|
172
|
+
}), Boolean(menus === null || menus === void 0 ? void 0 : menus.length) && /*#__PURE__*/_jsx(Row, {
|
|
205
173
|
className: "igloo-layout-menu",
|
|
206
174
|
children: menus.map(function (menu) {
|
|
207
175
|
var span = 24 / menus.length;
|
|
208
|
-
return _jsx(
|
|
176
|
+
return /*#__PURE__*/_jsx(Col, {
|
|
209
177
|
span: span,
|
|
210
178
|
className: classnames('menu-item'),
|
|
211
179
|
onClick: function onClick() {
|
|
212
180
|
onMenuChange ? onMenuChange(menu) : defaultMenuOnClick(menu);
|
|
213
181
|
},
|
|
214
|
-
children: _jsx("div", {
|
|
182
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
215
183
|
style: {
|
|
216
184
|
display: 'flex',
|
|
217
185
|
alignItems: 'flex-start'
|
|
@@ -224,6 +192,5 @@ var LayoutHeader = function LayoutHeader(_ref) {
|
|
|
224
192
|
});
|
|
225
193
|
}
|
|
226
194
|
};
|
|
227
|
-
|
|
228
195
|
LayoutHeader.displayName = 'LayoutHeader';
|
|
229
196
|
export default LayoutHeader;
|
package/es/layout/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC, CSSProperties, ReactNode } from 'react';
|
|
1
|
+
import { FC, CSSProperties, PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import { BadgeProps } from 'antd';
|
|
3
3
|
import './style';
|
|
4
4
|
interface Menu {
|
|
@@ -26,7 +26,6 @@ export interface HeaderConfig {
|
|
|
26
26
|
};
|
|
27
27
|
userName?: string;
|
|
28
28
|
userAvatar?: string;
|
|
29
|
-
children?: any;
|
|
30
29
|
}
|
|
31
30
|
export interface FooterConfig {
|
|
32
31
|
hiddenIglooIcon?: boolean;
|
|
@@ -49,7 +48,7 @@ interface layoutType {
|
|
|
49
48
|
}
|
|
50
49
|
declare type HeaderFunction = (props: HeaderConfig) => any;
|
|
51
50
|
declare type FooterFunction = (props: FooterConfig) => any;
|
|
52
|
-
interface ILayout extends FC<layoutType
|
|
51
|
+
interface ILayout extends FC<PropsWithChildren<layoutType>> {
|
|
53
52
|
Header: HeaderFunction;
|
|
54
53
|
Footer: FooterFunction;
|
|
55
54
|
}
|
package/es/layout/index.js
CHANGED
|
@@ -1,35 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
import _Grid from "antd/es/grid";
|
|
3
|
-
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
2
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
|
-
|
|
6
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
|
-
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
import {
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
import { Grid } from 'antd';
|
|
11
8
|
import classnames from 'classnames';
|
|
12
|
-
import LayoutHeader from
|
|
13
|
-
import LayoutFooter from
|
|
14
|
-
import DefaultHeader from
|
|
15
|
-
import DefaultFooter from
|
|
16
|
-
import
|
|
17
|
-
|
|
9
|
+
import LayoutHeader from "./header";
|
|
10
|
+
import LayoutFooter from "./footer";
|
|
11
|
+
import DefaultHeader from "./defaultHeader";
|
|
12
|
+
import DefaultFooter from "./defaultFooter";
|
|
13
|
+
import "./style";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
16
|
var Layout = function Layout(props) {
|
|
19
17
|
var hiddenIglooIcon = props.hiddenIglooIcon,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var useBreakpoint =
|
|
27
|
-
|
|
18
|
+
className = props.className,
|
|
19
|
+
style = props.style,
|
|
20
|
+
headerConfig = props.headerConfig,
|
|
21
|
+
footerConfig = props.footerConfig,
|
|
22
|
+
withFixedPanel = props.withFixedPanel,
|
|
23
|
+
children = props.children;
|
|
24
|
+
var useBreakpoint = Grid.useBreakpoint;
|
|
28
25
|
var _useBreakpoint = useBreakpoint(),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
md = _useBreakpoint.md,
|
|
27
|
+
lg = _useBreakpoint.lg,
|
|
28
|
+
xl = _useBreakpoint.xl;
|
|
33
29
|
var mobile = !md;
|
|
34
30
|
var smallPC = !lg && md;
|
|
35
31
|
var middlePC = !xl && lg;
|
|
@@ -38,43 +34,35 @@ var Layout = function Layout(props) {
|
|
|
38
34
|
var contentDom = null;
|
|
39
35
|
var headerDom = null;
|
|
40
36
|
var footerDom = null;
|
|
41
|
-
|
|
42
37
|
if (mobile) {
|
|
43
38
|
layoutContainerClass = classnames({
|
|
44
39
|
'igloo-customer-mobile-container': true,
|
|
45
40
|
'igloo-customer-mobile-container-with-panel': withFixedPanel
|
|
46
41
|
});
|
|
47
42
|
}
|
|
48
|
-
|
|
49
43
|
if (smallPC) {
|
|
50
44
|
layoutContainerClass = 'igloo-customer-layout-small';
|
|
51
45
|
}
|
|
52
|
-
|
|
53
46
|
if (middlePC) {
|
|
54
47
|
layoutContainerClass = 'igloo-customer-layout-middle';
|
|
55
48
|
}
|
|
56
|
-
|
|
57
49
|
if (bigPC) {
|
|
58
50
|
layoutContainerClass = 'igloo-customer-layout-big';
|
|
59
51
|
}
|
|
60
|
-
|
|
61
52
|
switch (Object.prototype.toString.call(children)) {
|
|
62
53
|
case '[object Object]':
|
|
63
54
|
// @ts-ignore
|
|
64
55
|
if ((children === null || children === void 0 ? void 0 : children.type.displayName) === 'LayoutHeader') {
|
|
65
56
|
headerDom = children;
|
|
66
57
|
break;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
58
|
+
}
|
|
59
|
+
//@ts-ignore
|
|
70
60
|
if ((children === null || children === void 0 ? void 0 : children.type.displayName) === 'LayoutFooter') {
|
|
71
61
|
footerDom = children;
|
|
72
62
|
break;
|
|
73
63
|
}
|
|
74
|
-
|
|
75
64
|
contentDom = children;
|
|
76
65
|
break;
|
|
77
|
-
|
|
78
66
|
case '[object Array]':
|
|
79
67
|
//@ts-ignore
|
|
80
68
|
contentDom = children.filter(function (dom) {
|
|
@@ -82,34 +70,30 @@ var Layout = function Layout(props) {
|
|
|
82
70
|
if (dom.type.displayName === 'LayoutHeader') headerDom = dom;
|
|
83
71
|
if (dom.type.displayName === 'LayoutFooter') footerDom = dom;
|
|
84
72
|
return dom.type.displayName !== 'LayoutHeader' && dom.type.displayName !== 'LayoutFooter';
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
73
|
+
}
|
|
74
|
+
// 希望所有的dom都被返回,处理一下dom=数字0这种情况
|
|
88
75
|
return dom !== false;
|
|
89
76
|
});
|
|
90
77
|
break;
|
|
91
|
-
|
|
92
78
|
default:
|
|
93
79
|
contentDom = children;
|
|
94
80
|
}
|
|
95
|
-
|
|
96
|
-
return _jsxs("div", {
|
|
81
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
97
82
|
style: style,
|
|
98
83
|
className: classnames(layoutContainerClass, className),
|
|
99
|
-
children: [!headerDom && !headerConfig && _jsx(DefaultHeader, {
|
|
84
|
+
children: [!headerDom && !headerConfig && /*#__PURE__*/_jsx(DefaultHeader, {
|
|
100
85
|
hiddenIglooIcon: hiddenIglooIcon
|
|
101
|
-
}), headerConfig && _jsx(LayoutHeader, _objectSpread({}, headerConfig)), headerDom, _jsx("div", {
|
|
86
|
+
}), headerConfig && /*#__PURE__*/_jsx(LayoutHeader, _objectSpread({}, headerConfig)), headerDom, /*#__PURE__*/_jsx("div", {
|
|
102
87
|
className: "igloo-layout-center",
|
|
103
|
-
children: _jsx("div", {
|
|
88
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
104
89
|
className: "igloo-layout-content",
|
|
105
90
|
children: contentDom
|
|
106
91
|
})
|
|
107
|
-
}), !footerDom && !footerConfig && _jsx(DefaultFooter, {
|
|
92
|
+
}), !footerDom && !footerConfig && /*#__PURE__*/_jsx(DefaultFooter, {
|
|
108
93
|
hiddenIglooIcon: hiddenIglooIcon
|
|
109
|
-
}), footerConfig && _jsx(LayoutFooter, _objectSpread({}, footerConfig)), footerDom]
|
|
94
|
+
}), footerConfig && /*#__PURE__*/_jsx(LayoutFooter, _objectSpread({}, footerConfig)), footerDom]
|
|
110
95
|
});
|
|
111
96
|
};
|
|
112
|
-
|
|
113
97
|
Layout.Header = LayoutHeader;
|
|
114
98
|
Layout.Footer = LayoutFooter;
|
|
115
99
|
export default Layout;
|
package/es/layout/style/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./index.less";
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
margin-top: 24px;
|
|
181
181
|
display: flex;
|
|
182
182
|
justify-content: space-between;
|
|
183
|
-
color:
|
|
183
|
+
color: @icon-color;
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
}
|
|
@@ -377,7 +377,7 @@
|
|
|
377
377
|
|
|
378
378
|
.footer-bottom {
|
|
379
379
|
text-align: center;
|
|
380
|
-
color:
|
|
380
|
+
color: @icon-color;
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
}
|
package/es/locale/en-US.js
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
import { locales } from
|
|
1
|
+
import { locales } from "./locale-provider";
|
|
2
2
|
export var staticLang = {
|
|
3
3
|
current: 'en-US'
|
|
4
4
|
};
|
|
5
|
-
|
|
6
5
|
var formatMessage = function formatMessage(props) {
|
|
7
6
|
var locale = locales[staticLang.current] || locales['en-US'];
|
|
8
7
|
var id = props.id,
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
values = props.values;
|
|
11
9
|
if (!values || !Object.keys(values).length) {
|
|
12
10
|
return locale[id] || id;
|
|
13
11
|
}
|
|
14
|
-
|
|
15
12
|
return (locale[id] || id).replaceAll(/\{(.+?)\}/g, function (_, name) {
|
|
16
13
|
return values[name];
|
|
17
14
|
});
|
|
18
15
|
};
|
|
19
|
-
|
|
20
16
|
export default formatMessage;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { useContext } from 'react';
|
|
2
|
-
import LocaleContext from
|
|
2
|
+
import LocaleContext from "./locale-context";
|
|
3
3
|
export default function (props) {
|
|
4
4
|
var _useContext = useContext(LocaleContext),
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
formatMessage = _useContext.formatMessage;
|
|
7
6
|
return formatMessage(props);
|
|
8
7
|
}
|
package/es/locale/id-ID.js
CHANGED
package/es/locale/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as LocaleProvider } from
|
|
2
|
-
export { default as LocaleContext } from
|
|
3
|
-
export { default as FormattedMessage } from
|
|
4
|
-
export { default as staticFormatMessage } from
|
|
1
|
+
export { default as LocaleProvider } from "./locale-provider";
|
|
2
|
+
export { default as LocaleContext } from "./locale-context";
|
|
3
|
+
export { default as FormattedMessage } from "./formatted-message";
|
|
4
|
+
export { default as staticFormatMessage } from "./format-message";
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { createContext } from 'react';
|
|
2
|
-
import { staticLang } from
|
|
2
|
+
import { staticLang } from "./format-message";
|
|
3
3
|
export default /*#__PURE__*/createContext({
|
|
4
4
|
currentLang: staticLang.current,
|
|
5
5
|
formatMessage: function formatMessage(_ref) {
|
|
6
6
|
var id = _ref.id,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
values = _ref.values;
|
|
9
8
|
if (!values || !Object.keys(values).length) {
|
|
10
9
|
return id;
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
return id.replaceAll(/\{(.+?)\}/g, function (_, name) {
|
|
14
12
|
return values[name];
|
|
15
13
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
2
|
export declare const locales: {
|
|
3
3
|
[key: string]: {
|
|
4
4
|
[id: string]: string;
|
|
@@ -6,5 +6,6 @@ export declare const locales: {
|
|
|
6
6
|
};
|
|
7
7
|
declare const LocaleProvider: FC<{
|
|
8
8
|
currentLang: string;
|
|
9
|
+
children?: ReactNode;
|
|
9
10
|
}>;
|
|
10
11
|
export default LocaleProvider;
|