@hkyhy/marsun-components-core 0.1.43 → 0.1.45
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/dist/_virtual/_cloneBuffer.js +5 -0
- package/dist/_virtual/_cloneBuffer.js.map +1 -0
- package/dist/_virtual/_commonjs-dynamic-modules.js +7 -0
- package/dist/_virtual/_commonjs-dynamic-modules.js.map +1 -0
- package/dist/_virtual/_commonjsHelpers.js +9 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/_nodeUtil.js +5 -0
- package/dist/_virtual/_nodeUtil.js.map +1 -0
- package/dist/_virtual/clone.js +8 -0
- package/dist/_virtual/clone.js.map +1 -0
- package/dist/_virtual/get.js +8 -0
- package/dist/_virtual/get.js.map +1 -0
- package/dist/_virtual/hoist-non-react-statics.cjs.js +3 -0
- package/dist/_virtual/hoist-non-react-statics.cjs.js.map +1 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/isBuffer.js +5 -0
- package/dist/_virtual/isBuffer.js.map +1 -0
- package/dist/_virtual/isEqual.js +8 -0
- package/dist/_virtual/isEqual.js.map +1 -0
- package/dist/_virtual/isNumber.js +8 -0
- package/dist/_virtual/isNumber.js.map +1 -0
- package/dist/_virtual/merge.js +8 -0
- package/dist/_virtual/merge.js.map +1 -0
- package/dist/_virtual/object_hash.js +8 -0
- package/dist/_virtual/object_hash.js.map +1 -0
- package/dist/_virtual/object_hash2.js +5 -0
- package/dist/_virtual/object_hash2.js.map +1 -0
- package/dist/_virtual/omit.js +8 -0
- package/dist/_virtual/omit.js.map +1 -0
- package/dist/_virtual/pick.js +8 -0
- package/dist/_virtual/pick.js.map +1 -0
- package/dist/_virtual/react-is.development.js +5 -0
- package/dist/_virtual/react-is.development.js.map +1 -0
- package/dist/_virtual/react-is.production.min.js +5 -0
- package/dist/_virtual/react-is.production.min.js.map +1 -0
- package/dist/_virtual/transform.js +8 -0
- package/dist/_virtual/transform.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/CitationMarkdownContent/index.js +13 -13
- package/dist/components/AgentHub/Chat/Detail/CitationPanel/index.js +2 -2
- package/dist/components/AgentHub/Chat/Modal/FormModal.js +11 -11
- package/dist/components/AgentHub/Chat/Modal/FormModal.js.map +1 -1
- package/dist/components/AgentHub/KnowledgeBase/Modal/FormModal.js +6 -6
- package/dist/components/AgentHub/KnowledgeBase/Modal/FormModal.js.map +1 -1
- package/dist/components/AgentHub/Report/Detail/ReportArchiveModal/index.d.ts +13 -0
- package/dist/components/AgentHub/Report/Detail/ReportArchiveModal/index.js +81 -0
- package/dist/components/AgentHub/Report/Detail/ReportArchiveModal/index.js.map +1 -0
- package/dist/components/AgentHub/Report/Detail/ReportArchiveModal/style.module.scss.js +11 -0
- package/dist/components/AgentHub/Report/Detail/ReportArchiveModal/style.module.scss.js.map +1 -0
- package/dist/components/AgentHub/Report/Detail/ReportExportLayout/index.d.ts +33 -0
- package/dist/components/AgentHub/Report/Detail/ReportExportLayout/index.js +113 -0
- package/dist/components/AgentHub/Report/Detail/ReportExportLayout/index.js.map +1 -0
- package/dist/components/AgentHub/Report/Detail/ReportExportLayout/style.module.scss.js +7 -0
- package/dist/components/AgentHub/Report/Detail/ReportExportLayout/style.module.scss.js.map +1 -0
- package/dist/components/AgentHub/Report/Detail/ReportHtmlPreview/index.d.ts +15 -0
- package/dist/components/AgentHub/Report/Detail/ReportHtmlPreview/index.js +105 -0
- package/dist/components/AgentHub/Report/Detail/ReportHtmlPreview/index.js.map +1 -0
- package/dist/components/AgentHub/Report/Detail/ReportHtmlPreview/style.module.scss.js +11 -0
- package/dist/components/AgentHub/Report/Detail/ReportHtmlPreview/style.module.scss.js.map +1 -0
- package/dist/components/AgentHub/Report/Detail/ReportVersionList/index.d.ts +14 -0
- package/dist/components/AgentHub/Report/Detail/ReportVersionList/index.js +91 -0
- package/dist/components/AgentHub/Report/Detail/ReportVersionList/index.js.map +1 -0
- package/dist/components/AgentHub/Report/Detail/ReportVersionList/style.module.scss.js +14 -0
- package/dist/components/AgentHub/Report/Detail/ReportVersionList/style.module.scss.js.map +1 -0
- package/dist/components/AgentHub/Report/Detail/ReportWorkspace/index.d.ts +13 -0
- package/dist/components/AgentHub/Report/Detail/ReportWorkspace/index.js +39 -0
- package/dist/components/AgentHub/Report/Detail/ReportWorkspace/index.js.map +1 -0
- package/dist/components/AgentHub/Report/Detail/ReportWorkspace/style.module.scss.js +9 -0
- package/dist/components/AgentHub/Report/Detail/ReportWorkspace/style.module.scss.js.map +1 -0
- package/dist/components/AgentHub/Report/Detail/index.d.ts +10 -0
- package/dist/components/AgentHub/Report/index.d.ts +1 -0
- package/dist/components/AgentHub/Report/types.d.ts +24 -0
- package/dist/components/Filter/CommonFilter/index.js +13 -13
- package/dist/components/Icons/index.js +14 -14
- package/dist/components/PermissionBindPanel/PermissionBindPanel.d.ts +20 -0
- package/dist/components/PermissionBindPanel/PermissionBindPanel.js +302 -0
- package/dist/components/PermissionBindPanel/PermissionBindPanel.js.map +1 -0
- package/dist/components/PermissionBindPanel/index.d.ts +3 -0
- package/dist/components/PermissionBindPanel/types.d.ts +29 -0
- package/dist/components/ReactFilter/AdvancedFilter/fields/CityFilterItem.d.ts +10 -0
- package/dist/components/ReactFilter/AdvancedFilter/fields/CityFilterItem.js +88 -0
- package/dist/components/ReactFilter/AdvancedFilter/fields/CityFilterItem.js.map +1 -0
- package/dist/components/ReactFilter/AdvancedFilter/fields/InputFilterItem.d.ts +4 -0
- package/dist/components/ReactFilter/AdvancedFilter/fields/InputFilterItem.js +40 -0
- package/dist/components/ReactFilter/AdvancedFilter/fields/InputFilterItem.js.map +1 -0
- package/dist/components/ReactFilter/AdvancedFilter/fields/ListFilterItem.d.ts +4 -0
- package/dist/components/ReactFilter/AdvancedFilter/fields/ListFilterItem.js +43 -0
- package/dist/components/ReactFilter/AdvancedFilter/fields/ListFilterItem.js.map +1 -0
- package/dist/components/ReactFilter/AdvancedFilter/fields/index.d.ts +9 -0
- package/dist/components/ReactFilter/AdvancedFilter/fields/index.js +8 -0
- package/dist/components/ReactFilter/AdvancedFilter/fields/index.js.map +1 -0
- package/dist/components/ReactFilter/AdvancedFilter/index.d.ts +6 -0
- package/dist/components/ReactFilter/AdvancedFilter/index.js +72 -0
- package/dist/components/ReactFilter/AdvancedFilter/index.js.map +1 -0
- package/dist/components/ReactFilter/Filter.d.ts +4 -0
- package/dist/components/ReactFilter/Filter.js +16 -0
- package/dist/components/ReactFilter/Filter.js.map +1 -0
- package/dist/components/ReactFilter/FilterItem.d.ts +7 -0
- package/dist/components/ReactFilter/FilterItem.js +26 -0
- package/dist/components/ReactFilter/FilterItem.js.map +1 -0
- package/dist/components/ReactFilter/FilterItemContainer.d.ts +5 -0
- package/dist/components/ReactFilter/FilterItemContainer.js +5 -0
- package/dist/components/ReactFilter/FilterItemContainer.js.map +1 -0
- package/dist/components/ReactFilter/FilterLines.d.ts +10 -0
- package/dist/components/ReactFilter/FilterLines.js +295 -0
- package/dist/components/ReactFilter/FilterLines.js.map +1 -0
- package/dist/components/ReactFilter/FilterOuter.d.ts +6 -0
- package/dist/components/ReactFilter/FilterOuter.js +28 -0
- package/dist/components/ReactFilter/FilterOuter.js.map +1 -0
- package/dist/components/ReactFilter/FilterProvider.d.ts +7 -0
- package/dist/components/ReactFilter/FilterProvider.js +26 -0
- package/dist/components/ReactFilter/FilterProvider.js.map +1 -0
- package/dist/components/ReactFilter/FilterValueDisplay.d.ts +4 -0
- package/dist/components/ReactFilter/FilterValueDisplay.js +185 -0
- package/dist/components/ReactFilter/FilterValueDisplay.js.map +1 -0
- package/dist/components/ReactFilter/PopoverItem.d.ts +4 -0
- package/dist/components/ReactFilter/PopoverItem.js +167 -0
- package/dist/components/ReactFilter/PopoverItem.js.map +1 -0
- package/dist/components/ReactFilter/SearchInput.d.ts +8 -0
- package/dist/components/ReactFilter/SearchInput.js +55 -0
- package/dist/components/ReactFilter/SearchInput.js.map +1 -0
- package/dist/components/ReactFilter/buildSelectTreeMapping.d.ts +9 -0
- package/dist/components/ReactFilter/buildSelectTreeMapping.js +24 -0
- package/dist/components/ReactFilter/buildSelectTreeMapping.js.map +1 -0
- package/dist/components/ReactFilter/common/TypeDateRangePickerField/index.d.ts +9 -0
- package/dist/components/ReactFilter/common/TypeDateRangePickerField/index.js +158 -0
- package/dist/components/ReactFilter/common/TypeDateRangePickerField/index.js.map +1 -0
- package/dist/components/ReactFilter/common/TypeDateRangePickerField/style.module.scss.js +9 -0
- package/dist/components/ReactFilter/common/TypeDateRangePickerField/style.module.scss.js.map +1 -0
- package/dist/components/ReactFilter/constants/mobilePopup.d.ts +2 -0
- package/dist/components/ReactFilter/constants/mobilePopup.js +6 -0
- package/dist/components/ReactFilter/constants/mobilePopup.js.map +1 -0
- package/dist/components/ReactFilter/context.d.ts +3 -0
- package/dist/components/ReactFilter/context.js +8 -0
- package/dist/components/ReactFilter/context.js.map +1 -0
- package/dist/components/ReactFilter/createFilterValueMapper.d.ts +29 -0
- package/dist/components/ReactFilter/createFilterValueMapper.js +33 -0
- package/dist/components/ReactFilter/createFilterValueMapper.js.map +1 -0
- package/dist/components/ReactFilter/entry.d.ts +24 -0
- package/dist/components/ReactFilter/entry.js +57 -0
- package/dist/components/ReactFilter/entry.js.map +1 -0
- package/dist/components/ReactFilter/fields/DatePickerFilterItem.d.ts +11 -0
- package/dist/components/ReactFilter/fields/DatePickerFilterItem.js +39 -0
- package/dist/components/ReactFilter/fields/DatePickerFilterItem.js.map +1 -0
- package/dist/components/ReactFilter/fields/DateRangePickerFilterItem.d.ts +11 -0
- package/dist/components/ReactFilter/fields/DateRangePickerFilterItem.js +42 -0
- package/dist/components/ReactFilter/fields/DateRangePickerFilterItem.js.map +1 -0
- package/dist/components/ReactFilter/fields/InputFilterItem.d.ts +4 -0
- package/dist/components/ReactFilter/fields/InputFilterItem.js +44 -0
- package/dist/components/ReactFilter/fields/InputFilterItem.js.map +1 -0
- package/dist/components/ReactFilter/fields/NumberRangeFilterItem.d.ts +4 -0
- package/dist/components/ReactFilter/fields/NumberRangeFilterItem.js +109 -0
- package/dist/components/ReactFilter/fields/NumberRangeFilterItem.js.map +1 -0
- package/dist/components/ReactFilter/fields/SelectTreeFilterItem.d.ts +9 -0
- package/dist/components/ReactFilter/fields/SelectTreeFilterItem.js +118 -0
- package/dist/components/ReactFilter/fields/SelectTreeFilterItem.js.map +1 -0
- package/dist/components/ReactFilter/fields/TypeDateRangePickerFilterItem.d.ts +4 -0
- package/dist/components/ReactFilter/fields/TypeDateRangePickerFilterItem.js +40 -0
- package/dist/components/ReactFilter/fields/TypeDateRangePickerFilterItem.js.map +1 -0
- package/dist/components/ReactFilter/fields/index.d.ts +58 -0
- package/dist/components/ReactFilter/fields/index.js +43 -0
- package/dist/components/ReactFilter/fields/index.js.map +1 -0
- package/dist/components/ReactFilter/filterClassNames.d.ts +30 -0
- package/dist/components/ReactFilter/filterClassNames.js +33 -0
- package/dist/components/ReactFilter/filterClassNames.js.map +1 -0
- package/dist/components/ReactFilter/filterInterceptors.d.ts +15 -0
- package/dist/components/ReactFilter/filterInterceptors.js +26 -0
- package/dist/components/ReactFilter/filterInterceptors.js.map +1 -0
- package/dist/components/ReactFilter/flattenSelectTreeOptions.d.ts +11 -0
- package/dist/components/ReactFilter/flattenSelectTreeOptions.js +22 -0
- package/dist/components/ReactFilter/flattenSelectTreeOptions.js.map +1 -0
- package/dist/components/ReactFilter/getFilterValue.d.ts +2 -0
- package/dist/components/ReactFilter/getFilterValue.js +12 -0
- package/dist/components/ReactFilter/getFilterValue.js.map +1 -0
- package/dist/components/ReactFilter/hooks/useFilterIsMobile.d.ts +6 -0
- package/dist/components/ReactFilter/hooks/useFilterIsMobile.js +9 -0
- package/dist/components/ReactFilter/hooks/useFilterIsMobile.js.map +1 -0
- package/dist/components/ReactFilter/hooks/useFilterPopupContainer.d.ts +15 -0
- package/dist/components/ReactFilter/hooks/useFilterPopupContainer.js +32 -0
- package/dist/components/ReactFilter/hooks/useFilterPopupContainer.js.map +1 -0
- package/dist/components/ReactFilter/hooks/useFilterViewportVars.d.ts +2 -0
- package/dist/components/ReactFilter/hooks/useFilterViewportVars.js +23 -0
- package/dist/components/ReactFilter/hooks/useFilterViewportVars.js.map +1 -0
- package/dist/components/ReactFilter/hooks/useHorizontalScrollShadows.d.ts +11 -0
- package/dist/components/ReactFilter/hooks/useHorizontalScrollShadows.js +49 -0
- package/dist/components/ReactFilter/hooks/useHorizontalScrollShadows.js.map +1 -0
- package/dist/components/ReactFilter/hooks/useResponsiveScrollListener.d.ts +2 -0
- package/dist/components/ReactFilter/hooks/useResponsiveScrollListener.js +25 -0
- package/dist/components/ReactFilter/hooks/useResponsiveScrollListener.js.map +1 -0
- package/dist/components/ReactFilter/hooks/useVisibleItemCount.d.ts +15 -0
- package/dist/components/ReactFilter/hooks/useVisibleItemCount.js +23 -0
- package/dist/components/ReactFilter/hooks/useVisibleItemCount.js.map +1 -0
- package/dist/components/ReactFilter/index.d.ts +7 -0
- package/dist/components/ReactFilter/locale/en-US.d.ts +29 -0
- package/dist/components/ReactFilter/locale/en-US.js +32 -0
- package/dist/components/ReactFilter/locale/en-US.js.map +1 -0
- package/dist/components/ReactFilter/locale/index.d.ts +59 -0
- package/dist/components/ReactFilter/locale/zh-CN.d.ts +29 -0
- package/dist/components/ReactFilter/locale/zh-CN.js +32 -0
- package/dist/components/ReactFilter/locale/zh-CN.js.map +1 -0
- package/dist/components/ReactFilter/normalizeFilterList.d.ts +12 -0
- package/dist/components/ReactFilter/normalizeFilterList.js +14 -0
- package/dist/components/ReactFilter/normalizeFilterList.js.map +1 -0
- package/dist/components/ReactFilter/pickSelectValues.d.ts +16 -0
- package/dist/components/ReactFilter/pickSelectValues.js +5 -0
- package/dist/components/ReactFilter/pickSelectValues.js.map +1 -0
- package/dist/components/ReactFilter/style.module.scss.js +75 -0
- package/dist/components/ReactFilter/style.module.scss.js.map +1 -0
- package/dist/components/ReactFilter/types.d.ts +10 -0
- package/dist/components/ReactFilter/useSearchParamsValue.d.ts +34 -0
- package/dist/components/ReactFilter/useSearchParamsValue.js +48 -0
- package/dist/components/ReactFilter/useSearchParamsValue.js.map +1 -0
- package/dist/components/ReactFilter/utils/getMobilePopupMetrics.d.ts +8 -0
- package/dist/components/ReactFilter/utils/getMobilePopupMetrics.js +26 -0
- package/dist/components/ReactFilter/utils/getMobilePopupMetrics.js.map +1 -0
- package/dist/components/ReactFilter/withFieldItem.d.ts +9 -0
- package/dist/components/ReactFilter/withFieldItem.js +178 -0
- package/dist/components/ReactFilter/withFieldItem.js.map +1 -0
- package/dist/components/ReactFilter/withFilterValue.d.ts +6 -0
- package/dist/components/ReactFilter/withFilterValue.js +23 -0
- package/dist/components/ReactFilter/withFilterValue.js.map +1 -0
- package/dist/components/ReactFilter/withLocale.d.ts +4 -0
- package/dist/components/ReactFilter/withLocale.js +15 -0
- package/dist/components/ReactFilter/withLocale.js.map +1 -0
- package/dist/components/Tour/AppTour/index.js +4 -4
- package/dist/components/Tour/AppTour/index.js.map +1 -1
- package/dist/components/Upload/index.js +29 -29
- package/dist/components/Upload/index.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +578 -500
- package/dist/index.js.map +1 -1
- package/dist/marsun-components-core.css +1 -1
- package/dist/node_modules/@ant-design/colors/es/generate.js +75 -0
- package/dist/node_modules/@ant-design/colors/es/generate.js.map +1 -0
- package/dist/node_modules/@ant-design/colors/es/presets.js +6 -0
- package/dist/node_modules/@ant-design/colors/es/presets.js.map +1 -0
- package/dist/node_modules/@ant-design/fast-color/es/FastColor.js +327 -0
- package/dist/node_modules/@ant-design/fast-color/es/FastColor.js.map +1 -0
- package/dist/node_modules/@ant-design/icons/es/components/AntdIcon.js +42 -0
- package/dist/node_modules/@ant-design/icons/es/components/AntdIcon.js.map +1 -0
- package/dist/node_modules/@ant-design/icons/es/components/Context.js +6 -0
- package/dist/node_modules/@ant-design/icons/es/components/Context.js.map +1 -0
- package/dist/node_modules/@ant-design/icons/es/components/IconBase.js +46 -0
- package/dist/node_modules/@ant-design/icons/es/components/IconBase.js.map +1 -0
- package/dist/node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js +19 -0
- package/dist/node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js.map +1 -0
- package/dist/node_modules/@ant-design/icons/es/icons/CheckOutlined.js +15 -0
- package/dist/node_modules/@ant-design/icons/es/icons/CheckOutlined.js.map +1 -0
- package/dist/node_modules/@ant-design/icons/es/icons/DownOutlined.js +15 -0
- package/dist/node_modules/@ant-design/icons/es/icons/DownOutlined.js.map +1 -0
- package/dist/node_modules/@ant-design/icons/es/icons/UpOutlined.js +15 -0
- package/dist/node_modules/@ant-design/icons/es/icons/UpOutlined.js.map +1 -0
- package/dist/node_modules/@ant-design/icons/es/utils.js +130 -0
- package/dist/node_modules/@ant-design/icons/es/utils.js.map +1 -0
- package/dist/node_modules/@ant-design/icons-svg/es/asn/CheckOutlined.js +5 -0
- package/dist/node_modules/@ant-design/icons-svg/es/asn/CheckOutlined.js.map +1 -0
- package/dist/node_modules/@ant-design/icons-svg/es/asn/DownOutlined.js +5 -0
- package/dist/node_modules/@ant-design/icons-svg/es/asn/DownOutlined.js.map +1 -0
- package/dist/node_modules/@ant-design/icons-svg/es/asn/UpOutlined.js +5 -0
- package/dist/node_modules/@ant-design/icons-svg/es/asn/UpOutlined.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +9 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +7 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.js +13 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +13 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +22 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +8 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +26 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/objectSpread2.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +14 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +13 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +11 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/slicedToArray.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +15 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +10 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js +12 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +12 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js.map +1 -0
- package/dist/node_modules/@formatjs/ecma402-abstract/lib/utils.js +45 -0
- package/dist/node_modules/@formatjs/ecma402-abstract/lib/utils.js.map +1 -0
- package/dist/node_modules/@formatjs/fast-memoize/lib/index.js +52 -0
- package/dist/node_modules/@formatjs/fast-memoize/lib/index.js.map +1 -0
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/date-time-pattern-generator.js +42 -0
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/date-time-pattern-generator.js.map +1 -0
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/error.js +8 -0
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/error.js.map +1 -0
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/index.js +39 -0
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/index.js.map +1 -0
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/parser.js +586 -0
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/parser.js.map +1 -0
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js +5 -0
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js.map +1 -0
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/time-data.generated.js +1419 -0
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/time-data.generated.js.map +1 -0
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/types.js +57 -0
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/types.js.map +1 -0
- package/dist/node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js +113 -0
- package/dist/node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js.map +1 -0
- package/dist/node_modules/@formatjs/icu-skeleton-parser/lib/number.js +219 -0
- package/dist/node_modules/@formatjs/icu-skeleton-parser/lib/number.js.map +1 -0
- package/dist/node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js +5 -0
- package/dist/node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js.map +1 -0
- package/dist/node_modules/@formatjs/intl/lib/src/create-intl.js +45 -0
- package/dist/node_modules/@formatjs/intl/lib/src/create-intl.js.map +1 -0
- package/dist/node_modules/@formatjs/intl/lib/src/dateTime.js +94 -0
- package/dist/node_modules/@formatjs/intl/lib/src/dateTime.js.map +1 -0
- package/dist/node_modules/@formatjs/intl/lib/src/displayName.js +25 -0
- package/dist/node_modules/@formatjs/intl/lib/src/displayName.js.map +1 -0
- package/dist/node_modules/@formatjs/intl/lib/src/error.js +96 -0
- package/dist/node_modules/@formatjs/intl/lib/src/error.js.map +1 -0
- package/dist/node_modules/@formatjs/intl/lib/src/list.js +48 -0
- package/dist/node_modules/@formatjs/intl/lib/src/list.js.map +1 -0
- package/dist/node_modules/@formatjs/intl/lib/src/message.js +70 -0
- package/dist/node_modules/@formatjs/intl/lib/src/message.js.map +1 -0
- package/dist/node_modules/@formatjs/intl/lib/src/number.js +58 -0
- package/dist/node_modules/@formatjs/intl/lib/src/number.js.map +1 -0
- package/dist/node_modules/@formatjs/intl/lib/src/plural.js +21 -0
- package/dist/node_modules/@formatjs/intl/lib/src/plural.js.map +1 -0
- package/dist/node_modules/@formatjs/intl/lib/src/relativeTime.js +27 -0
- package/dist/node_modules/@formatjs/intl/lib/src/relativeTime.js.map +1 -0
- package/dist/node_modules/@formatjs/intl/lib/src/utils.js +126 -0
- package/dist/node_modules/@formatjs/intl/lib/src/utils.js.map +1 -0
- package/dist/node_modules/@kne/global-context/dist/index.modern.js +62 -0
- package/dist/node_modules/@kne/global-context/dist/index.modern.js.map +1 -0
- package/dist/node_modules/@kne/react-fetch/dist/index.modern.js +483 -0
- package/dist/node_modules/@kne/react-fetch/dist/index.modern.js.map +1 -0
- package/dist/node_modules/@kne/react-intl/dist/index.modern.js +173 -0
- package/dist/node_modules/@kne/react-intl/dist/index.modern.js.map +1 -0
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/index.js +9 -0
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/index.js.map +1 -0
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/createFormattedComponent.js +36 -0
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/createFormattedComponent.js.map +1 -0
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/createIntl.js +49 -0
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/createIntl.js.map +1 -0
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/injectIntl.js +10 -0
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/injectIntl.js.map +1 -0
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/provider.js +49 -0
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/provider.js.map +1 -0
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/useIntl.js +11 -0
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/useIntl.js.map +1 -0
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/utils.js +35 -0
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/utils.js.map +1 -0
- package/dist/node_modules/@kne/responsive-utils/dist/index.modern.js +239 -0
- package/dist/node_modules/@kne/responsive-utils/dist/index.modern.js.map +1 -0
- package/dist/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +71 -0
- package/dist/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js.map +1 -0
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js +96 -0
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js.map +1 -0
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js +79 -0
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js.map +1 -0
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +11 -0
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/index.js.map +1 -0
- package/dist/node_modules/intl-messageformat/lib/src/core.js +176 -0
- package/dist/node_modules/intl-messageformat/lib/src/core.js.map +1 -0
- package/dist/node_modules/intl-messageformat/lib/src/error.js +53 -0
- package/dist/node_modules/intl-messageformat/lib/src/error.js.map +1 -0
- package/dist/node_modules/intl-messageformat/lib/src/formatters.js +121 -0
- package/dist/node_modules/intl-messageformat/lib/src/formatters.js.map +1 -0
- package/dist/node_modules/lodash/_DataView.js +13 -0
- package/dist/node_modules/lodash/_DataView.js.map +1 -0
- package/dist/node_modules/lodash/_Hash.js +23 -0
- package/dist/node_modules/lodash/_Hash.js.map +1 -0
- package/dist/node_modules/lodash/_ListCache.js +23 -0
- package/dist/node_modules/lodash/_ListCache.js.map +1 -0
- package/dist/node_modules/lodash/_Map.js +13 -0
- package/dist/node_modules/lodash/_Map.js.map +1 -0
- package/dist/node_modules/lodash/_MapCache.js +23 -0
- package/dist/node_modules/lodash/_MapCache.js.map +1 -0
- package/dist/node_modules/lodash/_Promise.js +13 -0
- package/dist/node_modules/lodash/_Promise.js.map +1 -0
- package/dist/node_modules/lodash/_Set.js +13 -0
- package/dist/node_modules/lodash/_Set.js.map +1 -0
- package/dist/node_modules/lodash/_SetCache.js +19 -0
- package/dist/node_modules/lodash/_SetCache.js.map +1 -0
- package/dist/node_modules/lodash/_Stack.js +21 -0
- package/dist/node_modules/lodash/_Stack.js.map +1 -0
- package/dist/node_modules/lodash/_Symbol.js +12 -0
- package/dist/node_modules/lodash/_Symbol.js.map +1 -0
- package/dist/node_modules/lodash/_Uint8Array.js +12 -0
- package/dist/node_modules/lodash/_Uint8Array.js.map +1 -0
- package/dist/node_modules/lodash/_WeakMap.js +13 -0
- package/dist/node_modules/lodash/_WeakMap.js.map +1 -0
- package/dist/node_modules/lodash/_apply.js +23 -0
- package/dist/node_modules/lodash/_apply.js.map +1 -0
- package/dist/node_modules/lodash/_arrayEach.js +15 -0
- package/dist/node_modules/lodash/_arrayEach.js.map +1 -0
- package/dist/node_modules/lodash/_arrayFilter.js +17 -0
- package/dist/node_modules/lodash/_arrayFilter.js.map +1 -0
- package/dist/node_modules/lodash/_arrayLikeKeys.js +27 -0
- package/dist/node_modules/lodash/_arrayLikeKeys.js.map +1 -0
- package/dist/node_modules/lodash/_arrayMap.js +15 -0
- package/dist/node_modules/lodash/_arrayMap.js.map +1 -0
- package/dist/node_modules/lodash/_arrayPush.js +15 -0
- package/dist/node_modules/lodash/_arrayPush.js.map +1 -0
- package/dist/node_modules/lodash/_arraySome.js +16 -0
- package/dist/node_modules/lodash/_arraySome.js.map +1 -0
- package/dist/node_modules/lodash/_assignMergeValue.js +16 -0
- package/dist/node_modules/lodash/_assignMergeValue.js.map +1 -0
- package/dist/node_modules/lodash/_assignValue.js +17 -0
- package/dist/node_modules/lodash/_assignValue.js.map +1 -0
- package/dist/node_modules/lodash/_assocIndexOf.js +18 -0
- package/dist/node_modules/lodash/_assocIndexOf.js.map +1 -0
- package/dist/node_modules/lodash/_baseAssign.js +16 -0
- package/dist/node_modules/lodash/_baseAssign.js.map +1 -0
- package/dist/node_modules/lodash/_baseAssignIn.js +16 -0
- package/dist/node_modules/lodash/_baseAssignIn.js.map +1 -0
- package/dist/node_modules/lodash/_baseAssignValue.js +20 -0
- package/dist/node_modules/lodash/_baseAssignValue.js.map +1 -0
- package/dist/node_modules/lodash/_baseClone.js +71 -0
- package/dist/node_modules/lodash/_baseClone.js.map +1 -0
- package/dist/node_modules/lodash/_baseCreate.js +24 -0
- package/dist/node_modules/lodash/_baseCreate.js.map +1 -0
- package/dist/node_modules/lodash/_baseFlatten.js +21 -0
- package/dist/node_modules/lodash/_baseFlatten.js.map +1 -0
- package/dist/node_modules/lodash/_baseFor.js +12 -0
- package/dist/node_modules/lodash/_baseFor.js.map +1 -0
- package/dist/node_modules/lodash/_baseForOwn.js +16 -0
- package/dist/node_modules/lodash/_baseForOwn.js.map +1 -0
- package/dist/node_modules/lodash/_baseGet.js +19 -0
- package/dist/node_modules/lodash/_baseGet.js.map +1 -0
- package/dist/node_modules/lodash/_baseGetAllKeys.js +17 -0
- package/dist/node_modules/lodash/_baseGetAllKeys.js.map +1 -0
- package/dist/node_modules/lodash/_baseGetTag.js +17 -0
- package/dist/node_modules/lodash/_baseGetTag.js.map +1 -0
- package/dist/node_modules/lodash/_baseHasIn.js +13 -0
- package/dist/node_modules/lodash/_baseHasIn.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsArguments.js +16 -0
- package/dist/node_modules/lodash/_baseIsArguments.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsEqual.js +16 -0
- package/dist/node_modules/lodash/_baseIsEqual.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsEqualDeep.js +39 -0
- package/dist/node_modules/lodash/_baseIsEqualDeep.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsMap.js +16 -0
- package/dist/node_modules/lodash/_baseIsMap.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsMatch.js +38 -0
- package/dist/node_modules/lodash/_baseIsMatch.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsNative.js +23 -0
- package/dist/node_modules/lodash/_baseIsNative.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsSet.js +16 -0
- package/dist/node_modules/lodash/_baseIsSet.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsTypedArray.js +18 -0
- package/dist/node_modules/lodash/_baseIsTypedArray.js.map +1 -0
- package/dist/node_modules/lodash/_baseIteratee.js +19 -0
- package/dist/node_modules/lodash/_baseIteratee.js.map +1 -0
- package/dist/node_modules/lodash/_baseKeys.js +21 -0
- package/dist/node_modules/lodash/_baseKeys.js.map +1 -0
- package/dist/node_modules/lodash/_baseKeysIn.js +22 -0
- package/dist/node_modules/lodash/_baseKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_baseMatches.js +20 -0
- package/dist/node_modules/lodash/_baseMatches.js.map +1 -0
- package/dist/node_modules/lodash/_baseMatchesProperty.js +24 -0
- package/dist/node_modules/lodash/_baseMatchesProperty.js.map +1 -0
- package/dist/node_modules/lodash/_baseMerge.js +28 -0
- package/dist/node_modules/lodash/_baseMerge.js.map +1 -0
- package/dist/node_modules/lodash/_baseMergeDeep.js +39 -0
- package/dist/node_modules/lodash/_baseMergeDeep.js.map +1 -0
- package/dist/node_modules/lodash/_basePick.js +18 -0
- package/dist/node_modules/lodash/_basePick.js.map +1 -0
- package/dist/node_modules/lodash/_basePickBy.js +21 -0
- package/dist/node_modules/lodash/_basePickBy.js.map +1 -0
- package/dist/node_modules/lodash/_baseProperty.js +15 -0
- package/dist/node_modules/lodash/_baseProperty.js.map +1 -0
- package/dist/node_modules/lodash/_basePropertyDeep.js +17 -0
- package/dist/node_modules/lodash/_basePropertyDeep.js.map +1 -0
- package/dist/node_modules/lodash/_baseRest.js +17 -0
- package/dist/node_modules/lodash/_baseRest.js.map +1 -0
- package/dist/node_modules/lodash/_baseSet.js +32 -0
- package/dist/node_modules/lodash/_baseSet.js.map +1 -0
- package/dist/node_modules/lodash/_baseSetToString.js +21 -0
- package/dist/node_modules/lodash/_baseSetToString.js.map +1 -0
- package/dist/node_modules/lodash/_baseSlice.js +17 -0
- package/dist/node_modules/lodash/_baseSlice.js.map +1 -0
- package/dist/node_modules/lodash/_baseTimes.js +15 -0
- package/dist/node_modules/lodash/_baseTimes.js.map +1 -0
- package/dist/node_modules/lodash/_baseToString.js +25 -0
- package/dist/node_modules/lodash/_baseToString.js.map +1 -0
- package/dist/node_modules/lodash/_baseUnary.js +15 -0
- package/dist/node_modules/lodash/_baseUnary.js.map +1 -0
- package/dist/node_modules/lodash/_baseUnset.js +28 -0
- package/dist/node_modules/lodash/_baseUnset.js.map +1 -0
- package/dist/node_modules/lodash/_cacheHas.js +13 -0
- package/dist/node_modules/lodash/_cacheHas.js.map +1 -0
- package/dist/node_modules/lodash/_castPath.js +18 -0
- package/dist/node_modules/lodash/_castPath.js.map +1 -0
- package/dist/node_modules/lodash/_cloneArrayBuffer.js +16 -0
- package/dist/node_modules/lodash/_cloneArrayBuffer.js.map +1 -0
- package/dist/node_modules/lodash/_cloneBuffer.js +20 -0
- package/dist/node_modules/lodash/_cloneBuffer.js.map +1 -0
- package/dist/node_modules/lodash/_cloneDataView.js +16 -0
- package/dist/node_modules/lodash/_cloneDataView.js.map +1 -0
- package/dist/node_modules/lodash/_cloneRegExp.js +15 -0
- package/dist/node_modules/lodash/_cloneRegExp.js.map +1 -0
- package/dist/node_modules/lodash/_cloneSymbol.js +15 -0
- package/dist/node_modules/lodash/_cloneSymbol.js.map +1 -0
- package/dist/node_modules/lodash/_cloneTypedArray.js +16 -0
- package/dist/node_modules/lodash/_cloneTypedArray.js.map +1 -0
- package/dist/node_modules/lodash/_copyArray.js +16 -0
- package/dist/node_modules/lodash/_copyArray.js.map +1 -0
- package/dist/node_modules/lodash/_copyObject.js +22 -0
- package/dist/node_modules/lodash/_copyObject.js.map +1 -0
- package/dist/node_modules/lodash/_copySymbols.js +16 -0
- package/dist/node_modules/lodash/_copySymbols.js.map +1 -0
- package/dist/node_modules/lodash/_copySymbolsIn.js +16 -0
- package/dist/node_modules/lodash/_copySymbolsIn.js.map +1 -0
- package/dist/node_modules/lodash/_coreJsData.js +12 -0
- package/dist/node_modules/lodash/_coreJsData.js.map +1 -0
- package/dist/node_modules/lodash/_createAssigner.js +23 -0
- package/dist/node_modules/lodash/_createAssigner.js.map +1 -0
- package/dist/node_modules/lodash/_createBaseFor.js +20 -0
- package/dist/node_modules/lodash/_createBaseFor.js.map +1 -0
- package/dist/node_modules/lodash/_customOmitClone.js +15 -0
- package/dist/node_modules/lodash/_customOmitClone.js.map +1 -0
- package/dist/node_modules/lodash/_defineProperty.js +18 -0
- package/dist/node_modules/lodash/_defineProperty.js.map +1 -0
- package/dist/node_modules/lodash/_equalArrays.js +47 -0
- package/dist/node_modules/lodash/_equalArrays.js.map +1 -0
- package/dist/node_modules/lodash/_equalByTag.js +52 -0
- package/dist/node_modules/lodash/_equalByTag.js.map +1 -0
- package/dist/node_modules/lodash/_equalObjects.js +43 -0
- package/dist/node_modules/lodash/_equalObjects.js.map +1 -0
- package/dist/node_modules/lodash/_flatRest.js +17 -0
- package/dist/node_modules/lodash/_flatRest.js.map +1 -0
- package/dist/node_modules/lodash/_freeGlobal.js +12 -0
- package/dist/node_modules/lodash/_freeGlobal.js.map +1 -0
- package/dist/node_modules/lodash/_getAllKeys.js +17 -0
- package/dist/node_modules/lodash/_getAllKeys.js.map +1 -0
- package/dist/node_modules/lodash/_getAllKeysIn.js +17 -0
- package/dist/node_modules/lodash/_getAllKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_getMapData.js +16 -0
- package/dist/node_modules/lodash/_getMapData.js.map +1 -0
- package/dist/node_modules/lodash/_getMatchData.js +20 -0
- package/dist/node_modules/lodash/_getMatchData.js.map +1 -0
- package/dist/node_modules/lodash/_getNative.js +17 -0
- package/dist/node_modules/lodash/_getNative.js.map +1 -0
- package/dist/node_modules/lodash/_getPrototype.js +12 -0
- package/dist/node_modules/lodash/_getPrototype.js.map +1 -0
- package/dist/node_modules/lodash/_getRawTag.js +22 -0
- package/dist/node_modules/lodash/_getRawTag.js.map +1 -0
- package/dist/node_modules/lodash/_getSymbols.js +17 -0
- package/dist/node_modules/lodash/_getSymbols.js.map +1 -0
- package/dist/node_modules/lodash/_getSymbolsIn.js +19 -0
- package/dist/node_modules/lodash/_getSymbolsIn.js.map +1 -0
- package/dist/node_modules/lodash/_getTag.js +34 -0
- package/dist/node_modules/lodash/_getTag.js.map +1 -0
- package/dist/node_modules/lodash/_getValue.js +13 -0
- package/dist/node_modules/lodash/_getValue.js.map +1 -0
- package/dist/node_modules/lodash/_hasPath.js +27 -0
- package/dist/node_modules/lodash/_hasPath.js.map +1 -0
- package/dist/node_modules/lodash/_hashClear.js +15 -0
- package/dist/node_modules/lodash/_hashClear.js.map +1 -0
- package/dist/node_modules/lodash/_hashDelete.js +14 -0
- package/dist/node_modules/lodash/_hashDelete.js.map +1 -0
- package/dist/node_modules/lodash/_hashGet.js +20 -0
- package/dist/node_modules/lodash/_hashGet.js.map +1 -0
- package/dist/node_modules/lodash/_hashHas.js +16 -0
- package/dist/node_modules/lodash/_hashHas.js.map +1 -0
- package/dist/node_modules/lodash/_hashSet.js +16 -0
- package/dist/node_modules/lodash/_hashSet.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneArray.js +15 -0
- package/dist/node_modules/lodash/_initCloneArray.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneByTag.js +49 -0
- package/dist/node_modules/lodash/_initCloneByTag.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneObject.js +17 -0
- package/dist/node_modules/lodash/_initCloneObject.js.map +1 -0
- package/dist/node_modules/lodash/_isFlattenable.js +17 -0
- package/dist/node_modules/lodash/_isFlattenable.js.map +1 -0
- package/dist/node_modules/lodash/_isIndex.js +15 -0
- package/dist/node_modules/lodash/_isIndex.js.map +1 -0
- package/dist/node_modules/lodash/_isIterateeCall.js +21 -0
- package/dist/node_modules/lodash/_isIterateeCall.js.map +1 -0
- package/dist/node_modules/lodash/_isKey.js +19 -0
- package/dist/node_modules/lodash/_isKey.js.map +1 -0
- package/dist/node_modules/lodash/_isKeyable.js +14 -0
- package/dist/node_modules/lodash/_isKeyable.js.map +1 -0
- package/dist/node_modules/lodash/_isMasked.js +18 -0
- package/dist/node_modules/lodash/_isMasked.js.map +1 -0
- package/dist/node_modules/lodash/_isPrototype.js +15 -0
- package/dist/node_modules/lodash/_isPrototype.js.map +1 -0
- package/dist/node_modules/lodash/_isStrictComparable.js +15 -0
- package/dist/node_modules/lodash/_isStrictComparable.js.map +1 -0
- package/dist/node_modules/lodash/_listCacheClear.js +13 -0
- package/dist/node_modules/lodash/_listCacheClear.js.map +1 -0
- package/dist/node_modules/lodash/_listCacheDelete.js +19 -0
- package/dist/node_modules/lodash/_listCacheDelete.js.map +1 -0
- package/dist/node_modules/lodash/_listCacheGet.js +16 -0
- package/dist/node_modules/lodash/_listCacheGet.js.map +1 -0
- package/dist/node_modules/lodash/_listCacheHas.js +15 -0
- package/dist/node_modules/lodash/_listCacheHas.js.map +1 -0
- package/dist/node_modules/lodash/_listCacheSet.js +16 -0
- package/dist/node_modules/lodash/_listCacheSet.js.map +1 -0
- package/dist/node_modules/lodash/_mapCacheClear.js +21 -0
- package/dist/node_modules/lodash/_mapCacheClear.js.map +1 -0
- package/dist/node_modules/lodash/_mapCacheDelete.js +16 -0
- package/dist/node_modules/lodash/_mapCacheDelete.js.map +1 -0
- package/dist/node_modules/lodash/_mapCacheGet.js +15 -0
- package/dist/node_modules/lodash/_mapCacheGet.js.map +1 -0
- package/dist/node_modules/lodash/_mapCacheHas.js +15 -0
- package/dist/node_modules/lodash/_mapCacheHas.js.map +1 -0
- package/dist/node_modules/lodash/_mapCacheSet.js +16 -0
- package/dist/node_modules/lodash/_mapCacheSet.js.map +1 -0
- package/dist/node_modules/lodash/_mapToArray.js +16 -0
- package/dist/node_modules/lodash/_mapToArray.js.map +1 -0
- package/dist/node_modules/lodash/_matchesStrictComparable.js +15 -0
- package/dist/node_modules/lodash/_matchesStrictComparable.js.map +1 -0
- package/dist/node_modules/lodash/_memoizeCapped.js +18 -0
- package/dist/node_modules/lodash/_memoizeCapped.js.map +1 -0
- package/dist/node_modules/lodash/_nativeCreate.js +12 -0
- package/dist/node_modules/lodash/_nativeCreate.js.map +1 -0
- package/dist/node_modules/lodash/_nativeKeys.js +12 -0
- package/dist/node_modules/lodash/_nativeKeys.js.map +1 -0
- package/dist/node_modules/lodash/_nativeKeysIn.js +17 -0
- package/dist/node_modules/lodash/_nativeKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_nodeUtil.js +20 -0
- package/dist/node_modules/lodash/_nodeUtil.js.map +1 -0
- package/dist/node_modules/lodash/_objectToString.js +14 -0
- package/dist/node_modules/lodash/_objectToString.js.map +1 -0
- package/dist/node_modules/lodash/_overArg.js +15 -0
- package/dist/node_modules/lodash/_overArg.js.map +1 -0
- package/dist/node_modules/lodash/_overRest.js +22 -0
- package/dist/node_modules/lodash/_overRest.js.map +1 -0
- package/dist/node_modules/lodash/_parent.js +16 -0
- package/dist/node_modules/lodash/_parent.js.map +1 -0
- package/dist/node_modules/lodash/_root.js +12 -0
- package/dist/node_modules/lodash/_root.js.map +1 -0
- package/dist/node_modules/lodash/_safeGet.js +14 -0
- package/dist/node_modules/lodash/_safeGet.js.map +1 -0
- package/dist/node_modules/lodash/_setCacheAdd.js +14 -0
- package/dist/node_modules/lodash/_setCacheAdd.js.map +1 -0
- package/dist/node_modules/lodash/_setCacheHas.js +13 -0
- package/dist/node_modules/lodash/_setCacheHas.js.map +1 -0
- package/dist/node_modules/lodash/_setToArray.js +16 -0
- package/dist/node_modules/lodash/_setToArray.js.map +1 -0
- package/dist/node_modules/lodash/_setToString.js +13 -0
- package/dist/node_modules/lodash/_setToString.js.map +1 -0
- package/dist/node_modules/lodash/_shortOut.js +23 -0
- package/dist/node_modules/lodash/_shortOut.js.map +1 -0
- package/dist/node_modules/lodash/_stackClear.js +15 -0
- package/dist/node_modules/lodash/_stackClear.js.map +1 -0
- package/dist/node_modules/lodash/_stackDelete.js +14 -0
- package/dist/node_modules/lodash/_stackDelete.js.map +1 -0
- package/dist/node_modules/lodash/_stackGet.js +13 -0
- package/dist/node_modules/lodash/_stackGet.js.map +1 -0
- package/dist/node_modules/lodash/_stackHas.js +13 -0
- package/dist/node_modules/lodash/_stackHas.js.map +1 -0
- package/dist/node_modules/lodash/_stackSet.js +24 -0
- package/dist/node_modules/lodash/_stackSet.js.map +1 -0
- package/dist/node_modules/lodash/_stringToPath.js +17 -0
- package/dist/node_modules/lodash/_stringToPath.js.map +1 -0
- package/dist/node_modules/lodash/_toKey.js +18 -0
- package/dist/node_modules/lodash/_toKey.js.map +1 -0
- package/dist/node_modules/lodash/_toSource.js +24 -0
- package/dist/node_modules/lodash/_toSource.js.map +1 -0
- package/dist/node_modules/lodash/clone.js +15 -0
- package/dist/node_modules/lodash/clone.js.map +1 -0
- package/dist/node_modules/lodash/constant.js +15 -0
- package/dist/node_modules/lodash/constant.js.map +1 -0
- package/dist/node_modules/lodash/eq.js +13 -0
- package/dist/node_modules/lodash/eq.js.map +1 -0
- package/dist/node_modules/lodash/flatten.js +16 -0
- package/dist/node_modules/lodash/flatten.js.map +1 -0
- package/dist/node_modules/lodash/get.js +16 -0
- package/dist/node_modules/lodash/get.js.map +1 -0
- package/dist/node_modules/lodash/hasIn.js +16 -0
- package/dist/node_modules/lodash/hasIn.js.map +1 -0
- package/dist/node_modules/lodash/identity.js +13 -0
- package/dist/node_modules/lodash/identity.js.map +1 -0
- package/dist/node_modules/lodash/isArguments.js +17 -0
- package/dist/node_modules/lodash/isArguments.js.map +1 -0
- package/dist/node_modules/lodash/isArray.js +11 -0
- package/dist/node_modules/lodash/isArray.js.map +1 -0
- package/dist/node_modules/lodash/isArrayLike.js +16 -0
- package/dist/node_modules/lodash/isArrayLike.js.map +1 -0
- package/dist/node_modules/lodash/isArrayLikeObject.js +16 -0
- package/dist/node_modules/lodash/isArrayLikeObject.js.map +1 -0
- package/dist/node_modules/lodash/isBuffer.js +15 -0
- package/dist/node_modules/lodash/isBuffer.js.map +1 -0
- package/dist/node_modules/lodash/isEqual.js +15 -0
- package/dist/node_modules/lodash/isEqual.js.map +1 -0
- package/dist/node_modules/lodash/isFunction.js +19 -0
- package/dist/node_modules/lodash/isFunction.js.map +1 -0
- package/dist/node_modules/lodash/isLength.js +14 -0
- package/dist/node_modules/lodash/isLength.js.map +1 -0
- package/dist/node_modules/lodash/isMap.js +14 -0
- package/dist/node_modules/lodash/isMap.js.map +1 -0
- package/dist/node_modules/lodash/isNumber.js +16 -0
- package/dist/node_modules/lodash/isNumber.js.map +1 -0
- package/dist/node_modules/lodash/isObject.js +14 -0
- package/dist/node_modules/lodash/isObject.js.map +1 -0
- package/dist/node_modules/lodash/isObjectLike.js +13 -0
- package/dist/node_modules/lodash/isObjectLike.js.map +1 -0
- package/dist/node_modules/lodash/isPlainObject.js +23 -0
- package/dist/node_modules/lodash/isPlainObject.js.map +1 -0
- package/dist/node_modules/lodash/isSet.js +14 -0
- package/dist/node_modules/lodash/isSet.js.map +1 -0
- package/dist/node_modules/lodash/isSymbol.js +16 -0
- package/dist/node_modules/lodash/isSymbol.js.map +1 -0
- package/dist/node_modules/lodash/isTypedArray.js +14 -0
- package/dist/node_modules/lodash/isTypedArray.js.map +1 -0
- package/dist/node_modules/lodash/keys.js +17 -0
- package/dist/node_modules/lodash/keys.js.map +1 -0
- package/dist/node_modules/lodash/keysIn.js +17 -0
- package/dist/node_modules/lodash/keysIn.js.map +1 -0
- package/dist/node_modules/lodash/last.js +14 -0
- package/dist/node_modules/lodash/last.js.map +1 -0
- package/dist/node_modules/lodash/memoize.js +24 -0
- package/dist/node_modules/lodash/memoize.js.map +1 -0
- package/dist/node_modules/lodash/merge.js +15 -0
- package/dist/node_modules/lodash/merge.js.map +1 -0
- package/dist/node_modules/lodash/omit.js +30 -0
- package/dist/node_modules/lodash/omit.js.map +1 -0
- package/dist/node_modules/lodash/pick.js +15 -0
- package/dist/node_modules/lodash/pick.js.map +1 -0
- package/dist/node_modules/lodash/property.js +18 -0
- package/dist/node_modules/lodash/property.js.map +1 -0
- package/dist/node_modules/lodash/stubArray.js +13 -0
- package/dist/node_modules/lodash/stubArray.js.map +1 -0
- package/dist/node_modules/lodash/stubFalse.js +13 -0
- package/dist/node_modules/lodash/stubFalse.js.map +1 -0
- package/dist/node_modules/lodash/toPlainObject.js +16 -0
- package/dist/node_modules/lodash/toPlainObject.js.map +1 -0
- package/dist/node_modules/lodash/toString.js +15 -0
- package/dist/node_modules/lodash/toString.js.map +1 -0
- package/dist/node_modules/lodash/transform.js +31 -0
- package/dist/node_modules/lodash/transform.js.map +1 -0
- package/dist/node_modules/object-hash/dist/object_hash.js +783 -0
- package/dist/node_modules/object-hash/dist/object_hash.js.map +1 -0
- package/dist/node_modules/rc-util/es/Dom/canUseDom.js +7 -0
- package/dist/node_modules/rc-util/es/Dom/canUseDom.js.map +1 -0
- package/dist/node_modules/rc-util/es/Dom/contains.js +16 -0
- package/dist/node_modules/rc-util/es/Dom/contains.js.map +1 -0
- package/dist/node_modules/rc-util/es/Dom/dynamicCSS.js +80 -0
- package/dist/node_modules/rc-util/es/Dom/dynamicCSS.js.map +1 -0
- package/dist/node_modules/rc-util/es/Dom/shadow.js +15 -0
- package/dist/node_modules/rc-util/es/Dom/shadow.js.map +1 -0
- package/dist/node_modules/rc-util/es/warning.js +45 -0
- package/dist/node_modules/rc-util/es/warning.js.map +1 -0
- package/dist/node_modules/tslib/tslib.es6.js +45 -0
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/styles/global.css +1 -1
- package/dist/utils/date.d.ts +5 -0
- package/dist/utils/date.js +27 -19
- package/dist/utils/date.js.map +1 -1
- package/package.json +5 -2
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export default useSearchParamsValue;
|
|
2
|
+
/**
|
|
3
|
+
* 从 searchParams 同步解析筛选初始值数组;可选在 mount 后清理已消费的 URL key。
|
|
4
|
+
*
|
|
5
|
+
* 不管理 Filter 的 value / defaultValue / onChange,由调用方自行 seed。
|
|
6
|
+
*
|
|
7
|
+
* @param {Object} options
|
|
8
|
+
* @param {URLSearchParams} options.searchParams
|
|
9
|
+
* @param {Function} [options.setSearchParams] - 为 function 时 strip 已消费 key(replace: true)
|
|
10
|
+
* @param {Array<{ name: string, label?: string, labelKey?: string }>} options.fields
|
|
11
|
+
* @returns {Array} searchParamsValue
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* const searchParamsValue = useSearchParamsValue({
|
|
15
|
+
* searchParams,
|
|
16
|
+
* setSearchParams,
|
|
17
|
+
* fields: [
|
|
18
|
+
* { name: 'status', label: '状态' },
|
|
19
|
+
* { name: 'tenantOrgId', label: '部门', labelKey: 'tenantOrgName' }
|
|
20
|
+
* ]
|
|
21
|
+
* });
|
|
22
|
+
* // ?tenantOrgId=org-1&tenantOrgName=技术部
|
|
23
|
+
* // → { name: 'tenantOrgId', label: '部门', value: { label: '技术部', value: 'org-1' } }
|
|
24
|
+
* const [filter, setFilter] = useState(searchParamsValue);
|
|
25
|
+
*/
|
|
26
|
+
declare function useSearchParamsValue({ searchParams, setSearchParams, fields }?: {
|
|
27
|
+
searchParams: URLSearchParams;
|
|
28
|
+
setSearchParams?: Function | undefined;
|
|
29
|
+
fields: Array<{
|
|
30
|
+
name: string;
|
|
31
|
+
label?: string;
|
|
32
|
+
labelKey?: string;
|
|
33
|
+
}>;
|
|
34
|
+
}): any[];
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { useRef as f, useState as i, useEffect as h } from "react";
|
|
2
|
+
const b = ({ searchParams: n, fields: t } = {}) => {
|
|
3
|
+
const u = [], e = [];
|
|
4
|
+
return !n || !Array.isArray(t) || t.length === 0 ? { items: u, consumedKeys: e } : (t.forEach((r) => {
|
|
5
|
+
const l = r == null ? void 0 : r.name;
|
|
6
|
+
if (!l || !n.has(l))
|
|
7
|
+
return;
|
|
8
|
+
const a = n.get(l);
|
|
9
|
+
if (a == null || a === "")
|
|
10
|
+
return;
|
|
11
|
+
e.push(l);
|
|
12
|
+
let o = a;
|
|
13
|
+
const c = r.labelKey;
|
|
14
|
+
if (c && n.has(c)) {
|
|
15
|
+
const s = n.get(c);
|
|
16
|
+
s != null && s !== "" && (o = s, e.push(c));
|
|
17
|
+
}
|
|
18
|
+
const p = r.label != null ? r.label : l;
|
|
19
|
+
u.push({
|
|
20
|
+
name: l,
|
|
21
|
+
label: p,
|
|
22
|
+
value: { label: o, value: a }
|
|
23
|
+
});
|
|
24
|
+
}), { items: u, consumedKeys: e });
|
|
25
|
+
}, g = (n, t) => {
|
|
26
|
+
if (!(t != null && t.length))
|
|
27
|
+
return null;
|
|
28
|
+
const u = new URLSearchParams(n);
|
|
29
|
+
let e = !1;
|
|
30
|
+
return t.forEach((r) => {
|
|
31
|
+
u.has(r) && (u.delete(r), e = !0);
|
|
32
|
+
}), e ? u : null;
|
|
33
|
+
}, R = ({ searchParams: n, setSearchParams: t, fields: u } = {}) => {
|
|
34
|
+
const e = f(null);
|
|
35
|
+
e.current === null && (e.current = b({ searchParams: n, fields: u }));
|
|
36
|
+
const [r] = i(() => e.current.items), l = f(!1);
|
|
37
|
+
return h(() => {
|
|
38
|
+
var o;
|
|
39
|
+
if (l.current || (l.current = !0, typeof t != "function"))
|
|
40
|
+
return;
|
|
41
|
+
const a = g(n, (o = e.current) == null ? void 0 : o.consumedKeys);
|
|
42
|
+
a && t(a, { replace: !0 });
|
|
43
|
+
}, [n, t]), r;
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
R as default
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=useSearchParamsValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSearchParamsValue.js","sources":["../../../src/components/ReactFilter/useSearchParamsValue.js"],"sourcesContent":["// @ts-nocheck\nimport { useState, useEffect, useRef } from 'react';\n\n/**\n * 从 URLSearchParams + fields 解析筛选初始值(内部使用,不导出)。\n *\n * fields 项:\n * - name:URL key,同时作为筛选字段 name\n * - label:筛选项标题(如「部门」)\n * - labelKey:可选,另一 URL key,作为选中值的展示文案(如部门名);缺省时展示文案等于 name 对应的原始值\n *\n * @param {Object} options\n * @param {URLSearchParams} [options.searchParams]\n * @param {Array<{ name: string, label?: string, labelKey?: string }>} [options.fields]\n * @returns {{ items: Array, consumedKeys: string[] }}\n */\nconst parseSearchParamsValue = ({ searchParams, fields } = {}) => {\n const items = [];\n const consumedKeys = [];\n\n if (!searchParams || !Array.isArray(fields) || fields.length === 0) {\n return { items, consumedKeys };\n }\n\n fields.forEach((field) => {\n const name = field?.name;\n if (!name || !searchParams.has(name)) {\n return;\n }\n const raw = searchParams.get(name);\n if (raw == null || raw === '') {\n return;\n }\n consumedKeys.push(name);\n\n let valueText = raw;\n const labelKey = field.labelKey;\n if (labelKey && searchParams.has(labelKey)) {\n const fromLabelKey = searchParams.get(labelKey);\n if (fromLabelKey != null && fromLabelKey !== '') {\n valueText = fromLabelKey;\n consumedKeys.push(labelKey);\n }\n }\n\n const label = field.label != null ? field.label : name;\n items.push({\n name,\n label,\n value: { label: valueText, value: raw },\n });\n });\n\n return { items, consumedKeys };\n};\n\n/**\n * 从 URL 参数移除已消费的 key,返回新的 URLSearchParams 或 null(无变化时)。\n * @param {URLSearchParams} searchParams\n * @param {string[]} consumedKeys\n * @returns {URLSearchParams|null}\n */\nconst stripConsumedUrlParams = (searchParams, consumedKeys) => {\n if (!consumedKeys?.length) {\n return null;\n }\n const next = new URLSearchParams(searchParams);\n let changed = false;\n consumedKeys.forEach((key) => {\n if (next.has(key)) {\n next.delete(key);\n changed = true;\n }\n });\n return changed ? next : null;\n};\n\n/**\n * 从 searchParams 同步解析筛选初始值数组;可选在 mount 后清理已消费的 URL key。\n *\n * 不管理 Filter 的 value / defaultValue / onChange,由调用方自行 seed。\n *\n * @param {Object} options\n * @param {URLSearchParams} options.searchParams\n * @param {Function} [options.setSearchParams] - 为 function 时 strip 已消费 key(replace: true)\n * @param {Array<{ name: string, label?: string, labelKey?: string }>} options.fields\n * @returns {Array} searchParamsValue\n *\n * @example\n * const searchParamsValue = useSearchParamsValue({\n * searchParams,\n * setSearchParams,\n * fields: [\n * { name: 'status', label: '状态' },\n * { name: 'tenantOrgId', label: '部门', labelKey: 'tenantOrgName' }\n * ]\n * });\n * // ?tenantOrgId=org-1&tenantOrgName=技术部\n * // → { name: 'tenantOrgId', label: '部门', value: { label: '技术部', value: 'org-1' } }\n * const [filter, setFilter] = useState(searchParamsValue);\n */\nconst useSearchParamsValue = ({ searchParams, setSearchParams, fields } = {}) => {\n const snapshotRef = useRef(null);\n\n if (snapshotRef.current === null) {\n snapshotRef.current = parseSearchParamsValue({ searchParams, fields });\n }\n\n const [searchParamsValue] = useState(() => snapshotRef.current.items);\n\n const strippedRef = useRef(false);\n useEffect(() => {\n if (strippedRef.current) {\n return;\n }\n strippedRef.current = true;\n if (typeof setSearchParams !== 'function') {\n return;\n }\n const nextParams = stripConsumedUrlParams(searchParams, snapshotRef.current?.consumedKeys);\n if (nextParams) {\n setSearchParams(nextParams, { replace: true });\n }\n }, [searchParams, setSearchParams]);\n\n return searchParamsValue;\n};\n\nexport default useSearchParamsValue;\n"],"names":["parseSearchParamsValue","searchParams","fields","items","consumedKeys","field","name","raw","valueText","labelKey","fromLabelKey","label","stripConsumedUrlParams","next","changed","key","useSearchParamsValue","setSearchParams","snapshotRef","useRef","searchParamsValue","useState","strippedRef","useEffect","nextParams","_a"],"mappings":";AAgBA,MAAMA,IAAyB,CAAC,EAAE,cAAAC,GAAc,QAAAC,EAAM,IAAK,CAAA,MAAO;AAChE,QAAMC,IAAQ,CAAA,GACRC,IAAe,CAAA;AAErB,SAAI,CAACH,KAAgB,CAAC,MAAM,QAAQC,CAAM,KAAKA,EAAO,WAAW,IACxD,EAAE,OAAAC,GAAO,cAAAC,EAAY,KAG9BF,EAAO,QAAQ,CAACG,MAAU;AACxB,UAAMC,IAAOD,KAAA,gBAAAA,EAAO;AACpB,QAAI,CAACC,KAAQ,CAACL,EAAa,IAAIK,CAAI;AACjC;AAEF,UAAMC,IAAMN,EAAa,IAAIK,CAAI;AACjC,QAAIC,KAAO,QAAQA,MAAQ;AACzB;AAEF,IAAAH,EAAa,KAAKE,CAAI;AAEtB,QAAIE,IAAYD;AAChB,UAAME,IAAWJ,EAAM;AACvB,QAAII,KAAYR,EAAa,IAAIQ,CAAQ,GAAG;AAC1C,YAAMC,IAAeT,EAAa,IAAIQ,CAAQ;AAC9C,MAAIC,KAAgB,QAAQA,MAAiB,OAC3CF,IAAYE,GACZN,EAAa,KAAKK,CAAQ;AAAA,IAE9B;AAEA,UAAME,IAAQN,EAAM,SAAS,OAAOA,EAAM,QAAQC;AAClD,IAAAH,EAAM,KAAK;AAAA,MACT,MAAAG;AAAA,MACA,OAAAK;AAAA,MACA,OAAO,EAAE,OAAOH,GAAW,OAAOD,EAAG;AAAA,IAC3C,CAAK;AAAA,EACH,CAAC,GAEM,EAAE,OAAAJ,GAAO,cAAAC,EAAY;AAC9B,GAQMQ,IAAyB,CAACX,GAAcG,MAAiB;AAC7D,MAAI,EAACA,KAAA,QAAAA,EAAc;AACjB,WAAO;AAET,QAAMS,IAAO,IAAI,gBAAgBZ,CAAY;AAC7C,MAAIa,IAAU;AACd,SAAAV,EAAa,QAAQ,CAACW,MAAQ;AAC5B,IAAIF,EAAK,IAAIE,CAAG,MACdF,EAAK,OAAOE,CAAG,GACfD,IAAU;AAAA,EAEd,CAAC,GACMA,IAAUD,IAAO;AAC1B,GA0BMG,IAAuB,CAAC,EAAE,cAAAf,GAAc,iBAAAgB,GAAiB,QAAAf,EAAM,IAAK,CAAA,MAAO;AAC/E,QAAMgB,IAAcC,EAAO,IAAI;AAE/B,EAAID,EAAY,YAAY,SAC1BA,EAAY,UAAUlB,EAAuB,EAAE,cAAAC,GAAc,QAAAC,EAAM,CAAE;AAGvE,QAAM,CAACkB,CAAiB,IAAIC,EAAS,MAAMH,EAAY,QAAQ,KAAK,GAE9DI,IAAcH,EAAO,EAAK;AAChC,SAAAI,EAAU,MAAM;;AAKd,QAJID,EAAY,YAGhBA,EAAY,UAAU,IAClB,OAAOL,KAAoB;AAC7B;AAEF,UAAMO,IAAaZ,EAAuBX,IAAcwB,IAAAP,EAAY,YAAZ,gBAAAO,EAAqB,YAAY;AACzF,IAAID,KACFP,EAAgBO,GAAY,EAAE,SAAS,GAAI,CAAE;AAAA,EAEjD,GAAG,CAACvB,GAAcgB,CAAe,CAAC,GAE3BG;AACT;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const x = (M, { scrollEl: n, boundaryEl: P, useBoundaryMount: m, offset: e = 4 } = {}) => {
|
|
2
|
+
var I;
|
|
3
|
+
if (typeof window > "u" || !M)
|
|
4
|
+
return { top: 0, left: 0, height: 0, width: 0 };
|
|
5
|
+
const d = M.getBoundingClientRect();
|
|
6
|
+
if (m && P) {
|
|
7
|
+
const i = P.getBoundingClientRect(), _ = Math.max(d.bottom - i.top + e, 0), o = Math.max(i.height - _, 0), O = o >= 160 ? o : Math.max(o, Math.min(160, i.height - e));
|
|
8
|
+
return {
|
|
9
|
+
top: _,
|
|
10
|
+
left: 0,
|
|
11
|
+
height: O,
|
|
12
|
+
width: i.width
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
const t = (I = n == null ? void 0 : n.getBoundingClientRect) == null ? void 0 : I.call(n), g = (t == null ? void 0 : t.top) ?? 0, w = Math.max((t == null ? void 0 : t.bottom) ?? 0, window.innerHeight), H = (t == null ? void 0 : t.width) || window.innerWidth, h = Math.max(d.bottom + e, g), a = Math.max(w - h, 0), p = a >= 160 ? a : Math.max(a, Math.min(160, window.innerHeight - h));
|
|
16
|
+
return {
|
|
17
|
+
top: h,
|
|
18
|
+
left: 0,
|
|
19
|
+
height: Math.max(p, 0),
|
|
20
|
+
width: H
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
x as getMobilePopupMetrics
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=getMobilePopupMetrics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMobilePopupMetrics.js","sources":["../../../../src/components/ReactFilter/utils/getMobilePopupMetrics.js"],"sourcesContent":["// @ts-nocheck\nconst MIN_MOBILE_POPUP_HEIGHT = 160;\n\n/**\n * 计算移动端筛选弹层 top/height。\n * 页面底部(如历史房间)时 scrollEl 可见底边可能紧贴 trigger,不能只信 scrollRect.bottom。\n */\nexport const getMobilePopupMetrics = (\n triggerEl,\n { scrollEl, boundaryEl, useBoundaryMount, offset = 4 } = {},\n) => {\n if (typeof window === 'undefined' || !triggerEl) {\n return { top: 0, left: 0, height: 0, width: 0 };\n }\n\n const rect = triggerEl.getBoundingClientRect();\n\n if (useBoundaryMount && boundaryEl) {\n const boundaryRect = boundaryEl.getBoundingClientRect();\n const top = Math.max(rect.bottom - boundaryRect.top + offset, 0);\n const available = Math.max(boundaryRect.height - top, 0);\n const height =\n available >= MIN_MOBILE_POPUP_HEIGHT\n ? available\n : Math.max(available, Math.min(MIN_MOBILE_POPUP_HEIGHT, boundaryRect.height - offset));\n\n return {\n top,\n left: 0,\n height,\n width: boundaryRect.width,\n };\n }\n\n const scrollRect = scrollEl?.getBoundingClientRect?.();\n const visibleTop = scrollRect?.top ?? 0;\n // 与视口取较大底边,避免页面底部筛选算出 height=0\n const visibleBottom = Math.max(scrollRect?.bottom ?? 0, window.innerHeight);\n const width = scrollRect?.width || window.innerWidth;\n const top = Math.max(rect.bottom + offset, visibleTop);\n const available = Math.max(visibleBottom - top, 0);\n const height =\n available >= MIN_MOBILE_POPUP_HEIGHT\n ? available\n : Math.max(available, Math.min(MIN_MOBILE_POPUP_HEIGHT, window.innerHeight - top));\n\n return {\n top,\n left: 0,\n height: Math.max(height, 0),\n width,\n };\n};\n"],"names":["getMobilePopupMetrics","triggerEl","scrollEl","boundaryEl","useBoundaryMount","offset","_a","rect","boundaryRect","top","available","height","scrollRect","visibleTop","visibleBottom","width"],"mappings":"AAOY,MAACA,IAAwB,CACnCC,GACA,EAAE,UAAAC,GAAU,YAAAC,GAAY,kBAAAC,GAAkB,QAAAC,IAAS,EAAC,IAAK,CAAA,MACtD;AAVL,MAAAC;AAWE,MAAI,OAAO,SAAW,OAAe,CAACL;AACpC,WAAO,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,EAAC;AAG/C,QAAMM,IAAON,EAAU,sBAAqB;AAE5C,MAAIG,KAAoBD,GAAY;AAClC,UAAMK,IAAeL,EAAW,sBAAqB,GAC/CM,IAAM,KAAK,IAAIF,EAAK,SAASC,EAAa,MAAMH,GAAQ,CAAC,GACzDK,IAAY,KAAK,IAAIF,EAAa,SAASC,GAAK,CAAC,GACjDE,IACJD,KAAa,MACTA,IACA,KAAK,IAAIA,GAAW,KAAK,IAAI,KAAyBF,EAAa,SAASH,CAAM,CAAC;AAEzF,WAAO;AAAA,MACL,KAAAI;AAAA,MACA,MAAM;AAAA,MACN,QAAAE;AAAA,MACA,OAAOH,EAAa;AAAA,IAC1B;AAAA,EACE;AAEA,QAAMI,KAAaN,IAAAJ,KAAA,gBAAAA,EAAU,0BAAV,gBAAAI,EAAA,KAAAJ,IACbW,KAAaD,KAAA,gBAAAA,EAAY,QAAO,GAEhCE,IAAgB,KAAK,KAAIF,KAAA,gBAAAA,EAAY,WAAU,GAAG,OAAO,WAAW,GACpEG,KAAQH,KAAA,gBAAAA,EAAY,UAAS,OAAO,YACpCH,IAAM,KAAK,IAAIF,EAAK,SAASF,GAAQQ,CAAU,GAC/CH,IAAY,KAAK,IAAII,IAAgBL,GAAK,CAAC,GAC3CE,IACJD,KAAa,MACTA,IACA,KAAK,IAAIA,GAAW,KAAK,IAAI,KAAyB,OAAO,cAAcD,CAAG,CAAC;AAErF,SAAO;AAAA,IACL,KAAAA;AAAA,IACA,MAAM;AAAA,IACN,QAAQ,KAAK,IAAIE,GAAQ,CAAC;AAAA,IAC1B,OAAAI;AAAA,EACJ;AACA;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default withFieldItem;
|
|
2
|
+
declare function withFieldItem(WrappedComponent: any, options?: {}): ({ value, onChange, interceptor, label, render, ...props }: {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
value: any;
|
|
5
|
+
onChange: any;
|
|
6
|
+
interceptor: any;
|
|
7
|
+
label: any;
|
|
8
|
+
render: any;
|
|
9
|
+
}) => import("react").JSX.Element;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { jsxs as Q, Fragment as Y, jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { useState as y, useRef as $, useCallback as u, useEffect as k } from "react";
|
|
3
|
+
import { createPortal as ee } from "react-dom";
|
|
4
|
+
import { useScrollElement as te } from "../../node_modules/@kne/responsive-utils/dist/index.modern.js";
|
|
5
|
+
import oe from "./hooks/useFilterPopupContainer.js";
|
|
6
|
+
import ne from "./FilterItem.js";
|
|
7
|
+
import f from "./style.module.scss.js";
|
|
8
|
+
import a from "classnames";
|
|
9
|
+
import ie from "./hooks/useResponsiveScrollListener.js";
|
|
10
|
+
import { getMobilePopupMetrics as F } from "./utils/getMobilePopupMetrics.js";
|
|
11
|
+
import { MOBILE_MASK_Z_INDEX as re, MOBILE_POPUP_Z_INDEX as V } from "./constants/mobilePopup.js";
|
|
12
|
+
const le = (r) => r == null || typeof r == "string" && r.trim() === "" ? !1 : !(Array.isArray(r) && r.length === 0), ue = 180, L = "react-filter-field-mobile-popup", ae = 4, Oe = (r, d = {}) => ({ value: b, onChange: I, interceptor: l, label: R, render: E, ...t }) => {
|
|
13
|
+
const [p, x] = y(!1), {
|
|
14
|
+
isMobile: o,
|
|
15
|
+
useBoundaryMount: P,
|
|
16
|
+
fixedModeClass: C,
|
|
17
|
+
getMountNode: s,
|
|
18
|
+
getPopupContainer: _,
|
|
19
|
+
anchorRef: j
|
|
20
|
+
} = oe(), [O, N] = y(!1), [B, v] = y(!1), [i, z] = y({ top: 0, pageTop: 0, height: 0 }), c = $(null), U = u(
|
|
21
|
+
(e) => {
|
|
22
|
+
c.current = e, j(e);
|
|
23
|
+
},
|
|
24
|
+
[j]
|
|
25
|
+
), M = te(), K = u(
|
|
26
|
+
(e) => {
|
|
27
|
+
if (typeof t.getPopupContainer == "function") {
|
|
28
|
+
const n = t.getPopupContainer(e);
|
|
29
|
+
if (n)
|
|
30
|
+
return n;
|
|
31
|
+
}
|
|
32
|
+
return _(e);
|
|
33
|
+
},
|
|
34
|
+
[_, t.getPopupContainer]
|
|
35
|
+
), A = typeof document < "u" ? s() || document.body : null, m = u((e) => {
|
|
36
|
+
typeof document > "u" || (document.body.style.setProperty("--react-filter-field-mobile-height", `${e.height}px`), document.body.style.setProperty(
|
|
37
|
+
"--react-filter-popover-mobile-height",
|
|
38
|
+
`${e.height}px`
|
|
39
|
+
), document.body.style.setProperty("--react-filter-field-mobile-top", `${e.top}px`));
|
|
40
|
+
}, []), w = u(() => {
|
|
41
|
+
if (typeof window > "u" || !c.current) return;
|
|
42
|
+
const e = F(c.current, {
|
|
43
|
+
scrollEl: M(),
|
|
44
|
+
boundaryEl: s(),
|
|
45
|
+
useBoundaryMount: P,
|
|
46
|
+
offset: ae
|
|
47
|
+
});
|
|
48
|
+
z(e), e.height > 0 && m(e);
|
|
49
|
+
}, [s, M, m, P]);
|
|
50
|
+
ie(w, p && o), k(() => {
|
|
51
|
+
if (!(typeof document > "u" || !o || i.height <= 0))
|
|
52
|
+
return m(i), () => {
|
|
53
|
+
document.body.style.removeProperty("--react-filter-field-mobile-height"), document.body.style.removeProperty("--react-filter-popover-mobile-height"), document.body.style.removeProperty("--react-filter-field-mobile-top");
|
|
54
|
+
};
|
|
55
|
+
}, [o, i, m]), k(() => {
|
|
56
|
+
if (p && o) {
|
|
57
|
+
N(!0), v(!1);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (!O) return;
|
|
61
|
+
v(!0);
|
|
62
|
+
const e = setTimeout(() => {
|
|
63
|
+
N(!1), v(!1);
|
|
64
|
+
}, ue);
|
|
65
|
+
return () => {
|
|
66
|
+
clearTimeout(e);
|
|
67
|
+
};
|
|
68
|
+
}, [o, p, O]);
|
|
69
|
+
const X = u(() => {
|
|
70
|
+
x(!1), t.onOpenChange && t.onOpenChange(!1), t.onDropdownVisibleChange && t.onDropdownVisibleChange(!1);
|
|
71
|
+
}, [t]), D = u(
|
|
72
|
+
(e) => {
|
|
73
|
+
e && o && w(), x(e), t.onOpenChange && t.onOpenChange(e), t.onDropdownVisibleChange && t.onDropdownVisibleChange(e);
|
|
74
|
+
},
|
|
75
|
+
[o, t, w]
|
|
76
|
+
), h = o ? {
|
|
77
|
+
"--react-filter-field-mobile-height": `${i.height}px`,
|
|
78
|
+
"--react-filter-popover-mobile-height": `${i.height}px`,
|
|
79
|
+
"--react-filter-field-mobile-top": `${i.top}px`,
|
|
80
|
+
top: i.top,
|
|
81
|
+
left: i.left ?? 0,
|
|
82
|
+
zIndex: V
|
|
83
|
+
} : void 0, T = (() => {
|
|
84
|
+
if (o && d.forcePopup)
|
|
85
|
+
return typeof window > "u" ? t.overlayWidth : F(c.current, {
|
|
86
|
+
scrollEl: M(),
|
|
87
|
+
boundaryEl: s(),
|
|
88
|
+
useBoundaryMount: P
|
|
89
|
+
}).width || window.innerWidth;
|
|
90
|
+
if (t.overlayWidth != null && t.overlayWidth !== "")
|
|
91
|
+
return t.overlayWidth;
|
|
92
|
+
})(), Z = (e) => {
|
|
93
|
+
var n;
|
|
94
|
+
return o ? Object.assign({}, e, {
|
|
95
|
+
popup: Object.assign({}, e == null ? void 0 : e.popup, {
|
|
96
|
+
root: a(
|
|
97
|
+
(n = e == null ? void 0 : e.popup) == null ? void 0 : n.root,
|
|
98
|
+
f["field-item-mobile-popup"],
|
|
99
|
+
L,
|
|
100
|
+
C
|
|
101
|
+
)
|
|
102
|
+
})
|
|
103
|
+
}) : e;
|
|
104
|
+
}, G = (e) => {
|
|
105
|
+
var n;
|
|
106
|
+
return o ? Object.assign({}, e, {
|
|
107
|
+
popup: Object.assign({}, e == null ? void 0 : e.popup, {
|
|
108
|
+
root: Object.assign({}, (n = e == null ? void 0 : e.popup) == null ? void 0 : n.root, h)
|
|
109
|
+
})
|
|
110
|
+
}) : e;
|
|
111
|
+
}, S = a(
|
|
112
|
+
o && f["field-item-mobile-popup"],
|
|
113
|
+
o && L,
|
|
114
|
+
o && C
|
|
115
|
+
), W = (e) => {
|
|
116
|
+
const n = typeof (l == null ? void 0 : l.input) == "function" ? l.input(b) : b, q = d.forcePopup && n == null ? t.single ? null : [] : n, { overlayWidth: fe, ...H } = t;
|
|
117
|
+
return /* @__PURE__ */ g(
|
|
118
|
+
r,
|
|
119
|
+
{
|
|
120
|
+
allowClear: !1,
|
|
121
|
+
...Object.assign({}, H, e),
|
|
122
|
+
className: f["filter-item-inner"],
|
|
123
|
+
value: q,
|
|
124
|
+
onChange: typeof (l == null ? void 0 : l.output) == "function" ? (...J) => I(l.output(...J)) : I,
|
|
125
|
+
valueType: "all",
|
|
126
|
+
onOpenChange: D,
|
|
127
|
+
onDropdownVisibleChange: D,
|
|
128
|
+
getPopupContainer: K,
|
|
129
|
+
popupClassName: a(t.popupClassName, S),
|
|
130
|
+
dropdownClassName: a(t.dropdownClassName, S),
|
|
131
|
+
overlayClassName: a(t.overlayClassName, S),
|
|
132
|
+
overlayStyle: Object.assign({}, t.overlayStyle, h),
|
|
133
|
+
popupStyle: Object.assign({}, t.popupStyle, h),
|
|
134
|
+
dropdownStyle: Object.assign({}, t.dropdownStyle, h),
|
|
135
|
+
classNames: Z(t.classNames),
|
|
136
|
+
styles: G(t.styles),
|
|
137
|
+
transitionName: o ? "" : t.transitionName,
|
|
138
|
+
autoAdjustOverflow: o ? !1 : t.autoAdjustOverflow,
|
|
139
|
+
align: o ? { offset: [0, 0] } : t.align,
|
|
140
|
+
isPopup: d.forcePopup ? !0 : t.isPopup,
|
|
141
|
+
disableMobileSheet: d.forcePopup ? !0 : t.disableMobileSheet,
|
|
142
|
+
zIndex: o ? V : t.zIndex,
|
|
143
|
+
...T != null ? { overlayWidth: T } : {}
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
};
|
|
147
|
+
return /* @__PURE__ */ Q(Y, { children: [
|
|
148
|
+
O && A && ee(
|
|
149
|
+
/* @__PURE__ */ g(
|
|
150
|
+
"div",
|
|
151
|
+
{
|
|
152
|
+
className: a(
|
|
153
|
+
f["pop-util-mask"],
|
|
154
|
+
B && f["pop-util-mask-leave"],
|
|
155
|
+
C
|
|
156
|
+
),
|
|
157
|
+
style: {
|
|
158
|
+
top: i.top,
|
|
159
|
+
height: i.height,
|
|
160
|
+
zIndex: re
|
|
161
|
+
},
|
|
162
|
+
onClick: X,
|
|
163
|
+
onTouchMove: (e) => {
|
|
164
|
+
e.preventDefault();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
),
|
|
168
|
+
A
|
|
169
|
+
),
|
|
170
|
+
/* @__PURE__ */ g("span", { ref: U, children: /* @__PURE__ */ g(ne, { label: R, open: p, active: le(b), children: typeof E == "function" ? E({
|
|
171
|
+
children: W
|
|
172
|
+
}) : W() }) })
|
|
173
|
+
] });
|
|
174
|
+
};
|
|
175
|
+
export {
|
|
176
|
+
Oe as default
|
|
177
|
+
};
|
|
178
|
+
//# sourceMappingURL=withFieldItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withFieldItem.js","sources":["../../../src/components/ReactFilter/withFieldItem.jsx"],"sourcesContent":["// @ts-nocheck\nimport { useState, useRef, useEffect, useCallback } from 'react';\nimport { createPortal } from 'react-dom';\nimport { useScrollElement } from '@kne/responsive-utils';\nimport useFilterPopupContainer from './hooks/useFilterPopupContainer';\nimport FilterItem from './FilterItem';\nimport style from './style.module.scss';\nimport classnames from 'classnames';\nimport useResponsiveScrollListener from './hooks/useResponsiveScrollListener';\nimport { getMobilePopupMetrics } from './utils/getMobilePopupMetrics';\nimport { MOBILE_MASK_Z_INDEX, MOBILE_POPUP_Z_INDEX } from './constants/mobilePopup';\n\nconst isNotEmpty = (value) => {\n if (value === null || value === undefined) return false;\n if (typeof value === 'string' && value.trim() === '') return false;\n return !(Array.isArray(value) && value.length === 0);\n};\n\nconst MASK_ANIMATION_DURATION = 180;\nconst FIELD_MOBILE_POPUP_CLASS = 'react-filter-field-mobile-popup';\nconst MOBILE_POPUP_OFFSET = 4;\n\nconst withFieldItem =\n (WrappedComponent, options = {}) =>\n ({ value, onChange, interceptor, label, render, ...props }) => {\n const [open, setOpen] = useState(false);\n const {\n isMobile,\n useBoundaryMount,\n fixedModeClass,\n getMountNode,\n getPopupContainer,\n anchorRef,\n } = useFilterPopupContainer();\n const [renderMask, setRenderMask] = useState(false);\n const [maskClosing, setMaskClosing] = useState(false);\n const [popupMetrics, setPopupMetrics] = useState({ top: 0, pageTop: 0, height: 0 });\n const triggerRef = useRef(null);\n const setTriggerRef = useCallback(\n (node) => {\n triggerRef.current = node;\n anchorRef(node);\n },\n [anchorRef],\n );\n const getScrollElement = useScrollElement();\n const resolveGetPopupContainer = useCallback(\n (triggerNode) => {\n if (typeof props.getPopupContainer === 'function') {\n const customContainer = props.getPopupContainer(triggerNode);\n if (customContainer) {\n return customContainer;\n }\n }\n return getPopupContainer(triggerNode);\n },\n [getPopupContainer, props.getPopupContainer],\n );\n const popupMountNode = typeof document !== 'undefined' ? getMountNode() || document.body : null;\n const setMobilePopupVariables = useCallback((metrics) => {\n if (typeof document === 'undefined') return;\n document.body.style.setProperty('--react-filter-field-mobile-height', `${metrics.height}px`);\n document.body.style.setProperty(\n '--react-filter-popover-mobile-height',\n `${metrics.height}px`,\n );\n document.body.style.setProperty('--react-filter-field-mobile-top', `${metrics.top}px`);\n }, []);\n const updatePopupMetrics = useCallback(() => {\n if (typeof window === 'undefined' || !triggerRef.current) return;\n const metrics = getMobilePopupMetrics(triggerRef.current, {\n scrollEl: getScrollElement(),\n boundaryEl: getMountNode(),\n useBoundaryMount,\n offset: MOBILE_POPUP_OFFSET,\n });\n setPopupMetrics(metrics);\n // height=0 时不要写入 CSS 变量,否则 max-height:0 会把弹层「吃掉」\n if (metrics.height > 0) {\n setMobilePopupVariables(metrics);\n }\n }, [getMountNode, getScrollElement, setMobilePopupVariables, useBoundaryMount]);\n\n useResponsiveScrollListener(updatePopupMetrics, open && isMobile);\n\n useEffect(() => {\n if (typeof document === 'undefined' || !isMobile || popupMetrics.height <= 0) return;\n setMobilePopupVariables(popupMetrics);\n return () => {\n document.body.style.removeProperty('--react-filter-field-mobile-height');\n document.body.style.removeProperty('--react-filter-popover-mobile-height');\n document.body.style.removeProperty('--react-filter-field-mobile-top');\n };\n }, [isMobile, popupMetrics, setMobilePopupVariables]);\n\n useEffect(() => {\n if (open && isMobile) {\n setRenderMask(true);\n setMaskClosing(false);\n return;\n }\n\n if (!renderMask) return;\n setMaskClosing(true);\n const timer = setTimeout(() => {\n setRenderMask(false);\n setMaskClosing(false);\n }, MASK_ANIMATION_DURATION);\n return () => {\n clearTimeout(timer);\n };\n }, [isMobile, open, renderMask]);\n\n const closeFieldItem = useCallback(() => {\n setOpen(false);\n props.onOpenChange && props.onOpenChange(false);\n props.onDropdownVisibleChange && props.onDropdownVisibleChange(false);\n }, [props]);\n\n const handleOpenChange = useCallback(\n (open) => {\n if (open && isMobile) {\n updatePopupMetrics();\n }\n setOpen(open);\n props.onOpenChange && props.onOpenChange(open);\n props.onDropdownVisibleChange && props.onDropdownVisibleChange(open);\n },\n [isMobile, props, updatePopupMetrics],\n );\n\n const mobilePopupStyle = isMobile\n ? {\n '--react-filter-field-mobile-height': `${popupMetrics.height}px`,\n '--react-filter-popover-mobile-height': `${popupMetrics.height}px`,\n '--react-filter-field-mobile-top': `${popupMetrics.top}px`,\n top: popupMetrics.top,\n left: popupMetrics.left ?? 0,\n zIndex: MOBILE_POPUP_Z_INDEX,\n }\n : undefined;\n\n // 勿把 undefined overlayWidth 显式传入(会盖掉 SuperSelect / SelectTableList / 业务选择器内部默认值)。\n // 窄触发器最小宽度由 @kne/super-select 的 DEFAULT_OVERLAY_MIN_WIDTH / 各业务默认 overlayWidth 处理。\n const resolvedOverlayWidth = (() => {\n if (isMobile && options.forcePopup) {\n if (typeof window === 'undefined') {\n return props.overlayWidth;\n }\n return (\n getMobilePopupMetrics(triggerRef.current, {\n scrollEl: getScrollElement(),\n boundaryEl: getMountNode(),\n useBoundaryMount,\n }).width || window.innerWidth\n );\n }\n if (props.overlayWidth != null && props.overlayWidth !== '') {\n return props.overlayWidth;\n }\n return undefined;\n })();\n\n const mergePopupClassNames = (classNames) => {\n if (!isMobile) return classNames;\n return Object.assign({}, classNames, {\n popup: Object.assign({}, classNames?.popup, {\n root: classnames(\n classNames?.popup?.root,\n style['field-item-mobile-popup'],\n FIELD_MOBILE_POPUP_CLASS,\n fixedModeClass,\n ),\n }),\n });\n };\n\n const mergePopupStyles = (styles) => {\n if (!isMobile) return styles;\n return Object.assign({}, styles, {\n popup: Object.assign({}, styles?.popup, {\n root: Object.assign({}, styles?.popup?.root, mobilePopupStyle),\n }),\n });\n };\n\n const fieldPopupClassName = classnames(\n isMobile && style['field-item-mobile-popup'],\n isMobile && FIELD_MOBILE_POPUP_CLASS,\n isMobile && fixedModeClass,\n );\n\n const renderChildren = (otherProps) => {\n const inputValue =\n typeof interceptor?.input === 'function' ? interceptor.input(value) : value;\n const fieldValue =\n options.forcePopup && inputValue == null ? (props.single ? null : []) : inputValue;\n const { overlayWidth: _omitOverlayWidth, ...restProps } = props;\n return (\n <WrappedComponent\n allowClear={false}\n {...Object.assign({}, restProps, otherProps)}\n className={style['filter-item-inner']}\n value={fieldValue}\n onChange={\n typeof interceptor?.output === 'function'\n ? (...args) => onChange(interceptor.output(...args))\n : onChange\n }\n valueType=\"all\"\n onOpenChange={handleOpenChange}\n onDropdownVisibleChange={handleOpenChange}\n getPopupContainer={resolveGetPopupContainer}\n popupClassName={classnames(props.popupClassName, fieldPopupClassName)}\n dropdownClassName={classnames(props.dropdownClassName, fieldPopupClassName)}\n overlayClassName={classnames(props.overlayClassName, fieldPopupClassName)}\n overlayStyle={Object.assign({}, props.overlayStyle, mobilePopupStyle)}\n popupStyle={Object.assign({}, props.popupStyle, mobilePopupStyle)}\n dropdownStyle={Object.assign({}, props.dropdownStyle, mobilePopupStyle)}\n classNames={mergePopupClassNames(props.classNames)}\n styles={mergePopupStyles(props.styles)}\n transitionName={isMobile ? '' : props.transitionName}\n autoAdjustOverflow={isMobile ? false : props.autoAdjustOverflow}\n align={isMobile ? { offset: [0, 0] } : props.align}\n isPopup={options.forcePopup ? true : props.isPopup}\n disableMobileSheet={options.forcePopup ? true : props.disableMobileSheet}\n zIndex={isMobile ? MOBILE_POPUP_Z_INDEX : props.zIndex}\n {...(resolvedOverlayWidth != null ? { overlayWidth: resolvedOverlayWidth } : {})}\n />\n );\n };\n return (\n <>\n {renderMask &&\n popupMountNode &&\n createPortal(\n <div\n className={classnames(\n style['pop-util-mask'],\n maskClosing && style['pop-util-mask-leave'],\n fixedModeClass,\n )}\n style={{\n top: popupMetrics.top,\n height: popupMetrics.height,\n zIndex: MOBILE_MASK_Z_INDEX,\n }}\n onClick={closeFieldItem}\n onTouchMove={(e) => {\n e.preventDefault();\n }}\n />,\n popupMountNode,\n )}\n <span ref={setTriggerRef}>\n <FilterItem label={label} open={open} active={isNotEmpty(value)}>\n {typeof render === 'function'\n ? render({\n children: renderChildren,\n })\n : renderChildren()}\n </FilterItem>\n </span>\n </>\n );\n };\n\nexport default withFieldItem;\n"],"names":["isNotEmpty","value","MASK_ANIMATION_DURATION","FIELD_MOBILE_POPUP_CLASS","MOBILE_POPUP_OFFSET","withFieldItem","WrappedComponent","options","onChange","interceptor","label","render","props","open","setOpen","useState","isMobile","useBoundaryMount","fixedModeClass","getMountNode","getPopupContainer","anchorRef","useFilterPopupContainer","renderMask","setRenderMask","maskClosing","setMaskClosing","popupMetrics","setPopupMetrics","triggerRef","useRef","setTriggerRef","useCallback","node","getScrollElement","useScrollElement","resolveGetPopupContainer","triggerNode","customContainer","popupMountNode","setMobilePopupVariables","metrics","updatePopupMetrics","getMobilePopupMetrics","useResponsiveScrollListener","useEffect","timer","closeFieldItem","handleOpenChange","mobilePopupStyle","MOBILE_POPUP_Z_INDEX","resolvedOverlayWidth","mergePopupClassNames","classNames","classnames","style","mergePopupStyles","styles","_a","fieldPopupClassName","renderChildren","otherProps","inputValue","fieldValue","_omitOverlayWidth","restProps","jsx","args","jsxs","Fragment","createPortal","MOBILE_MASK_Z_INDEX","FilterItem"],"mappings":"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"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as g } from "./context.js";
|
|
3
|
+
import i from "../../_virtual/get.js";
|
|
4
|
+
const h = (u) => ({ name: t, label: o, ...e }) => {
|
|
5
|
+
const { value: n, onChange: r } = g();
|
|
6
|
+
return /* @__PURE__ */ l(
|
|
7
|
+
u,
|
|
8
|
+
{
|
|
9
|
+
...e,
|
|
10
|
+
label: o,
|
|
11
|
+
onChange: r ? (a) => r({
|
|
12
|
+
name: t,
|
|
13
|
+
label: o,
|
|
14
|
+
value: a
|
|
15
|
+
}) : e.onChange,
|
|
16
|
+
value: n ? i(n.get(t), "value") : e.value
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
h as default
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=withFilterValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withFilterValue.js","sources":["../../../src/components/ReactFilter/withFilterValue.jsx"],"sourcesContent":["// @ts-nocheck\nimport { useContext } from './context';\nimport get from 'lodash/get';\n\nconst withFilterValue = (WrappedComponent) => {\n return ({ name, label, ...props }) => {\n const { value, onChange } = useContext();\n return (\n <WrappedComponent\n {...props}\n label={label}\n onChange={\n onChange\n ? (value) =>\n onChange({\n name,\n label,\n value,\n })\n : props.onChange\n }\n value={value ? get(value.get(name), 'value') : props.value}\n />\n );\n };\n};\n\nexport default withFilterValue;\n"],"names":["withFilterValue","WrappedComponent","name","label","props","value","onChange","useContext","jsx","get"],"mappings":";;;AAIA,MAAMA,IAAkB,CAACC,MAChB,CAAC,EAAE,MAAAC,GAAM,OAAAC,GAAO,GAAGC,QAAY;AACpC,QAAM,EAAE,OAAAC,GAAO,UAAAC,EAAA,IAAaC,EAAA;AAC5B,SACE,gBAAAC;AAAA,IAACP;AAAA,IAAA;AAAA,MACE,GAAGG;AAAA,MACJ,OAAAD;AAAA,MACA,UACEG,IACI,CAACD,MACCC,EAAS;AAAA,QACP,MAAAJ;AAAA,QACA,OAAAC;AAAA,QACA,OAAAE;AAAAA,MAAA,CACD,IACHD,EAAM;AAAA,MAEZ,OAAOC,IAAQI,EAAIJ,EAAM,IAAIH,CAAI,GAAG,OAAO,IAAIE,EAAM;AAAA,IAAA;AAAA,EAAA;AAG3D;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export default withLocale;
|
|
2
|
+
declare const withLocale: <P extends object>(WrappedComponents: import('@kne/react-intl/node_modules/@types/react').ComponentType<P>) => import('@kne/react-intl/node_modules/@types/react').ForwardRefExoticComponent<import('@kne/react-intl/node_modules/@types/react').PropsWithoutRef<P & {
|
|
3
|
+
locale?: string;
|
|
4
|
+
}> & import('@kne/react-intl/node_modules/@types/react').RefAttributes<any>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createWithIntlProvider as e } from "../../node_modules/@kne/react-intl/dist/index.modern.js";
|
|
2
|
+
import t from "./locale/zh-CN.js";
|
|
3
|
+
import a from "./locale/en-US.js";
|
|
4
|
+
const s = e({
|
|
5
|
+
defaultLocale: "zh-CN",
|
|
6
|
+
messages: {
|
|
7
|
+
"zh-CN": t,
|
|
8
|
+
"en-US": a
|
|
9
|
+
},
|
|
10
|
+
namespace: "react-filter"
|
|
11
|
+
});
|
|
12
|
+
export {
|
|
13
|
+
s as default
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=withLocale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withLocale.js","sources":["../../../src/components/ReactFilter/withLocale.js"],"sourcesContent":["// @ts-nocheck\nimport { createWithIntlProvider } from '@kne/react-intl';\nimport zhCN from './locale/zh-CN';\nimport enUS from './locale/en-US';\n\nconst withLocale = createWithIntlProvider({\n defaultLocale: 'zh-CN',\n messages: {\n 'zh-CN': zhCN,\n 'en-US': enUS,\n },\n namespace: 'react-filter',\n});\n\nexport default withLocale;\n"],"names":["withLocale","createWithIntlProvider","zhCN","enUS"],"mappings":";;;AAKK,MAACA,IAAaC,EAAuB;AAAA,EACxC,eAAe;AAAA,EACf,UAAU;AAAA,IACR,SAASC;AAAAA,IACT,SAASC;AAAAA,EACb;AAAA,EACE,WAAW;AACb,CAAC;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs as s, Fragment as
|
|
2
|
-
import { CircleHelp as
|
|
1
|
+
import { jsxs as s, Fragment as u, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { CircleHelp as p } from "../../Icons/index.js";
|
|
3
3
|
import { Button as a, Tour as f } from "antd";
|
|
4
4
|
import d from "classnames";
|
|
5
5
|
import h, { useState as x } from "react";
|
|
@@ -16,8 +16,8 @@ const R = ({ steps: l, storageKey: t, autoOpen: n = !0 }) => {
|
|
|
16
16
|
const i = () => {
|
|
17
17
|
e(!1), t && localStorage.setItem(t, "true");
|
|
18
18
|
};
|
|
19
|
-
return l.length ? /* @__PURE__ */ s(
|
|
20
|
-
/* @__PURE__ */ r(a, { type: "text", icon: /* @__PURE__ */ r(
|
|
19
|
+
return l.length ? /* @__PURE__ */ s(u, { children: [
|
|
20
|
+
/* @__PURE__ */ r(a, { type: "text", icon: /* @__PURE__ */ r(p, {}), onClick: () => e(!0), title: "导览" }),
|
|
21
21
|
/* @__PURE__ */ r(
|
|
22
22
|
f,
|
|
23
23
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/Tour/AppTour/index.tsx"],"sourcesContent":["import { CircleHelp } from '@/components/Icons';\nimport type { TourProps } from 'antd';\nimport { Button, Tour } from 'antd';\nimport classNames from 'classnames';\nimport React, { useState } from 'react';\nimport styles from './style.module.scss';\n\nexport interface AppTourStep {\n title: string;\n description: React.ReactNode;\n target?: () => HTMLElement;\n placement?: TourProps['steps'] extends (infer S)[] | undefined ? S extends { placement?: infer P } ? P : never : never;\n}\n\nexport interface AppTourProps {\n steps: AppTourStep[];\n /** localStorage key,用于记录是否已完成导览 */\n storageKey?: string;\n /** 是否自动打开(首次) */\n autoOpen?: boolean;\n}\n\nconst AppTour: React.FC<AppTourProps> = ({ steps, storageKey, autoOpen = true }) => {\n const [open, setOpen] = useState(false);\n\n React.useEffect(() => {\n if (!autoOpen || !storageKey) return;\n const completed = localStorage.getItem(storageKey);\n if (!completed) {\n const timer = setTimeout(() => setOpen(true), 800);\n return () => clearTimeout(timer);\n }\n }, [autoOpen, storageKey]);\n\n const handleClose = () => {\n setOpen(false);\n if (storageKey) localStorage.setItem(storageKey, 'true');\n };\n\n if (!steps.length) return null;\n\n return (\n <>\n <Button type=\"text\" icon={<CircleHelp />} onClick={() => setOpen(true)} title=\"导览\" />\n <Tour\n open={open}\n onClose={handleClose}\n onFinish={handleClose}\n steps={steps}\n indicatorsRender={(current, total) => (\n <span className={classNames('app-tour-root', styles['app-tour-root'])}>\n {current + 1} / {total}\n </span>\n )}\n />\n </>\n );\n};\n\nexport default AppTour;\n"],"names":["AppTour","steps","storageKey","autoOpen","open","setOpen","useState","React","timer","handleClose","jsxs","Fragment","jsx","Button","CircleHelp","Tour","current","total","classNames","styles"],"mappings":";;;;;;AAsBA,MAAMA,IAAkC,CAAC,EAAE,OAAAC,GAAO,YAAAC,GAAY,UAAAC,IAAW,SAAW;AAClF,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAS,EAAK;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Tour/AppTour/index.tsx"],"sourcesContent":["import { CircleHelp } from '@/components/Icons';\nimport type { TourProps } from 'antd';\nimport { Button, Tour } from 'antd';\nimport classNames from 'classnames';\nimport React, { useState } from 'react';\nimport styles from './style.module.scss';\n\nexport interface AppTourStep {\n title: string;\n description: React.ReactNode;\n target?: () => HTMLElement;\n placement?: TourProps['steps'] extends (infer S)[] | undefined ? S extends { placement?: infer P } ? P : never : never;\n}\n\nexport interface AppTourProps {\n steps: AppTourStep[];\n /** localStorage key,用于记录是否已完成导览 */\n storageKey?: string;\n /** 是否自动打开(首次) */\n autoOpen?: boolean;\n}\n\nconst AppTour: React.FC<AppTourProps> = ({ steps, storageKey, autoOpen = true }) => {\n const [open, setOpen] = useState(false);\n\n React.useEffect(() => {\n if (!autoOpen || !storageKey) return;\n const completed = localStorage.getItem(storageKey);\n if (!completed) {\n const timer = setTimeout(() => setOpen(true), 800);\n return () => clearTimeout(timer);\n }\n }, [autoOpen, storageKey]);\n\n const handleClose = () => {\n setOpen(false);\n if (storageKey) localStorage.setItem(storageKey, 'true');\n };\n\n if (!steps.length) return null;\n\n return (\n <>\n <Button type=\"text\" icon={<CircleHelp />} onClick={() => setOpen(true)} title=\"导览\" />\n <Tour\n open={open}\n onClose={handleClose}\n onFinish={handleClose}\n steps={steps}\n indicatorsRender={(current, total) => (\n <span className={classNames('app-tour-root', styles['app-tour-root'])}>\n {current + 1} / {total}\n </span>\n )}\n />\n </>\n );\n};\n\nexport default AppTour;\n"],"names":["AppTour","steps","storageKey","autoOpen","open","setOpen","useState","React","timer","handleClose","jsxs","Fragment","jsx","Button","CircleHelp","Tour","current","total","classNames","styles"],"mappings":";;;;;;AAsBA,MAAMA,IAAkC,CAAC,EAAE,OAAAC,GAAO,YAAAC,GAAY,UAAAC,IAAW,SAAW;AAClF,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAS,EAAK;AAEtCC,EAAAA,EAAM,UAAU,MAAM;AACpB,QAAI,CAACJ,KAAY,CAACD,EAAY;AAE9B,QAAI,CADc,aAAa,QAAQA,CAAU,GACjC;AACd,YAAMM,IAAQ,WAAW,MAAMH,EAAQ,EAAI,GAAG,GAAG;AACjD,aAAO,MAAM,aAAaG,CAAK;AAAA,IACjC;AAAA,EACF,GAAG,CAACL,GAAUD,CAAU,CAAC;AAEzB,QAAMO,IAAc,MAAM;AACxB,IAAAJ,EAAQ,EAAK,GACTH,KAAY,aAAa,QAAQA,GAAY,MAAM;AAAA,EACzD;AAEA,SAAKD,EAAM,SAGT,gBAAAS,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAAO,MAAK,QAAO,MAAM,gBAAAD,EAACE,GAAA,CAAA,CAAW,GAAI,SAAS,MAAMT,EAAQ,EAAI,GAAG,OAAM,MAAK;AAAA,IACnF,gBAAAO;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,MAAAX;AAAA,QACA,SAASK;AAAA,QACT,UAAUA;AAAA,QACV,OAAAR;AAAA,QACA,kBAAkB,CAACe,GAASC,MAC1B,gBAAAP,EAAC,QAAA,EAAK,WAAWQ,EAAW,iBAAiBC,EAAO,eAAe,CAAC,GACjE,UAAA;AAAA,UAAAH,IAAU;AAAA,UAAE;AAAA,UAAIC;AAAA,QAAA,EAAA,CACnB;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ,GACF,IAhBwB;AAkB5B;"}
|
|
@@ -68,30 +68,30 @@ const v = ({ fileList: r, onRemove: i }) => r.length ? /* @__PURE__ */ e("div",
|
|
|
68
68
|
directory: O,
|
|
69
69
|
accept: U,
|
|
70
70
|
onUpload: w,
|
|
71
|
-
onSave:
|
|
71
|
+
onSave: n,
|
|
72
72
|
getPermission: b,
|
|
73
73
|
concurrentCount: M
|
|
74
74
|
}, P) => {
|
|
75
|
-
const [A, J] = f.useState([]), [
|
|
75
|
+
const [A, J] = f.useState([]), [_, z] = f.useState(!1), u = r ?? A, m = f.useCallback(
|
|
76
76
|
(l) => {
|
|
77
|
-
const s = typeof l == "function" ? l(
|
|
78
|
-
i == null || i(s), J(s),
|
|
77
|
+
const s = typeof l == "function" ? l(u) : l;
|
|
78
|
+
i == null || i(s), J(s), n == null || n(s);
|
|
79
79
|
},
|
|
80
|
-
[
|
|
81
|
-
), $ = j ?? 500 * 1024 * 1024,
|
|
80
|
+
[u, i, n]
|
|
81
|
+
), $ = j ?? 500 * 1024 * 1024, C = M ?? 3, E = f.useCallback(
|
|
82
82
|
(l) => b && !b(l) ? (I.error("无权限上传此文件"), N.LIST_IGNORE) : l.size > $ ? (I.error(`文件超出 ${R($)} 限制`), N.LIST_IGNORE) : !0,
|
|
83
83
|
[$, b]
|
|
84
|
-
),
|
|
85
|
-
if (!(!w || !
|
|
86
|
-
|
|
84
|
+
), T = f.useCallback(async () => {
|
|
85
|
+
if (!(!w || !u.length)) {
|
|
86
|
+
z(!0);
|
|
87
87
|
try {
|
|
88
|
-
const l = [...
|
|
88
|
+
const l = [...u], s = [];
|
|
89
89
|
for (; l.length; ) {
|
|
90
90
|
const d = l.shift();
|
|
91
91
|
if (!(d != null && d.originFileObj)) continue;
|
|
92
92
|
const Q = d.originFileObj;
|
|
93
93
|
s.push(
|
|
94
|
-
new Promise((
|
|
94
|
+
new Promise((G) => {
|
|
95
95
|
w({
|
|
96
96
|
file: Q,
|
|
97
97
|
onSuccess: (q) => {
|
|
@@ -99,34 +99,34 @@ const v = ({ fileList: r, onRemove: i }) => r.length ? /* @__PURE__ */ e("div",
|
|
|
99
99
|
(y) => y.map(
|
|
100
100
|
(p) => p.uid === d.uid ? { ...p, status: "done", url: q ?? p.url } : p
|
|
101
101
|
)
|
|
102
|
-
),
|
|
102
|
+
), G();
|
|
103
103
|
},
|
|
104
104
|
onError: (q) => {
|
|
105
105
|
I.error(`${d.name} 上传失败`), m(
|
|
106
106
|
(y) => y.map((p) => p.uid === d.uid ? { ...p, status: "error" } : p)
|
|
107
|
-
),
|
|
107
|
+
), G();
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
})
|
|
111
|
-
), s.length >=
|
|
111
|
+
), s.length >= C && await Promise.race(s);
|
|
112
112
|
}
|
|
113
|
-
await Promise.allSettled(s),
|
|
113
|
+
await Promise.allSettled(s), n == null || n(u);
|
|
114
114
|
} finally {
|
|
115
|
-
|
|
115
|
+
z(!1);
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
}, [
|
|
119
|
-
f.useImperativeHandle(P, () => ({ upload:
|
|
120
|
-
|
|
121
|
-
|
|
118
|
+
}, [u, w, C, n, m]);
|
|
119
|
+
f.useImperativeHandle(P, () => ({ upload: T, uploading: _ }), [
|
|
120
|
+
T,
|
|
121
|
+
_
|
|
122
122
|
]);
|
|
123
|
-
const
|
|
123
|
+
const B = (F == null ? void 0 : F()) ?? S(U, j, K);
|
|
124
124
|
return c === "panel" ? /* @__PURE__ */ h("div", { className: t, children: [
|
|
125
125
|
/* @__PURE__ */ h(
|
|
126
126
|
N.Dragger,
|
|
127
127
|
{
|
|
128
|
-
fileList:
|
|
129
|
-
beforeUpload:
|
|
128
|
+
fileList: u,
|
|
129
|
+
beforeUpload: E,
|
|
130
130
|
onChange: (l) => m(l.fileList),
|
|
131
131
|
multiple: k,
|
|
132
132
|
directory: O,
|
|
@@ -136,14 +136,14 @@ const v = ({ fileList: r, onRemove: i }) => r.length ? /* @__PURE__ */ e("div",
|
|
|
136
136
|
children: [
|
|
137
137
|
/* @__PURE__ */ e("p", { className: o("upload-drag-icon", a["upload-drag-icon"]), children: /* @__PURE__ */ e(V, {}) }),
|
|
138
138
|
/* @__PURE__ */ e("p", { className: "ant-upload-text", children: "点击或拖拽文件到此区域上传" }),
|
|
139
|
-
/* @__PURE__ */ e("p", { children:
|
|
139
|
+
/* @__PURE__ */ e("p", { children: B })
|
|
140
140
|
]
|
|
141
141
|
}
|
|
142
142
|
),
|
|
143
143
|
L && /* @__PURE__ */ e(
|
|
144
144
|
v,
|
|
145
145
|
{
|
|
146
|
-
fileList:
|
|
146
|
+
fileList: u,
|
|
147
147
|
onRemove: (l) => m((s) => s.filter((d) => d.uid !== l))
|
|
148
148
|
}
|
|
149
149
|
)
|
|
@@ -151,8 +151,8 @@ const v = ({ fileList: r, onRemove: i }) => r.length ? /* @__PURE__ */ e("div",
|
|
|
151
151
|
/* @__PURE__ */ e(
|
|
152
152
|
N,
|
|
153
153
|
{
|
|
154
|
-
fileList:
|
|
155
|
-
beforeUpload:
|
|
154
|
+
fileList: u,
|
|
155
|
+
beforeUpload: E,
|
|
156
156
|
onChange: (l) => m(l.fileList),
|
|
157
157
|
multiple: k,
|
|
158
158
|
directory: O,
|
|
@@ -170,11 +170,11 @@ const v = ({ fileList: r, onRemove: i }) => r.length ? /* @__PURE__ */ e("div",
|
|
|
170
170
|
)
|
|
171
171
|
}
|
|
172
172
|
),
|
|
173
|
-
/* @__PURE__ */ e("div", { className: o("upload-list", a["upload-list"]), children:
|
|
173
|
+
/* @__PURE__ */ e("div", { className: o("upload-list", a["upload-list"]), children: B }),
|
|
174
174
|
L && /* @__PURE__ */ e(
|
|
175
175
|
v,
|
|
176
176
|
{
|
|
177
|
-
fileList:
|
|
177
|
+
fileList: u,
|
|
178
178
|
onRemove: (l) => m((s) => s.filter((d) => d.uid !== l))
|
|
179
179
|
}
|
|
180
180
|
)
|