@hkyhy/marsun-components-core 0.1.50 → 0.1.52
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/jszip.min.js +28 -0
- package/dist/_virtual/jszip.min.js.map +1 -0
- package/dist/_virtual/{index.js → jszip2.min.js} +1 -1
- package/dist/_virtual/jszip2.min.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/Auth/UserProfileCard/UserProfileCard.d.ts +6 -1
- package/dist/components/Auth/UserProfileCard/UserProfileCard.js +44 -40
- package/dist/components/Auth/UserProfileCard/UserProfileCard.js.map +1 -1
- package/dist/components/Auth/UserProfileCard/style.module.scss.js +16 -14
- package/dist/components/Auth/UserProfileCard/style.module.scss.js.map +1 -1
- package/dist/components/File/FileItem/index.js +46 -24
- package/dist/components/File/FileItem/index.js.map +1 -1
- package/dist/components/File/FilePreview/FilePreviewContent.js +5 -5
- package/dist/components/File/FilePreview/FilePreviewContent.js.map +1 -1
- package/dist/components/Filter/CommonFilter/index.d.ts +20 -18
- package/dist/components/Filter/CommonFilter/index.js +261 -104
- package/dist/components/Filter/CommonFilter/index.js.map +1 -1
- package/dist/components/Filter/CommonFilter/style.module.scss.js +25 -15
- package/dist/components/Filter/CommonFilter/style.module.scss.js.map +1 -1
- package/dist/components/Filter/FilterCity/index.d.ts +11 -0
- package/dist/components/Filter/FilterCity/index.js +143 -0
- package/dist/components/Filter/FilterCity/index.js.map +1 -0
- package/dist/components/Filter/FilterCity/style.module.scss.js +9 -0
- package/dist/components/Filter/FilterCity/style.module.scss.js.map +1 -0
- package/dist/components/Filter/FilterDatePicker/index.js +61 -60
- package/dist/components/Filter/FilterDatePicker/index.js.map +1 -1
- package/dist/components/Filter/FilterDateRange/index.js +78 -77
- package/dist/components/Filter/FilterDateRange/index.js.map +1 -1
- package/dist/components/Filter/FilterInput/index.js +38 -37
- package/dist/components/Filter/FilterInput/index.js.map +1 -1
- package/dist/components/Filter/FilterLayoutContext.d.ts +9 -0
- package/dist/components/Filter/FilterLayoutContext.js +17 -0
- package/dist/components/Filter/FilterLayoutContext.js.map +1 -0
- package/dist/components/Filter/FilterList/index.d.ts +16 -0
- package/dist/components/Filter/FilterList/index.js +133 -0
- package/dist/components/Filter/FilterList/index.js.map +1 -0
- package/dist/components/Filter/FilterList/style.module.scss.js +9 -0
- package/dist/components/Filter/FilterList/style.module.scss.js.map +1 -0
- package/dist/components/Filter/FilterNumberRange/index.js +52 -51
- package/dist/components/Filter/FilterNumberRange/index.js.map +1 -1
- package/dist/components/Filter/FilterPanel/index.d.ts +2 -0
- package/dist/components/Filter/FilterPanel/index.js +19 -12
- package/dist/components/Filter/FilterPanel/index.js.map +1 -1
- package/dist/components/Filter/FilterPopover/index.js +85 -47
- package/dist/components/Filter/FilterPopover/index.js.map +1 -1
- package/dist/components/Filter/FilterPopover/style.module.scss.js +8 -0
- package/dist/components/Filter/FilterPopover/style.module.scss.js.map +1 -0
- package/dist/components/Filter/FilterSelectAddress/index.d.ts +4 -0
- package/dist/components/Filter/FilterSelectAddress/index.js +8 -0
- package/dist/components/Filter/FilterSelectAddress/index.js.map +1 -0
- package/dist/components/Filter/FilterSelectFunction/index.d.ts +4 -0
- package/dist/components/Filter/FilterSelectFunction/index.js +8 -0
- package/dist/components/Filter/FilterSelectFunction/index.js.map +1 -0
- package/dist/components/Filter/FilterSelectIndustry/index.d.ts +4 -0
- package/dist/components/Filter/FilterSelectIndustry/index.js +8 -0
- package/dist/components/Filter/FilterSelectIndustry/index.js.map +1 -0
- package/dist/components/Filter/FilterSelectTableList/index.d.ts +6 -0
- package/dist/components/Filter/FilterSelectTableList/index.js +8 -0
- package/dist/components/Filter/FilterSelectTableList/index.js.map +1 -0
- package/dist/components/Filter/FilterSuperSelect/index.d.ts +7 -0
- package/dist/components/Filter/FilterSuperSelect/index.js +8 -0
- package/dist/components/Filter/FilterSuperSelect/index.js.map +1 -0
- package/dist/components/Filter/FilterTrigger/index.d.ts +3 -0
- package/dist/components/Filter/FilterTrigger/index.js +24 -21
- package/dist/components/Filter/FilterTrigger/index.js.map +1 -1
- package/dist/components/Filter/FilterTrigger/style.module.scss.js +7 -5
- package/dist/components/Filter/FilterTrigger/style.module.scss.js.map +1 -1
- package/dist/components/Filter/FilterTypeDateRange/index.d.ts +14 -0
- package/dist/components/Filter/FilterTypeDateRange/index.js +189 -0
- package/dist/components/Filter/FilterTypeDateRange/index.js.map +1 -0
- package/dist/components/Filter/FilterTypeDateRange/style.module.scss.js +12 -0
- package/dist/components/Filter/FilterTypeDateRange/style.module.scss.js.map +1 -0
- package/dist/components/Filter/createKneFilterField.d.ts +28 -0
- package/dist/components/Filter/createKneFilterField.js +104 -0
- package/dist/components/Filter/createKneFilterField.js.map +1 -0
- package/dist/components/Filter/createKneFilterField.module.scss.js +8 -0
- package/dist/components/Filter/createKneFilterField.module.scss.js.map +1 -0
- package/dist/components/Filter/index.d.ts +30 -0
- package/dist/components/Filter/kneValueAdapter.d.ts +28 -0
- package/dist/components/Filter/kneValueAdapter.js +64 -0
- package/dist/components/Filter/kneValueAdapter.js.map +1 -0
- package/dist/components/Filter/useFilterLayoutMode.d.ts +19 -0
- package/dist/components/Filter/useFilterLayoutMode.js +37 -0
- package/dist/components/Filter/useFilterLayoutMode.js.map +1 -0
- package/dist/components/Filter/useHorizontalScrollShadows.d.ts +9 -0
- package/dist/components/Filter/useHorizontalScrollShadows.js +27 -0
- package/dist/components/Filter/useHorizontalScrollShadows.js.map +1 -0
- package/dist/components/Form/index.d.ts +1 -1
- package/dist/components/Form/kneFormInfo.d.ts +1 -2
- package/dist/components/Form/kneFormInfo.js +5 -5
- package/dist/components/Form/kneFormInfo.js.map +1 -1
- package/dist/components/Icons/index.js +14 -14
- package/dist/components/ReactFilter/AdvancedFilter/fields/CityFilterItem.js +25 -27
- package/dist/components/ReactFilter/AdvancedFilter/fields/CityFilterItem.js.map +1 -1
- package/dist/components/ReactFilter/AdvancedFilter/fields/InputFilterItem.js +11 -13
- package/dist/components/ReactFilter/AdvancedFilter/fields/InputFilterItem.js.map +1 -1
- package/dist/components/ReactFilter/AdvancedFilter/fields/ListFilterItem.js +18 -20
- package/dist/components/ReactFilter/AdvancedFilter/fields/ListFilterItem.js.map +1 -1
- package/dist/components/ReactFilter/AdvancedFilter/index.js +33 -35
- package/dist/components/ReactFilter/AdvancedFilter/index.js.map +1 -1
- package/dist/components/ReactFilter/FilterLines.js +71 -73
- package/dist/components/ReactFilter/FilterLines.js.map +1 -1
- package/dist/components/ReactFilter/FilterProvider.js +1 -1
- package/dist/components/ReactFilter/FilterValueDisplay.js +29 -32
- package/dist/components/ReactFilter/FilterValueDisplay.js.map +1 -1
- package/dist/components/ReactFilter/PopoverItem.js +22 -24
- package/dist/components/ReactFilter/PopoverItem.js.map +1 -1
- package/dist/components/ReactFilter/SearchInput.js +12 -14
- package/dist/components/ReactFilter/SearchInput.js.map +1 -1
- package/dist/components/ReactFilter/common/TypeDateRangePickerField/index.js +48 -50
- package/dist/components/ReactFilter/common/TypeDateRangePickerField/index.js.map +1 -1
- package/dist/components/ReactFilter/fields/InputFilterItem.js +1 -1
- package/dist/components/ReactFilter/fields/NumberRangeFilterItem.js +27 -29
- package/dist/components/ReactFilter/fields/NumberRangeFilterItem.js.map +1 -1
- package/dist/components/ReactFilter/fields/SelectTreeFilterItem.js +35 -35
- package/dist/components/ReactFilter/fields/TypeDateRangePickerFilterItem.js +1 -1
- package/dist/components/ReactFilter/fields/index.js +28 -30
- package/dist/components/ReactFilter/fields/index.js.map +1 -1
- package/dist/components/ReactFilter/getFilterValue.js +1 -1
- package/dist/components/ReactFilter/hooks/useFilterIsMobile.js +3 -3
- package/dist/components/ReactFilter/hooks/useFilterPopupContainer.js +1 -1
- package/dist/components/ReactFilter/hooks/useFilterViewportVars.js +1 -1
- package/dist/components/ReactFilter/hooks/useResponsiveScrollListener.js +1 -1
- package/dist/components/ReactFilter/withFieldItem.js +1 -1
- package/dist/components/ReactFilter/withFilterValue.js +1 -1
- package/dist/components/ReactFilter/withLocale.js +1 -1
- package/dist/components/Tag/SemanticTag.d.ts +2 -0
- package/dist/components/Tag/SemanticTag.js +36 -41
- package/dist/components/Tag/SemanticTag.js.map +1 -1
- 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 +34 -34
- package/dist/components/Upload/index.js.map +1 -1
- package/dist/index.js +410 -380
- package/dist/index.js.map +1 -1
- package/dist/marsun-components-core.css +1 -1
- package/dist/node_modules/jszip/dist/jszip.min.js +2321 -0
- package/dist/node_modules/jszip/dist/jszip.min.js.map +1 -0
- package/dist/styles/global.css +1 -1
- package/package.json +1 -1
- package/dist/_virtual/_cloneBuffer.js +0 -5
- package/dist/_virtual/_cloneBuffer.js.map +0 -1
- package/dist/_virtual/_nodeUtil.js +0 -5
- package/dist/_virtual/_nodeUtil.js.map +0 -1
- package/dist/_virtual/clone.js +0 -8
- package/dist/_virtual/clone.js.map +0 -1
- package/dist/_virtual/get.js +0 -8
- package/dist/_virtual/get.js.map +0 -1
- package/dist/_virtual/hoist-non-react-statics.cjs.js +0 -3
- package/dist/_virtual/hoist-non-react-statics.cjs.js.map +0 -1
- package/dist/_virtual/index.js.map +0 -1
- package/dist/_virtual/isBuffer.js +0 -5
- package/dist/_virtual/isBuffer.js.map +0 -1
- package/dist/_virtual/isEqual.js +0 -8
- package/dist/_virtual/isEqual.js.map +0 -1
- package/dist/_virtual/isNumber.js +0 -8
- package/dist/_virtual/isNumber.js.map +0 -1
- package/dist/_virtual/merge.js +0 -8
- package/dist/_virtual/merge.js.map +0 -1
- package/dist/_virtual/object_hash.js +0 -8
- package/dist/_virtual/object_hash.js.map +0 -1
- package/dist/_virtual/object_hash2.js +0 -5
- package/dist/_virtual/object_hash2.js.map +0 -1
- package/dist/_virtual/omit.js +0 -8
- package/dist/_virtual/omit.js.map +0 -1
- package/dist/_virtual/pick.js +0 -8
- package/dist/_virtual/pick.js.map +0 -1
- package/dist/_virtual/react-is.development.js +0 -5
- package/dist/_virtual/react-is.development.js.map +0 -1
- package/dist/_virtual/react-is.production.min.js +0 -5
- package/dist/_virtual/react-is.production.min.js.map +0 -1
- package/dist/_virtual/transform.js +0 -8
- package/dist/_virtual/transform.js.map +0 -1
- package/dist/node_modules/@ant-design/colors/es/generate.js +0 -75
- package/dist/node_modules/@ant-design/colors/es/generate.js.map +0 -1
- package/dist/node_modules/@ant-design/colors/es/presets.js +0 -6
- package/dist/node_modules/@ant-design/colors/es/presets.js.map +0 -1
- package/dist/node_modules/@ant-design/fast-color/es/FastColor.js +0 -327
- package/dist/node_modules/@ant-design/fast-color/es/FastColor.js.map +0 -1
- package/dist/node_modules/@ant-design/icons/es/components/AntdIcon.js +0 -42
- package/dist/node_modules/@ant-design/icons/es/components/AntdIcon.js.map +0 -1
- package/dist/node_modules/@ant-design/icons/es/components/Context.js +0 -6
- package/dist/node_modules/@ant-design/icons/es/components/Context.js.map +0 -1
- package/dist/node_modules/@ant-design/icons/es/components/IconBase.js +0 -46
- package/dist/node_modules/@ant-design/icons/es/components/IconBase.js.map +0 -1
- package/dist/node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js +0 -19
- package/dist/node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js.map +0 -1
- package/dist/node_modules/@ant-design/icons/es/icons/CheckOutlined.js +0 -15
- package/dist/node_modules/@ant-design/icons/es/icons/CheckOutlined.js.map +0 -1
- package/dist/node_modules/@ant-design/icons/es/icons/DownOutlined.js +0 -15
- package/dist/node_modules/@ant-design/icons/es/icons/DownOutlined.js.map +0 -1
- package/dist/node_modules/@ant-design/icons/es/icons/UpOutlined.js +0 -15
- package/dist/node_modules/@ant-design/icons/es/icons/UpOutlined.js.map +0 -1
- package/dist/node_modules/@ant-design/icons/es/utils.js +0 -130
- package/dist/node_modules/@ant-design/icons/es/utils.js.map +0 -1
- package/dist/node_modules/@ant-design/icons-svg/es/asn/CheckOutlined.js +0 -5
- package/dist/node_modules/@ant-design/icons-svg/es/asn/CheckOutlined.js.map +0 -1
- package/dist/node_modules/@ant-design/icons-svg/es/asn/DownOutlined.js +0 -5
- package/dist/node_modules/@ant-design/icons-svg/es/asn/DownOutlined.js.map +0 -1
- package/dist/node_modules/@ant-design/icons-svg/es/asn/UpOutlined.js +0 -5
- package/dist/node_modules/@ant-design/icons-svg/es/asn/UpOutlined.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -9
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -7
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -13
- package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +0 -13
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +0 -22
- package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -8
- package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +0 -26
- package/dist/node_modules/@babel/runtime/helpers/esm/objectSpread2.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +0 -14
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -13
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +0 -11
- package/dist/node_modules/@babel/runtime/helpers/esm/slicedToArray.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -15
- package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -10
- package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -12
- package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -12
- package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js.map +0 -1
- package/dist/node_modules/@formatjs/ecma402-abstract/lib/utils.js +0 -45
- package/dist/node_modules/@formatjs/ecma402-abstract/lib/utils.js.map +0 -1
- package/dist/node_modules/@formatjs/fast-memoize/lib/index.js +0 -52
- package/dist/node_modules/@formatjs/fast-memoize/lib/index.js.map +0 -1
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/date-time-pattern-generator.js +0 -42
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/date-time-pattern-generator.js.map +0 -1
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/error.js +0 -8
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/error.js.map +0 -1
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/index.js +0 -39
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/index.js.map +0 -1
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/parser.js +0 -586
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/parser.js.map +0 -1
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js +0 -5
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js.map +0 -1
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/time-data.generated.js +0 -1419
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/time-data.generated.js.map +0 -1
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/types.js +0 -57
- package/dist/node_modules/@formatjs/icu-messageformat-parser/lib/types.js.map +0 -1
- package/dist/node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js +0 -113
- package/dist/node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js.map +0 -1
- package/dist/node_modules/@formatjs/icu-skeleton-parser/lib/number.js +0 -219
- package/dist/node_modules/@formatjs/icu-skeleton-parser/lib/number.js.map +0 -1
- package/dist/node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js +0 -5
- package/dist/node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js.map +0 -1
- package/dist/node_modules/@formatjs/intl/lib/src/create-intl.js +0 -45
- package/dist/node_modules/@formatjs/intl/lib/src/create-intl.js.map +0 -1
- package/dist/node_modules/@formatjs/intl/lib/src/dateTime.js +0 -94
- package/dist/node_modules/@formatjs/intl/lib/src/dateTime.js.map +0 -1
- package/dist/node_modules/@formatjs/intl/lib/src/displayName.js +0 -25
- package/dist/node_modules/@formatjs/intl/lib/src/displayName.js.map +0 -1
- package/dist/node_modules/@formatjs/intl/lib/src/error.js +0 -96
- package/dist/node_modules/@formatjs/intl/lib/src/error.js.map +0 -1
- package/dist/node_modules/@formatjs/intl/lib/src/list.js +0 -48
- package/dist/node_modules/@formatjs/intl/lib/src/list.js.map +0 -1
- package/dist/node_modules/@formatjs/intl/lib/src/message.js +0 -70
- package/dist/node_modules/@formatjs/intl/lib/src/message.js.map +0 -1
- package/dist/node_modules/@formatjs/intl/lib/src/number.js +0 -58
- package/dist/node_modules/@formatjs/intl/lib/src/number.js.map +0 -1
- package/dist/node_modules/@formatjs/intl/lib/src/plural.js +0 -21
- package/dist/node_modules/@formatjs/intl/lib/src/plural.js.map +0 -1
- package/dist/node_modules/@formatjs/intl/lib/src/relativeTime.js +0 -27
- package/dist/node_modules/@formatjs/intl/lib/src/relativeTime.js.map +0 -1
- package/dist/node_modules/@formatjs/intl/lib/src/utils.js +0 -126
- package/dist/node_modules/@formatjs/intl/lib/src/utils.js.map +0 -1
- package/dist/node_modules/@kne/global-context/dist/index.modern.js +0 -62
- package/dist/node_modules/@kne/global-context/dist/index.modern.js.map +0 -1
- package/dist/node_modules/@kne/react-fetch/dist/index.modern.js +0 -483
- package/dist/node_modules/@kne/react-fetch/dist/index.modern.js.map +0 -1
- package/dist/node_modules/@kne/react-intl/dist/index.modern.js +0 -173
- package/dist/node_modules/@kne/react-intl/dist/index.modern.js.map +0 -1
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/index.js +0 -9
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/index.js.map +0 -1
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/createFormattedComponent.js +0 -36
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/createFormattedComponent.js.map +0 -1
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/createIntl.js +0 -49
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/createIntl.js.map +0 -1
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/injectIntl.js +0 -10
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/injectIntl.js.map +0 -1
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/provider.js +0 -49
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/provider.js.map +0 -1
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/useIntl.js +0 -11
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/components/useIntl.js.map +0 -1
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/utils.js +0 -35
- package/dist/node_modules/@kne/react-intl/node_modules/react-intl/lib/src/utils.js.map +0 -1
- package/dist/node_modules/@kne/responsive-utils/dist/index.modern.js +0 -239
- package/dist/node_modules/@kne/responsive-utils/dist/index.modern.js.map +0 -1
- package/dist/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +0 -71
- package/dist/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js.map +0 -1
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js +0 -96
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js.map +0 -1
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js +0 -79
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js.map +0 -1
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +0 -11
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/index.js.map +0 -1
- package/dist/node_modules/intl-messageformat/lib/src/core.js +0 -176
- package/dist/node_modules/intl-messageformat/lib/src/core.js.map +0 -1
- package/dist/node_modules/intl-messageformat/lib/src/error.js +0 -53
- package/dist/node_modules/intl-messageformat/lib/src/error.js.map +0 -1
- package/dist/node_modules/intl-messageformat/lib/src/formatters.js +0 -121
- package/dist/node_modules/intl-messageformat/lib/src/formatters.js.map +0 -1
- package/dist/node_modules/lodash/_DataView.js +0 -13
- package/dist/node_modules/lodash/_DataView.js.map +0 -1
- package/dist/node_modules/lodash/_Hash.js +0 -23
- package/dist/node_modules/lodash/_Hash.js.map +0 -1
- package/dist/node_modules/lodash/_ListCache.js +0 -23
- package/dist/node_modules/lodash/_ListCache.js.map +0 -1
- package/dist/node_modules/lodash/_Map.js +0 -13
- package/dist/node_modules/lodash/_Map.js.map +0 -1
- package/dist/node_modules/lodash/_MapCache.js +0 -23
- package/dist/node_modules/lodash/_MapCache.js.map +0 -1
- package/dist/node_modules/lodash/_Promise.js +0 -13
- package/dist/node_modules/lodash/_Promise.js.map +0 -1
- package/dist/node_modules/lodash/_Set.js +0 -13
- package/dist/node_modules/lodash/_Set.js.map +0 -1
- package/dist/node_modules/lodash/_SetCache.js +0 -19
- package/dist/node_modules/lodash/_SetCache.js.map +0 -1
- package/dist/node_modules/lodash/_Stack.js +0 -21
- package/dist/node_modules/lodash/_Stack.js.map +0 -1
- package/dist/node_modules/lodash/_Symbol.js +0 -12
- package/dist/node_modules/lodash/_Symbol.js.map +0 -1
- package/dist/node_modules/lodash/_Uint8Array.js +0 -12
- package/dist/node_modules/lodash/_Uint8Array.js.map +0 -1
- package/dist/node_modules/lodash/_WeakMap.js +0 -13
- package/dist/node_modules/lodash/_WeakMap.js.map +0 -1
- package/dist/node_modules/lodash/_apply.js +0 -23
- package/dist/node_modules/lodash/_apply.js.map +0 -1
- package/dist/node_modules/lodash/_arrayEach.js +0 -15
- package/dist/node_modules/lodash/_arrayEach.js.map +0 -1
- package/dist/node_modules/lodash/_arrayFilter.js +0 -17
- package/dist/node_modules/lodash/_arrayFilter.js.map +0 -1
- package/dist/node_modules/lodash/_arrayLikeKeys.js +0 -27
- package/dist/node_modules/lodash/_arrayLikeKeys.js.map +0 -1
- package/dist/node_modules/lodash/_arrayMap.js +0 -15
- package/dist/node_modules/lodash/_arrayMap.js.map +0 -1
- package/dist/node_modules/lodash/_arrayPush.js +0 -15
- package/dist/node_modules/lodash/_arrayPush.js.map +0 -1
- package/dist/node_modules/lodash/_arraySome.js +0 -16
- package/dist/node_modules/lodash/_arraySome.js.map +0 -1
- package/dist/node_modules/lodash/_assignMergeValue.js +0 -16
- package/dist/node_modules/lodash/_assignMergeValue.js.map +0 -1
- package/dist/node_modules/lodash/_assignValue.js +0 -17
- package/dist/node_modules/lodash/_assignValue.js.map +0 -1
- package/dist/node_modules/lodash/_assocIndexOf.js +0 -18
- package/dist/node_modules/lodash/_assocIndexOf.js.map +0 -1
- package/dist/node_modules/lodash/_baseAssign.js +0 -16
- package/dist/node_modules/lodash/_baseAssign.js.map +0 -1
- package/dist/node_modules/lodash/_baseAssignIn.js +0 -16
- package/dist/node_modules/lodash/_baseAssignIn.js.map +0 -1
- package/dist/node_modules/lodash/_baseAssignValue.js +0 -20
- package/dist/node_modules/lodash/_baseAssignValue.js.map +0 -1
- package/dist/node_modules/lodash/_baseClone.js +0 -71
- package/dist/node_modules/lodash/_baseClone.js.map +0 -1
- package/dist/node_modules/lodash/_baseCreate.js +0 -24
- package/dist/node_modules/lodash/_baseCreate.js.map +0 -1
- package/dist/node_modules/lodash/_baseFlatten.js +0 -21
- package/dist/node_modules/lodash/_baseFlatten.js.map +0 -1
- package/dist/node_modules/lodash/_baseFor.js +0 -12
- package/dist/node_modules/lodash/_baseFor.js.map +0 -1
- package/dist/node_modules/lodash/_baseForOwn.js +0 -16
- package/dist/node_modules/lodash/_baseForOwn.js.map +0 -1
- package/dist/node_modules/lodash/_baseGet.js +0 -19
- package/dist/node_modules/lodash/_baseGet.js.map +0 -1
- package/dist/node_modules/lodash/_baseGetAllKeys.js +0 -17
- package/dist/node_modules/lodash/_baseGetAllKeys.js.map +0 -1
- package/dist/node_modules/lodash/_baseGetTag.js +0 -17
- package/dist/node_modules/lodash/_baseGetTag.js.map +0 -1
- package/dist/node_modules/lodash/_baseHasIn.js +0 -13
- package/dist/node_modules/lodash/_baseHasIn.js.map +0 -1
- package/dist/node_modules/lodash/_baseIsArguments.js +0 -16
- package/dist/node_modules/lodash/_baseIsArguments.js.map +0 -1
- package/dist/node_modules/lodash/_baseIsEqual.js +0 -16
- package/dist/node_modules/lodash/_baseIsEqual.js.map +0 -1
- package/dist/node_modules/lodash/_baseIsEqualDeep.js +0 -39
- package/dist/node_modules/lodash/_baseIsEqualDeep.js.map +0 -1
- package/dist/node_modules/lodash/_baseIsMap.js +0 -16
- package/dist/node_modules/lodash/_baseIsMap.js.map +0 -1
- package/dist/node_modules/lodash/_baseIsMatch.js +0 -38
- package/dist/node_modules/lodash/_baseIsMatch.js.map +0 -1
- package/dist/node_modules/lodash/_baseIsNative.js +0 -23
- package/dist/node_modules/lodash/_baseIsNative.js.map +0 -1
- package/dist/node_modules/lodash/_baseIsSet.js +0 -16
- package/dist/node_modules/lodash/_baseIsSet.js.map +0 -1
- package/dist/node_modules/lodash/_baseIsTypedArray.js +0 -18
- package/dist/node_modules/lodash/_baseIsTypedArray.js.map +0 -1
- package/dist/node_modules/lodash/_baseIteratee.js +0 -19
- package/dist/node_modules/lodash/_baseIteratee.js.map +0 -1
- package/dist/node_modules/lodash/_baseKeys.js +0 -21
- package/dist/node_modules/lodash/_baseKeys.js.map +0 -1
- package/dist/node_modules/lodash/_baseKeysIn.js +0 -22
- package/dist/node_modules/lodash/_baseKeysIn.js.map +0 -1
- package/dist/node_modules/lodash/_baseMatches.js +0 -20
- package/dist/node_modules/lodash/_baseMatches.js.map +0 -1
- package/dist/node_modules/lodash/_baseMatchesProperty.js +0 -24
- package/dist/node_modules/lodash/_baseMatchesProperty.js.map +0 -1
- package/dist/node_modules/lodash/_baseMerge.js +0 -28
- package/dist/node_modules/lodash/_baseMerge.js.map +0 -1
- package/dist/node_modules/lodash/_baseMergeDeep.js +0 -39
- package/dist/node_modules/lodash/_baseMergeDeep.js.map +0 -1
- package/dist/node_modules/lodash/_basePick.js +0 -18
- package/dist/node_modules/lodash/_basePick.js.map +0 -1
- package/dist/node_modules/lodash/_basePickBy.js +0 -21
- package/dist/node_modules/lodash/_basePickBy.js.map +0 -1
- package/dist/node_modules/lodash/_baseProperty.js +0 -15
- package/dist/node_modules/lodash/_baseProperty.js.map +0 -1
- package/dist/node_modules/lodash/_basePropertyDeep.js +0 -17
- package/dist/node_modules/lodash/_basePropertyDeep.js.map +0 -1
- package/dist/node_modules/lodash/_baseRest.js +0 -17
- package/dist/node_modules/lodash/_baseRest.js.map +0 -1
- package/dist/node_modules/lodash/_baseSet.js +0 -32
- package/dist/node_modules/lodash/_baseSet.js.map +0 -1
- package/dist/node_modules/lodash/_baseSetToString.js +0 -21
- package/dist/node_modules/lodash/_baseSetToString.js.map +0 -1
- package/dist/node_modules/lodash/_baseSlice.js +0 -17
- package/dist/node_modules/lodash/_baseSlice.js.map +0 -1
- package/dist/node_modules/lodash/_baseTimes.js +0 -15
- package/dist/node_modules/lodash/_baseTimes.js.map +0 -1
- package/dist/node_modules/lodash/_baseToString.js +0 -25
- package/dist/node_modules/lodash/_baseToString.js.map +0 -1
- package/dist/node_modules/lodash/_baseUnary.js +0 -15
- package/dist/node_modules/lodash/_baseUnary.js.map +0 -1
- package/dist/node_modules/lodash/_baseUnset.js +0 -28
- package/dist/node_modules/lodash/_baseUnset.js.map +0 -1
- package/dist/node_modules/lodash/_cacheHas.js +0 -13
- package/dist/node_modules/lodash/_cacheHas.js.map +0 -1
- package/dist/node_modules/lodash/_castPath.js +0 -18
- package/dist/node_modules/lodash/_castPath.js.map +0 -1
- package/dist/node_modules/lodash/_cloneArrayBuffer.js +0 -16
- package/dist/node_modules/lodash/_cloneArrayBuffer.js.map +0 -1
- package/dist/node_modules/lodash/_cloneBuffer.js +0 -20
- package/dist/node_modules/lodash/_cloneBuffer.js.map +0 -1
- package/dist/node_modules/lodash/_cloneDataView.js +0 -16
- package/dist/node_modules/lodash/_cloneDataView.js.map +0 -1
- package/dist/node_modules/lodash/_cloneRegExp.js +0 -15
- package/dist/node_modules/lodash/_cloneRegExp.js.map +0 -1
- package/dist/node_modules/lodash/_cloneSymbol.js +0 -15
- package/dist/node_modules/lodash/_cloneSymbol.js.map +0 -1
- package/dist/node_modules/lodash/_cloneTypedArray.js +0 -16
- package/dist/node_modules/lodash/_cloneTypedArray.js.map +0 -1
- package/dist/node_modules/lodash/_copyArray.js +0 -16
- package/dist/node_modules/lodash/_copyArray.js.map +0 -1
- package/dist/node_modules/lodash/_copyObject.js +0 -22
- package/dist/node_modules/lodash/_copyObject.js.map +0 -1
- package/dist/node_modules/lodash/_copySymbols.js +0 -16
- package/dist/node_modules/lodash/_copySymbols.js.map +0 -1
- package/dist/node_modules/lodash/_copySymbolsIn.js +0 -16
- package/dist/node_modules/lodash/_copySymbolsIn.js.map +0 -1
- package/dist/node_modules/lodash/_coreJsData.js +0 -12
- package/dist/node_modules/lodash/_coreJsData.js.map +0 -1
- package/dist/node_modules/lodash/_createAssigner.js +0 -23
- package/dist/node_modules/lodash/_createAssigner.js.map +0 -1
- package/dist/node_modules/lodash/_createBaseFor.js +0 -20
- package/dist/node_modules/lodash/_createBaseFor.js.map +0 -1
- package/dist/node_modules/lodash/_customOmitClone.js +0 -15
- package/dist/node_modules/lodash/_customOmitClone.js.map +0 -1
- package/dist/node_modules/lodash/_defineProperty.js +0 -18
- package/dist/node_modules/lodash/_defineProperty.js.map +0 -1
- package/dist/node_modules/lodash/_equalArrays.js +0 -47
- package/dist/node_modules/lodash/_equalArrays.js.map +0 -1
- package/dist/node_modules/lodash/_equalByTag.js +0 -52
- package/dist/node_modules/lodash/_equalByTag.js.map +0 -1
- package/dist/node_modules/lodash/_equalObjects.js +0 -43
- package/dist/node_modules/lodash/_equalObjects.js.map +0 -1
- package/dist/node_modules/lodash/_flatRest.js +0 -17
- package/dist/node_modules/lodash/_flatRest.js.map +0 -1
- package/dist/node_modules/lodash/_freeGlobal.js +0 -12
- package/dist/node_modules/lodash/_freeGlobal.js.map +0 -1
- package/dist/node_modules/lodash/_getAllKeys.js +0 -17
- package/dist/node_modules/lodash/_getAllKeys.js.map +0 -1
- package/dist/node_modules/lodash/_getAllKeysIn.js +0 -17
- package/dist/node_modules/lodash/_getAllKeysIn.js.map +0 -1
- package/dist/node_modules/lodash/_getMapData.js +0 -16
- package/dist/node_modules/lodash/_getMapData.js.map +0 -1
- package/dist/node_modules/lodash/_getMatchData.js +0 -20
- package/dist/node_modules/lodash/_getMatchData.js.map +0 -1
- package/dist/node_modules/lodash/_getNative.js +0 -17
- package/dist/node_modules/lodash/_getNative.js.map +0 -1
- package/dist/node_modules/lodash/_getPrototype.js +0 -12
- package/dist/node_modules/lodash/_getPrototype.js.map +0 -1
- package/dist/node_modules/lodash/_getRawTag.js +0 -22
- package/dist/node_modules/lodash/_getRawTag.js.map +0 -1
- package/dist/node_modules/lodash/_getSymbols.js +0 -17
- package/dist/node_modules/lodash/_getSymbols.js.map +0 -1
- package/dist/node_modules/lodash/_getSymbolsIn.js +0 -19
- package/dist/node_modules/lodash/_getSymbolsIn.js.map +0 -1
- package/dist/node_modules/lodash/_getTag.js +0 -34
- package/dist/node_modules/lodash/_getTag.js.map +0 -1
- package/dist/node_modules/lodash/_getValue.js +0 -13
- package/dist/node_modules/lodash/_getValue.js.map +0 -1
- package/dist/node_modules/lodash/_hasPath.js +0 -27
- package/dist/node_modules/lodash/_hasPath.js.map +0 -1
- package/dist/node_modules/lodash/_hashClear.js +0 -15
- package/dist/node_modules/lodash/_hashClear.js.map +0 -1
- package/dist/node_modules/lodash/_hashDelete.js +0 -14
- package/dist/node_modules/lodash/_hashDelete.js.map +0 -1
- package/dist/node_modules/lodash/_hashGet.js +0 -20
- package/dist/node_modules/lodash/_hashGet.js.map +0 -1
- package/dist/node_modules/lodash/_hashHas.js +0 -16
- package/dist/node_modules/lodash/_hashHas.js.map +0 -1
- package/dist/node_modules/lodash/_hashSet.js +0 -16
- package/dist/node_modules/lodash/_hashSet.js.map +0 -1
- package/dist/node_modules/lodash/_initCloneArray.js +0 -15
- package/dist/node_modules/lodash/_initCloneArray.js.map +0 -1
- package/dist/node_modules/lodash/_initCloneByTag.js +0 -49
- package/dist/node_modules/lodash/_initCloneByTag.js.map +0 -1
- package/dist/node_modules/lodash/_initCloneObject.js +0 -17
- package/dist/node_modules/lodash/_initCloneObject.js.map +0 -1
- package/dist/node_modules/lodash/_isFlattenable.js +0 -17
- package/dist/node_modules/lodash/_isFlattenable.js.map +0 -1
- package/dist/node_modules/lodash/_isIndex.js +0 -15
- package/dist/node_modules/lodash/_isIndex.js.map +0 -1
- package/dist/node_modules/lodash/_isIterateeCall.js +0 -21
- package/dist/node_modules/lodash/_isIterateeCall.js.map +0 -1
- package/dist/node_modules/lodash/_isKey.js +0 -19
- package/dist/node_modules/lodash/_isKey.js.map +0 -1
- package/dist/node_modules/lodash/_isKeyable.js +0 -14
- package/dist/node_modules/lodash/_isKeyable.js.map +0 -1
- package/dist/node_modules/lodash/_isMasked.js +0 -18
- package/dist/node_modules/lodash/_isMasked.js.map +0 -1
- package/dist/node_modules/lodash/_isPrototype.js +0 -15
- package/dist/node_modules/lodash/_isPrototype.js.map +0 -1
- package/dist/node_modules/lodash/_isStrictComparable.js +0 -15
- package/dist/node_modules/lodash/_isStrictComparable.js.map +0 -1
- package/dist/node_modules/lodash/_listCacheClear.js +0 -13
- package/dist/node_modules/lodash/_listCacheClear.js.map +0 -1
- package/dist/node_modules/lodash/_listCacheDelete.js +0 -19
- package/dist/node_modules/lodash/_listCacheDelete.js.map +0 -1
- package/dist/node_modules/lodash/_listCacheGet.js +0 -16
- package/dist/node_modules/lodash/_listCacheGet.js.map +0 -1
- package/dist/node_modules/lodash/_listCacheHas.js +0 -15
- package/dist/node_modules/lodash/_listCacheHas.js.map +0 -1
- package/dist/node_modules/lodash/_listCacheSet.js +0 -16
- package/dist/node_modules/lodash/_listCacheSet.js.map +0 -1
- package/dist/node_modules/lodash/_mapCacheClear.js +0 -21
- package/dist/node_modules/lodash/_mapCacheClear.js.map +0 -1
- package/dist/node_modules/lodash/_mapCacheDelete.js +0 -16
- package/dist/node_modules/lodash/_mapCacheDelete.js.map +0 -1
- package/dist/node_modules/lodash/_mapCacheGet.js +0 -15
- package/dist/node_modules/lodash/_mapCacheGet.js.map +0 -1
- package/dist/node_modules/lodash/_mapCacheHas.js +0 -15
- package/dist/node_modules/lodash/_mapCacheHas.js.map +0 -1
- package/dist/node_modules/lodash/_mapCacheSet.js +0 -16
- package/dist/node_modules/lodash/_mapCacheSet.js.map +0 -1
- package/dist/node_modules/lodash/_mapToArray.js +0 -16
- package/dist/node_modules/lodash/_mapToArray.js.map +0 -1
- package/dist/node_modules/lodash/_matchesStrictComparable.js +0 -15
- package/dist/node_modules/lodash/_matchesStrictComparable.js.map +0 -1
- package/dist/node_modules/lodash/_memoizeCapped.js +0 -18
- package/dist/node_modules/lodash/_memoizeCapped.js.map +0 -1
- package/dist/node_modules/lodash/_nativeCreate.js +0 -12
- package/dist/node_modules/lodash/_nativeCreate.js.map +0 -1
- package/dist/node_modules/lodash/_nativeKeys.js +0 -12
- package/dist/node_modules/lodash/_nativeKeys.js.map +0 -1
- package/dist/node_modules/lodash/_nativeKeysIn.js +0 -17
- package/dist/node_modules/lodash/_nativeKeysIn.js.map +0 -1
- package/dist/node_modules/lodash/_nodeUtil.js +0 -20
- package/dist/node_modules/lodash/_nodeUtil.js.map +0 -1
- package/dist/node_modules/lodash/_objectToString.js +0 -14
- package/dist/node_modules/lodash/_objectToString.js.map +0 -1
- package/dist/node_modules/lodash/_overArg.js +0 -15
- package/dist/node_modules/lodash/_overArg.js.map +0 -1
- package/dist/node_modules/lodash/_overRest.js +0 -22
- package/dist/node_modules/lodash/_overRest.js.map +0 -1
- package/dist/node_modules/lodash/_parent.js +0 -16
- package/dist/node_modules/lodash/_parent.js.map +0 -1
- package/dist/node_modules/lodash/_root.js +0 -12
- package/dist/node_modules/lodash/_root.js.map +0 -1
- package/dist/node_modules/lodash/_safeGet.js +0 -14
- package/dist/node_modules/lodash/_safeGet.js.map +0 -1
- package/dist/node_modules/lodash/_setCacheAdd.js +0 -14
- package/dist/node_modules/lodash/_setCacheAdd.js.map +0 -1
- package/dist/node_modules/lodash/_setCacheHas.js +0 -13
- package/dist/node_modules/lodash/_setCacheHas.js.map +0 -1
- package/dist/node_modules/lodash/_setToArray.js +0 -16
- package/dist/node_modules/lodash/_setToArray.js.map +0 -1
- package/dist/node_modules/lodash/_setToString.js +0 -13
- package/dist/node_modules/lodash/_setToString.js.map +0 -1
- package/dist/node_modules/lodash/_shortOut.js +0 -23
- package/dist/node_modules/lodash/_shortOut.js.map +0 -1
- package/dist/node_modules/lodash/_stackClear.js +0 -15
- package/dist/node_modules/lodash/_stackClear.js.map +0 -1
- package/dist/node_modules/lodash/_stackDelete.js +0 -14
- package/dist/node_modules/lodash/_stackDelete.js.map +0 -1
- package/dist/node_modules/lodash/_stackGet.js +0 -13
- package/dist/node_modules/lodash/_stackGet.js.map +0 -1
- package/dist/node_modules/lodash/_stackHas.js +0 -13
- package/dist/node_modules/lodash/_stackHas.js.map +0 -1
- package/dist/node_modules/lodash/_stackSet.js +0 -24
- package/dist/node_modules/lodash/_stackSet.js.map +0 -1
- package/dist/node_modules/lodash/_stringToPath.js +0 -17
- package/dist/node_modules/lodash/_stringToPath.js.map +0 -1
- package/dist/node_modules/lodash/_toKey.js +0 -18
- package/dist/node_modules/lodash/_toKey.js.map +0 -1
- package/dist/node_modules/lodash/_toSource.js +0 -24
- package/dist/node_modules/lodash/_toSource.js.map +0 -1
- package/dist/node_modules/lodash/clone.js +0 -15
- package/dist/node_modules/lodash/clone.js.map +0 -1
- package/dist/node_modules/lodash/constant.js +0 -15
- package/dist/node_modules/lodash/constant.js.map +0 -1
- package/dist/node_modules/lodash/eq.js +0 -13
- package/dist/node_modules/lodash/eq.js.map +0 -1
- package/dist/node_modules/lodash/flatten.js +0 -16
- package/dist/node_modules/lodash/flatten.js.map +0 -1
- package/dist/node_modules/lodash/get.js +0 -16
- package/dist/node_modules/lodash/get.js.map +0 -1
- package/dist/node_modules/lodash/hasIn.js +0 -16
- package/dist/node_modules/lodash/hasIn.js.map +0 -1
- package/dist/node_modules/lodash/identity.js +0 -13
- package/dist/node_modules/lodash/identity.js.map +0 -1
- package/dist/node_modules/lodash/isArguments.js +0 -17
- package/dist/node_modules/lodash/isArguments.js.map +0 -1
- package/dist/node_modules/lodash/isArray.js +0 -11
- package/dist/node_modules/lodash/isArray.js.map +0 -1
- package/dist/node_modules/lodash/isArrayLike.js +0 -16
- package/dist/node_modules/lodash/isArrayLike.js.map +0 -1
- package/dist/node_modules/lodash/isArrayLikeObject.js +0 -16
- package/dist/node_modules/lodash/isArrayLikeObject.js.map +0 -1
- package/dist/node_modules/lodash/isBuffer.js +0 -15
- package/dist/node_modules/lodash/isBuffer.js.map +0 -1
- package/dist/node_modules/lodash/isEqual.js +0 -15
- package/dist/node_modules/lodash/isEqual.js.map +0 -1
- package/dist/node_modules/lodash/isFunction.js +0 -19
- package/dist/node_modules/lodash/isFunction.js.map +0 -1
- package/dist/node_modules/lodash/isLength.js +0 -14
- package/dist/node_modules/lodash/isLength.js.map +0 -1
- package/dist/node_modules/lodash/isMap.js +0 -14
- package/dist/node_modules/lodash/isMap.js.map +0 -1
- package/dist/node_modules/lodash/isNumber.js +0 -16
- package/dist/node_modules/lodash/isNumber.js.map +0 -1
- package/dist/node_modules/lodash/isObject.js +0 -14
- package/dist/node_modules/lodash/isObject.js.map +0 -1
- package/dist/node_modules/lodash/isObjectLike.js +0 -13
- package/dist/node_modules/lodash/isObjectLike.js.map +0 -1
- package/dist/node_modules/lodash/isPlainObject.js +0 -23
- package/dist/node_modules/lodash/isPlainObject.js.map +0 -1
- package/dist/node_modules/lodash/isSet.js +0 -14
- package/dist/node_modules/lodash/isSet.js.map +0 -1
- package/dist/node_modules/lodash/isSymbol.js +0 -16
- package/dist/node_modules/lodash/isSymbol.js.map +0 -1
- package/dist/node_modules/lodash/isTypedArray.js +0 -14
- package/dist/node_modules/lodash/isTypedArray.js.map +0 -1
- package/dist/node_modules/lodash/keys.js +0 -17
- package/dist/node_modules/lodash/keys.js.map +0 -1
- package/dist/node_modules/lodash/keysIn.js +0 -17
- package/dist/node_modules/lodash/keysIn.js.map +0 -1
- package/dist/node_modules/lodash/last.js +0 -14
- package/dist/node_modules/lodash/last.js.map +0 -1
- package/dist/node_modules/lodash/memoize.js +0 -24
- package/dist/node_modules/lodash/memoize.js.map +0 -1
- package/dist/node_modules/lodash/merge.js +0 -15
- package/dist/node_modules/lodash/merge.js.map +0 -1
- package/dist/node_modules/lodash/omit.js +0 -30
- package/dist/node_modules/lodash/omit.js.map +0 -1
- package/dist/node_modules/lodash/pick.js +0 -15
- package/dist/node_modules/lodash/pick.js.map +0 -1
- package/dist/node_modules/lodash/property.js +0 -18
- package/dist/node_modules/lodash/property.js.map +0 -1
- package/dist/node_modules/lodash/stubArray.js +0 -13
- package/dist/node_modules/lodash/stubArray.js.map +0 -1
- package/dist/node_modules/lodash/stubFalse.js +0 -13
- package/dist/node_modules/lodash/stubFalse.js.map +0 -1
- package/dist/node_modules/lodash/toPlainObject.js +0 -16
- package/dist/node_modules/lodash/toPlainObject.js.map +0 -1
- package/dist/node_modules/lodash/toString.js +0 -15
- package/dist/node_modules/lodash/toString.js.map +0 -1
- package/dist/node_modules/lodash/transform.js +0 -31
- package/dist/node_modules/lodash/transform.js.map +0 -1
- package/dist/node_modules/object-hash/dist/object_hash.js +0 -783
- package/dist/node_modules/object-hash/dist/object_hash.js.map +0 -1
- package/dist/node_modules/rc-util/es/Dom/canUseDom.js +0 -7
- package/dist/node_modules/rc-util/es/Dom/canUseDom.js.map +0 -1
- package/dist/node_modules/rc-util/es/Dom/contains.js +0 -16
- package/dist/node_modules/rc-util/es/Dom/contains.js.map +0 -1
- package/dist/node_modules/rc-util/es/Dom/dynamicCSS.js +0 -80
- package/dist/node_modules/rc-util/es/Dom/dynamicCSS.js.map +0 -1
- package/dist/node_modules/rc-util/es/Dom/shadow.js +0 -15
- package/dist/node_modules/rc-util/es/Dom/shadow.js.map +0 -1
- package/dist/node_modules/rc-util/es/warning.js +0 -45
- package/dist/node_modules/rc-util/es/warning.js.map +0 -1
- package/dist/node_modules/tslib/tslib.es6.js +0 -45
- package/dist/node_modules/tslib/tslib.es6.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.js","sources":["../../../src/components/ReactFilter/SearchInput.jsx"],"sourcesContent":["// @ts-nocheck\nimport { Input } from 'antd';\nimport withFilterValue from './withFilterValue';\nimport { useIntl } from '@kne/react-intl';\nimport { useEffect, useRef, useState } from 'react';\nimport withLocale from './withLocale';\n\nconst { Search } = Input;\n\nconst SearchInput = withLocale(\n withFilterValue(({ label, onChange, value, placeholder, searchDelay = 500, ...props }) => {\n const { formatMessage } = useIntl({ moduleName: 'Filter' });\n const propsValue = value?.value;\n const [inputValue, setInputValue] = useState(propsValue || '');\n const inputValueRef = useRef('');\n const onChangeRef = useRef(onChange);\n const searchTimerRef = useRef(null);\n const isComposingRef = useRef(false);\n inputValueRef.current = inputValue;\n onChangeRef.current = onChange;\n\n const clearSearchTimer = () => {\n if (searchTimerRef.current) {\n clearTimeout(searchTimerRef.current);\n searchTimerRef.current = null;\n }\n };\n\n const submitSearch = (searchValue) => {\n onChangeRef.current?.(searchValue ? { label: searchValue, value: searchValue } : null);\n };\n\n const scheduleSearch = (searchValue) => {\n clearSearchTimer();\n searchTimerRef.current = setTimeout(() => {\n searchTimerRef.current = null;\n submitSearch(searchValue);\n }, searchDelay);\n };\n\n useEffect(() => {\n if (propsValue !== inputValueRef.current) {\n clearSearchTimer();\n setInputValue(propsValue || '');\n }\n }, [propsValue]);\n\n useEffect(() => {\n return () => {\n clearSearchTimer();\n };\n }, []);\n\n return (\n <Search\n {...props}\n placeholder={placeholder || formatMessage({ id: 'inputPlaceholder' }, { label })}\n value={inputValue}\n onChange={(e) => {\n const nextValue = e.target.value;\n setInputValue(nextValue);\n if (!isComposingRef.current) {\n scheduleSearch(nextValue);\n }\n }}\n onCompositionStart={() => {\n isComposingRef.current = true;\n clearSearchTimer();\n }}\n onCompositionEnd={(e) => {\n isComposingRef.current = false;\n const nextValue = e.target.value;\n setInputValue(nextValue);\n scheduleSearch(nextValue);\n }}\n onSearch={(searchValue) => {\n clearSearchTimer();\n submitSearch(searchValue);\n }}\n />\n );\n }),\n);\n\nexport default SearchInput;\n"],"names":["Search","Input","SearchInput","withLocale","withFilterValue","label","onChange","value","placeholder","searchDelay","props","formatMessage","useIntl","propsValue","inputValue","setInputValue","useState","inputValueRef","useRef","onChangeRef","searchTimerRef","isComposingRef","clearSearchTimer","submitSearch","searchValue","_a","scheduleSearch","useEffect","jsx","e","nextValue"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchInput.js","sources":["../../../src/components/ReactFilter/SearchInput.jsx"],"sourcesContent":["// @ts-nocheck\nimport { Input } from 'antd';\nimport withFilterValue from './withFilterValue';\nimport { useIntl } from '@kne/react-intl';\nimport { useEffect, useRef, useState } from 'react';\nimport withLocale from './withLocale';\n\nconst { Search } = Input;\n\nconst SearchInput = withLocale(\n withFilterValue(({ label, onChange, value, placeholder, searchDelay = 500, ...props }) => {\n const { formatMessage } = useIntl({ moduleName: 'Filter' });\n const propsValue = value?.value;\n const [inputValue, setInputValue] = useState(propsValue || '');\n const inputValueRef = useRef('');\n const onChangeRef = useRef(onChange);\n const searchTimerRef = useRef(null);\n const isComposingRef = useRef(false);\n inputValueRef.current = inputValue;\n onChangeRef.current = onChange;\n\n const clearSearchTimer = () => {\n if (searchTimerRef.current) {\n clearTimeout(searchTimerRef.current);\n searchTimerRef.current = null;\n }\n };\n\n const submitSearch = (searchValue) => {\n onChangeRef.current?.(searchValue ? { label: searchValue, value: searchValue } : null);\n };\n\n const scheduleSearch = (searchValue) => {\n clearSearchTimer();\n searchTimerRef.current = setTimeout(() => {\n searchTimerRef.current = null;\n submitSearch(searchValue);\n }, searchDelay);\n };\n\n useEffect(() => {\n if (propsValue !== inputValueRef.current) {\n clearSearchTimer();\n setInputValue(propsValue || '');\n }\n }, [propsValue]);\n\n useEffect(() => {\n return () => {\n clearSearchTimer();\n };\n }, []);\n\n return (\n <Search\n {...props}\n placeholder={placeholder || formatMessage({ id: 'inputPlaceholder' }, { label })}\n value={inputValue}\n onChange={(e) => {\n const nextValue = e.target.value;\n setInputValue(nextValue);\n if (!isComposingRef.current) {\n scheduleSearch(nextValue);\n }\n }}\n onCompositionStart={() => {\n isComposingRef.current = true;\n clearSearchTimer();\n }}\n onCompositionEnd={(e) => {\n isComposingRef.current = false;\n const nextValue = e.target.value;\n setInputValue(nextValue);\n scheduleSearch(nextValue);\n }}\n onSearch={(searchValue) => {\n clearSearchTimer();\n submitSearch(searchValue);\n }}\n />\n );\n }),\n);\n\nexport default SearchInput;\n"],"names":["Search","Input","SearchInput","withLocale","withFilterValue","label","onChange","value","placeholder","searchDelay","props","formatMessage","useIntl","propsValue","inputValue","setInputValue","useState","inputValueRef","useRef","onChangeRef","searchTimerRef","isComposingRef","clearSearchTimer","submitSearch","searchValue","_a","scheduleSearch","useEffect","jsx","e","nextValue"],"mappings":";;;;;;AAOA,MAAM,EAAE,QAAAA,MAAWC,GAEbC,IAAcC;AAAA,EAClBC,EAAgB,CAAC,EAAE,OAAAC,GAAO,UAAAC,GAAU,OAAAC,GAAO,aAAAC,GAAa,aAAAC,IAAc,KAAK,GAAGC,QAAY;AACxF,UAAM,EAAE,eAAAC,EAAA,IAAkBC,EAAQ,EAAE,YAAY,UAAU,GACpDC,IAAaN,KAAA,gBAAAA,EAAO,OACpB,CAACO,GAAYC,CAAa,IAAIC,EAASH,KAAc,EAAE,GACvDI,IAAgBC,EAAO,EAAE,GACzBC,IAAcD,EAAOZ,CAAQ,GAC7Bc,IAAiBF,EAAO,IAAI,GAC5BG,IAAiBH,EAAO,EAAK;AACnC,IAAAD,EAAc,UAAUH,GACxBK,EAAY,UAAUb;AAEtB,UAAMgB,IAAmB,MAAM;AAC7B,MAAIF,EAAe,YACjB,aAAaA,EAAe,OAAO,GACnCA,EAAe,UAAU;AAAA,IAE7B,GAEMG,IAAe,CAACC,MAAgB;;AACpC,OAAAC,IAAAN,EAAY,YAAZ,QAAAM,EAAA,KAAAN,GAAsBK,IAAc,EAAE,OAAOA,GAAa,OAAOA,EAAA,IAAgB;AAAA,IACnF,GAEME,IAAiB,CAACF,MAAgB;AACtC,MAAAF,EAAA,GACAF,EAAe,UAAU,WAAW,MAAM;AACxC,QAAAA,EAAe,UAAU,MACzBG,EAAaC,CAAW;AAAA,MAC1B,GAAGf,CAAW;AAAA,IAChB;AAEA,WAAAkB,EAAU,MAAM;AACd,MAAId,MAAeI,EAAc,YAC/BK,EAAA,GACAP,EAAcF,KAAc,EAAE;AAAA,IAElC,GAAG,CAACA,CAAU,CAAC,GAEfc,EAAU,MACD,MAAM;AACX,MAAAL,EAAA;AAAA,IACF,GACC,CAAA,CAAE,GAGH,gBAAAM;AAAA,MAAC5B;AAAA,MAAA;AAAA,QACE,GAAGU;AAAA,QACJ,aAAaF,KAAeG,EAAc,EAAE,IAAI,mBAAA,GAAsB,EAAE,OAAAN,GAAO;AAAA,QAC/E,OAAOS;AAAA,QACP,UAAU,CAACe,MAAM;AACf,gBAAMC,IAAYD,EAAE,OAAO;AAC3B,UAAAd,EAAce,CAAS,GAClBT,EAAe,WAClBK,EAAeI,CAAS;AAAA,QAE5B;AAAA,QACA,oBAAoB,MAAM;AACxB,UAAAT,EAAe,UAAU,IACzBC,EAAA;AAAA,QACF;AAAA,QACA,kBAAkB,CAACO,MAAM;AACvB,UAAAR,EAAe,UAAU;AACzB,gBAAMS,IAAYD,EAAE,OAAO;AAC3B,UAAAd,EAAce,CAAS,GACvBJ,EAAeI,CAAS;AAAA,QAC1B;AAAA,QACA,UAAU,CAACN,MAAgB;AACzB,UAAAF,EAAA,GACAC,EAAaC,CAAW;AAAA,QAC1B;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN,CAAC;AACH;"}
|
|
@@ -1,67 +1,65 @@
|
|
|
1
1
|
import { jsx as y, jsxs as _ } from "react/jsx-runtime";
|
|
2
2
|
import { Flex as Z, Space as q, Select as G, DatePicker as H } from "antd";
|
|
3
|
-
import "
|
|
4
|
-
import { useMemo as j, useRef as
|
|
5
|
-
import
|
|
3
|
+
import { useIntl as J } from "@kne/react-intl";
|
|
4
|
+
import { useMemo as j, useRef as K, useCallback as g } from "react";
|
|
5
|
+
import a from "dayjs";
|
|
6
6
|
import S from "classnames";
|
|
7
7
|
import u from "./style.module.scss.js";
|
|
8
|
-
import
|
|
9
|
-
import { MOBILE_POPUP_Z_INDEX as
|
|
8
|
+
import Q from "../../hooks/useFilterPopupContainer.js";
|
|
9
|
+
import { MOBILE_POPUP_Z_INDEX as W } from "../../constants/mobilePopup.js";
|
|
10
10
|
import "../../../../utils/ensureDayjsZhCn.js";
|
|
11
|
-
|
|
12
|
-
import "../../../../node_modules/@kne/react-intl/node_modules/react-intl/lib/index.js";
|
|
13
|
-
const $ = "react-filter-field-mobile-popup", pt = ({
|
|
11
|
+
const $ = "react-filter-field-mobile-popup", dt = ({
|
|
14
12
|
value: b,
|
|
15
|
-
onChange:
|
|
16
|
-
defaultValue:
|
|
17
|
-
shortcuts:
|
|
13
|
+
onChange: r,
|
|
14
|
+
defaultValue: F,
|
|
15
|
+
shortcuts: L = !0,
|
|
18
16
|
shortcutOptions: N,
|
|
19
|
-
...
|
|
17
|
+
...l
|
|
20
18
|
}) => {
|
|
21
19
|
var M, x, A, P, E, I;
|
|
22
|
-
const { formatMessage:
|
|
20
|
+
const { formatMessage: i } = J({ moduleName: "Filter" }), { isMobile: n, fixedModeClass: R, getPopupContainer: D } = Q(), O = S(
|
|
23
21
|
u["field-item-mobile-popup"],
|
|
24
22
|
$,
|
|
25
23
|
R
|
|
26
|
-
), p = n ? { zIndex:
|
|
27
|
-
["date",
|
|
28
|
-
["month",
|
|
29
|
-
["week",
|
|
24
|
+
), p = n ? { zIndex: W } : void 0, T = /* @__PURE__ */ new Map([
|
|
25
|
+
["date", i({ id: "customTime" })],
|
|
26
|
+
["month", i({ id: "monthly" })],
|
|
27
|
+
["week", i({ id: "weekly" })]
|
|
30
28
|
]), B = j(
|
|
31
29
|
() => [
|
|
32
30
|
{
|
|
33
|
-
label:
|
|
34
|
-
getValue: () => [
|
|
31
|
+
label: i({ id: "last7Days" }),
|
|
32
|
+
getValue: () => [a().subtract(7, "day").startOf("day"), a().endOf("day")]
|
|
35
33
|
},
|
|
36
34
|
{
|
|
37
|
-
label:
|
|
38
|
-
getValue: () => [
|
|
35
|
+
label: i({ id: "thisMonth" }),
|
|
36
|
+
getValue: () => [a().startOf("month"), a().endOf("month")]
|
|
39
37
|
},
|
|
40
38
|
{
|
|
41
|
-
label:
|
|
42
|
-
getValue: () => [
|
|
39
|
+
label: i({ id: "last3Months" }),
|
|
40
|
+
getValue: () => [a().subtract(3, "month").startOf("day"), a().endOf("day")]
|
|
43
41
|
},
|
|
44
42
|
{
|
|
45
|
-
label:
|
|
46
|
-
getValue: () => [
|
|
43
|
+
label: i({ id: "thisYear" }),
|
|
44
|
+
getValue: () => [a().startOf("year"), a().endOf("day")]
|
|
47
45
|
},
|
|
48
46
|
{
|
|
49
|
-
label:
|
|
50
|
-
getValue: () => [
|
|
47
|
+
label: i({ id: "fullYear" }),
|
|
48
|
+
getValue: () => [a().startOf("year"), a().endOf("year")]
|
|
51
49
|
}
|
|
52
50
|
],
|
|
53
|
-
[
|
|
54
|
-
), c = N !== void 0 ? N :
|
|
51
|
+
[i]
|
|
52
|
+
), c = N !== void 0 ? N : L ? B : null, h = b !== void 0, v = K(F || { type: "date", value: null }), e = h ? b : v.current, m = g(
|
|
55
53
|
(t) => {
|
|
56
|
-
h || (v.current = typeof t == "function" ? t(v.current) : t),
|
|
54
|
+
h || (v.current = typeof t == "function" ? t(v.current) : t), r == null || r(typeof t == "function" ? t(e) : t);
|
|
57
55
|
},
|
|
58
|
-
[h,
|
|
56
|
+
[h, r, e]
|
|
59
57
|
), C = g(
|
|
60
58
|
(t) => {
|
|
61
|
-
const [s,
|
|
59
|
+
const [s, d] = t.getValue(), o = "date";
|
|
62
60
|
m({
|
|
63
|
-
type:
|
|
64
|
-
value: [s.startOf(
|
|
61
|
+
type: o,
|
|
62
|
+
value: [s.startOf(o).toDate(), d.endOf(o).toDate()]
|
|
65
63
|
});
|
|
66
64
|
},
|
|
67
65
|
[m]
|
|
@@ -69,8 +67,8 @@ const $ = "react-filter-field-mobile-popup", pt = ({
|
|
|
69
67
|
(t) => {
|
|
70
68
|
if (!(e != null && e.value) || !Array.isArray(e.value) || e.value.length !== 2)
|
|
71
69
|
return !1;
|
|
72
|
-
const [s,
|
|
73
|
-
return f.isSame(z,
|
|
70
|
+
const [s, d] = t.getValue(), o = (e == null ? void 0 : e.type) || "date", f = a(e.value[0]).startOf(o), Y = a(e.value[1]).endOf(o), z = s.startOf(o), X = d.endOf(o);
|
|
71
|
+
return f.isSame(z, o) && Y.isSame(X, o);
|
|
74
72
|
},
|
|
75
73
|
[e]
|
|
76
74
|
), U = j(() => !c || c.length === 0 ? null : /* @__PURE__ */ y("div", { className: u["shortcuts-container"], children: c.map((t, s) => /* @__PURE__ */ y(
|
|
@@ -101,11 +99,11 @@ const $ = "react-filter-field-mobile-popup", pt = ({
|
|
|
101
99
|
var f;
|
|
102
100
|
if (!((f = s == null ? void 0 : s.value) != null && f.length))
|
|
103
101
|
return { value: null, type: t || "date" };
|
|
104
|
-
const
|
|
102
|
+
const d = a(s.value[0]), o = a(s.value[1]);
|
|
105
103
|
return {
|
|
106
104
|
value: [
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
d.isValid() ? d.startOf(t || "date").toDate() : null,
|
|
106
|
+
o.isValid() ? o.endOf(t || "date").toDate() : null
|
|
109
107
|
],
|
|
110
108
|
type: t || "date"
|
|
111
109
|
};
|
|
@@ -120,25 +118,25 @@ const $ = "react-filter-field-mobile-popup", pt = ({
|
|
|
120
118
|
/* @__PURE__ */ y(
|
|
121
119
|
H.RangePicker,
|
|
122
120
|
{
|
|
123
|
-
...
|
|
121
|
+
...l,
|
|
124
122
|
getPopupContainer: D,
|
|
125
123
|
classNames: n ? {
|
|
126
|
-
...
|
|
124
|
+
...l.classNames,
|
|
127
125
|
popup: {
|
|
128
|
-
...(M =
|
|
129
|
-
root: S((A = (x =
|
|
126
|
+
...(M = l.classNames) == null ? void 0 : M.popup,
|
|
127
|
+
root: S((A = (x = l.classNames) == null ? void 0 : x.popup) == null ? void 0 : A.root, O)
|
|
130
128
|
}
|
|
131
|
-
} :
|
|
129
|
+
} : l.classNames,
|
|
132
130
|
styles: n ? {
|
|
133
|
-
...
|
|
131
|
+
...l.styles,
|
|
134
132
|
popup: {
|
|
135
|
-
...(P =
|
|
136
|
-
root: Object.assign({}, (I = (E =
|
|
133
|
+
...(P = l.styles) == null ? void 0 : P.popup,
|
|
134
|
+
root: Object.assign({}, (I = (E = l.styles) == null ? void 0 : E.popup) == null ? void 0 : I.root, p)
|
|
137
135
|
}
|
|
138
|
-
} :
|
|
136
|
+
} : l.styles,
|
|
139
137
|
popupStyle: p,
|
|
140
138
|
picker: (e == null ? void 0 : e.type) || "date",
|
|
141
|
-
value: Array.isArray(e == null ? void 0 : e.value) && e.value.length === 2 ? e.value.map((t) => t &&
|
|
139
|
+
value: Array.isArray(e == null ? void 0 : e.value) && e.value.length === 2 ? e.value.map((t) => t && a(t)) : null,
|
|
142
140
|
onChange: (t) => {
|
|
143
141
|
m((s) => Object.assign({ type: "date" }, s, {
|
|
144
142
|
value: t && t[0] && t[1] ? [
|
|
@@ -154,6 +152,6 @@ const $ = "react-filter-field-mobile-popup", pt = ({
|
|
|
154
152
|
] });
|
|
155
153
|
};
|
|
156
154
|
export {
|
|
157
|
-
|
|
155
|
+
dt as default
|
|
158
156
|
};
|
|
159
157
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/components/ReactFilter/common/TypeDateRangePickerField/index.jsx"],"sourcesContent":["// @ts-nocheck\nimport { DatePicker, Select, Space, Flex } from 'antd';\nimport { useIntl } from '@kne/react-intl';\nimport { useRef, useCallback, useMemo } from 'react';\nimport dayjs from 'dayjs';\nimport classnames from 'classnames';\nimport style from './style.module.scss';\nimport useFilterPopupContainer from '../../hooks/useFilterPopupContainer';\nimport { MOBILE_POPUP_Z_INDEX } from '../../constants/mobilePopup';\nimport '@/utils/ensureDayjsZhCn';\n\nconst FIELD_MOBILE_POPUP_CLASS = 'react-filter-field-mobile-popup';\n\nconst TypeDateRangePickerField = ({\n value: valueProp,\n onChange: onChangeProp,\n defaultValue,\n shortcuts = true,\n shortcutOptions,\n ...props\n}) => {\n const { formatMessage } = useIntl({ moduleName: 'Filter' });\n const { isMobile, fixedModeClass, getPopupContainer } = useFilterPopupContainer();\n const nestedPopupClassName = classnames(\n style['field-item-mobile-popup'],\n FIELD_MOBILE_POPUP_CLASS,\n fixedModeClass,\n );\n const nestedPopupStyle = isMobile ? { zIndex: MOBILE_POPUP_Z_INDEX } : undefined;\n\n const typeList = new Map([\n ['date', formatMessage({ id: 'customTime' })],\n ['month', formatMessage({ id: 'monthly' })],\n ['week', formatMessage({ id: 'weekly' })],\n ]);\n\n const defaultShortcuts = useMemo(\n () => [\n {\n label: formatMessage({ id: 'last7Days' }),\n getValue: () => [dayjs().subtract(7, 'day').startOf('day'), dayjs().endOf('day')],\n },\n {\n label: formatMessage({ id: 'thisMonth' }),\n getValue: () => [dayjs().startOf('month'), dayjs().endOf('month')],\n },\n {\n label: formatMessage({ id: 'last3Months' }),\n getValue: () => [dayjs().subtract(3, 'month').startOf('day'), dayjs().endOf('day')],\n },\n {\n label: formatMessage({ id: 'thisYear' }),\n getValue: () => [dayjs().startOf('year'), dayjs().endOf('day')],\n },\n {\n label: formatMessage({ id: 'fullYear' }),\n getValue: () => [dayjs().startOf('year'), dayjs().endOf('year')],\n },\n ],\n [formatMessage],\n );\n\n const currentShortcuts =\n shortcutOptions !== undefined ? shortcutOptions : shortcuts ? defaultShortcuts : null;\n\n const isControlled = valueProp !== undefined;\n const innerValueRef = useRef(defaultValue || { type: 'date', value: null });\n\n const value = isControlled ? valueProp : innerValueRef.current;\n\n const onChange = useCallback(\n (newValue) => {\n if (!isControlled) {\n innerValueRef.current =\n typeof newValue === 'function' ? newValue(innerValueRef.current) : newValue;\n }\n onChangeProp?.(typeof newValue === 'function' ? newValue(value) : newValue);\n },\n [isControlled, onChangeProp, value],\n );\n\n const handleShortcutClick = useCallback(\n (shortcut) => {\n const [start, end] = shortcut.getValue();\n const type = 'date';\n onChange({\n type,\n value: [start.startOf(type).toDate(), end.endOf(type).toDate()],\n });\n },\n [onChange],\n );\n\n const isShortcutActive = useCallback(\n (shortcut) => {\n if (!value?.value || !Array.isArray(value.value) || value.value.length !== 2) {\n return false;\n }\n const [start, end] = shortcut.getValue();\n const type = value?.type || 'date';\n const valueStart = dayjs(value.value[0]).startOf(type);\n const valueEnd = dayjs(value.value[1]).endOf(type);\n const shortcutStart = start.startOf(type);\n const shortcutEnd = end.endOf(type);\n return valueStart.isSame(shortcutStart, type) && valueEnd.isSame(shortcutEnd, type);\n },\n [value],\n );\n\n const renderShortcuts = useMemo(() => {\n if (!currentShortcuts || currentShortcuts.length === 0) {\n return null;\n }\n return (\n <div className={style['shortcuts-container']}>\n {currentShortcuts.map((shortcut, index) => (\n <span\n key={index}\n className={classnames(style['shortcut-item'], {\n [style['is-active']]: isShortcutActive(shortcut),\n })}\n onClick={() => handleShortcutClick(shortcut)}\n >\n {shortcut.label}\n </span>\n ))}\n </div>\n );\n }, [currentShortcuts, handleShortcutClick, isShortcutActive]);\n\n return (\n <Flex vertical gap={0}>\n <Space.Compact>\n <Select\n style={{ width: '120px' }}\n getPopupContainer={getPopupContainer}\n popupClassName={isMobile ? nestedPopupClassName : undefined}\n classNames={isMobile ? { popup: { root: nestedPopupClassName } } : undefined}\n popupStyle={nestedPopupStyle}\n styles={isMobile ? { popup: { root: nestedPopupStyle } } : undefined}\n value={value?.type || 'date'}\n onChange={(typeValue) => {\n onChange((currentValue) => {\n if (!currentValue?.value?.length) {\n return { value: null, type: typeValue || 'date' };\n }\n const startTime = dayjs(currentValue.value[0]);\n const endTime = dayjs(currentValue.value[1]);\n return {\n value: [\n startTime.isValid() ? startTime.startOf(typeValue || 'date').toDate() : null,\n endTime.isValid() ? endTime.endOf(typeValue || 'date').toDate() : null,\n ],\n type: typeValue || 'date',\n };\n });\n }}\n options={Array.from(typeList).map(([val, label]) => ({\n label,\n value: val,\n }))}\n />\n <DatePicker.RangePicker\n {...props}\n getPopupContainer={getPopupContainer}\n classNames={\n isMobile\n ? {\n ...props.classNames,\n popup: {\n ...props.classNames?.popup,\n root: classnames(props.classNames?.popup?.root, nestedPopupClassName),\n },\n }\n : props.classNames\n }\n styles={\n isMobile\n ? {\n ...props.styles,\n popup: {\n ...props.styles?.popup,\n root: Object.assign({}, props.styles?.popup?.root, nestedPopupStyle),\n },\n }\n : props.styles\n }\n popupStyle={nestedPopupStyle}\n picker={value?.type || 'date'}\n value={\n Array.isArray(value?.value) && value.value.length === 2\n ? value.value.map((item) => item && dayjs(item))\n : null\n }\n onChange={(dateValue) => {\n onChange((currentValue) => {\n return Object.assign({ type: 'date' }, currentValue, {\n value:\n dateValue && dateValue[0] && dateValue[1]\n ? [\n dateValue[0].startOf(currentValue?.type || 'date').toDate(),\n dateValue[1].endOf(currentValue?.type || 'date').toDate(),\n ]\n : null,\n });\n });\n }}\n />\n </Space.Compact>\n {renderShortcuts}\n </Flex>\n );\n};\n\nexport default TypeDateRangePickerField;\n"],"names":["FIELD_MOBILE_POPUP_CLASS","TypeDateRangePickerField","valueProp","onChangeProp","defaultValue","shortcuts","shortcutOptions","props","formatMessage","useIntl","isMobile","fixedModeClass","getPopupContainer","useFilterPopupContainer","nestedPopupClassName","classnames","style","nestedPopupStyle","MOBILE_POPUP_Z_INDEX","typeList","defaultShortcuts","useMemo","dayjs","currentShortcuts","isControlled","innerValueRef","useRef","value","onChange","useCallback","newValue","handleShortcutClick","shortcut","start","end","type","isShortcutActive","valueStart","valueEnd","shortcutStart","shortcutEnd","renderShortcuts","jsx","index","jsxs","Flex","Space","Select","typeValue","currentValue","_a","startTime","endTime","val","label","DatePicker","_c","_b","_d","_f","_e","item","dateValue"],"mappings":";;;;;;;;;;;;AAWA,MAAMA,IAA2B,mCAE3BC,KAA2B,CAAC;AAAA,EAChC,OAAOC;AAAA,EACP,UAAUC;AAAA,EACV,cAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,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qD,EAAc,UAAd,gBAAAD,EAAqB,MAAM1C,CAAgB;AAAA,YAAA;AAAA,UACrE,IAEFV,EAAM;AAAA,UAEZ,YAAYU;AAAA,UACZ,SAAQU,KAAA,gBAAAA,EAAO,SAAQ;AAAA,UACvB,OACE,MAAM,QAAQA,KAAA,gBAAAA,EAAO,KAAK,KAAKA,EAAM,MAAM,WAAW,IAClDA,EAAM,MAAM,IAAI,CAACkC,MAASA,KAAQvC,EAAMuC,CAAI,CAAC,IAC7C;AAAA,UAEN,UAAU,CAACC,MAAc;AACvB,YAAAlC,EAAS,CAACqB,MACD,OAAO,OAAO,EAAE,MAAM,OAAA,GAAUA,GAAc;AAAA,cACnD,OACEa,KAAaA,EAAU,CAAC,KAAKA,EAAU,CAAC,IACpC;AAAA,gBACEA,EAAU,CAAC,EAAE,SAAQb,KAAA,gBAAAA,EAAc,SAAQ,MAAM,EAAE,OAAA;AAAA,gBACnDa,EAAU,CAAC,EAAE,OAAMb,KAAA,gBAAAA,EAAc,SAAQ,MAAM,EAAE,OAAA;AAAA,cAAO,IAE1D;AAAA,YAAA,CACP,CACF;AAAA,UACH;AAAA,QAAA;AAAA,MAAA;AAAA,IACF,GACF;AAAA,IACCR;AAAA,EAAA,GACH;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/ReactFilter/common/TypeDateRangePickerField/index.jsx"],"sourcesContent":["// @ts-nocheck\nimport { DatePicker, Select, Space, Flex } from 'antd';\nimport { useIntl } from '@kne/react-intl';\nimport { useRef, useCallback, useMemo } from 'react';\nimport dayjs from 'dayjs';\nimport classnames from 'classnames';\nimport style from './style.module.scss';\nimport useFilterPopupContainer from '../../hooks/useFilterPopupContainer';\nimport { MOBILE_POPUP_Z_INDEX } from '../../constants/mobilePopup';\nimport '@/utils/ensureDayjsZhCn';\n\nconst FIELD_MOBILE_POPUP_CLASS = 'react-filter-field-mobile-popup';\n\nconst TypeDateRangePickerField = ({\n value: valueProp,\n onChange: onChangeProp,\n defaultValue,\n shortcuts = true,\n shortcutOptions,\n ...props\n}) => {\n const { formatMessage } = useIntl({ moduleName: 'Filter' });\n const { isMobile, fixedModeClass, getPopupContainer } = useFilterPopupContainer();\n const nestedPopupClassName = classnames(\n style['field-item-mobile-popup'],\n FIELD_MOBILE_POPUP_CLASS,\n fixedModeClass,\n );\n const nestedPopupStyle = isMobile ? { zIndex: MOBILE_POPUP_Z_INDEX } : undefined;\n\n const typeList = new Map([\n ['date', formatMessage({ id: 'customTime' })],\n ['month', formatMessage({ id: 'monthly' })],\n ['week', formatMessage({ id: 'weekly' })],\n ]);\n\n const defaultShortcuts = useMemo(\n () => [\n {\n label: formatMessage({ id: 'last7Days' }),\n getValue: () => [dayjs().subtract(7, 'day').startOf('day'), dayjs().endOf('day')],\n },\n {\n label: formatMessage({ id: 'thisMonth' }),\n getValue: () => [dayjs().startOf('month'), dayjs().endOf('month')],\n },\n {\n label: formatMessage({ id: 'last3Months' }),\n getValue: () => [dayjs().subtract(3, 'month').startOf('day'), dayjs().endOf('day')],\n },\n {\n label: formatMessage({ id: 'thisYear' }),\n getValue: () => [dayjs().startOf('year'), dayjs().endOf('day')],\n },\n {\n label: formatMessage({ id: 'fullYear' }),\n getValue: () => [dayjs().startOf('year'), dayjs().endOf('year')],\n },\n ],\n [formatMessage],\n );\n\n const currentShortcuts =\n shortcutOptions !== undefined ? shortcutOptions : shortcuts ? defaultShortcuts : null;\n\n const isControlled = valueProp !== undefined;\n const innerValueRef = useRef(defaultValue || { type: 'date', value: null });\n\n const value = isControlled ? valueProp : innerValueRef.current;\n\n const onChange = useCallback(\n (newValue) => {\n if (!isControlled) {\n innerValueRef.current =\n typeof newValue === 'function' ? newValue(innerValueRef.current) : newValue;\n }\n onChangeProp?.(typeof newValue === 'function' ? newValue(value) : newValue);\n },\n [isControlled, onChangeProp, value],\n );\n\n const handleShortcutClick = useCallback(\n (shortcut) => {\n const [start, end] = shortcut.getValue();\n const type = 'date';\n onChange({\n type,\n value: [start.startOf(type).toDate(), end.endOf(type).toDate()],\n });\n },\n [onChange],\n );\n\n const isShortcutActive = useCallback(\n (shortcut) => {\n if (!value?.value || !Array.isArray(value.value) || value.value.length !== 2) {\n return false;\n }\n const [start, end] = shortcut.getValue();\n const type = value?.type || 'date';\n const valueStart = dayjs(value.value[0]).startOf(type);\n const valueEnd = dayjs(value.value[1]).endOf(type);\n const shortcutStart = start.startOf(type);\n const shortcutEnd = end.endOf(type);\n return valueStart.isSame(shortcutStart, type) && valueEnd.isSame(shortcutEnd, type);\n },\n [value],\n );\n\n const renderShortcuts = useMemo(() => {\n if (!currentShortcuts || currentShortcuts.length === 0) {\n return null;\n }\n return (\n <div className={style['shortcuts-container']}>\n {currentShortcuts.map((shortcut, index) => (\n <span\n key={index}\n className={classnames(style['shortcut-item'], {\n [style['is-active']]: isShortcutActive(shortcut),\n })}\n onClick={() => handleShortcutClick(shortcut)}\n >\n {shortcut.label}\n </span>\n ))}\n </div>\n );\n }, [currentShortcuts, handleShortcutClick, isShortcutActive]);\n\n return (\n <Flex vertical gap={0}>\n <Space.Compact>\n <Select\n style={{ width: '120px' }}\n getPopupContainer={getPopupContainer}\n popupClassName={isMobile ? nestedPopupClassName : undefined}\n classNames={isMobile ? { popup: { root: nestedPopupClassName } } : undefined}\n popupStyle={nestedPopupStyle}\n styles={isMobile ? { popup: { root: nestedPopupStyle } } : undefined}\n value={value?.type || 'date'}\n onChange={(typeValue) => {\n onChange((currentValue) => {\n if (!currentValue?.value?.length) {\n return { value: null, type: typeValue || 'date' };\n }\n const startTime = dayjs(currentValue.value[0]);\n const endTime = dayjs(currentValue.value[1]);\n return {\n value: [\n startTime.isValid() ? startTime.startOf(typeValue || 'date').toDate() : null,\n endTime.isValid() ? endTime.endOf(typeValue || 'date').toDate() : null,\n ],\n type: typeValue || 'date',\n };\n });\n }}\n options={Array.from(typeList).map(([val, label]) => ({\n label,\n value: val,\n }))}\n />\n <DatePicker.RangePicker\n {...props}\n getPopupContainer={getPopupContainer}\n classNames={\n isMobile\n ? {\n ...props.classNames,\n popup: {\n ...props.classNames?.popup,\n root: classnames(props.classNames?.popup?.root, nestedPopupClassName),\n },\n }\n : props.classNames\n }\n styles={\n isMobile\n ? {\n ...props.styles,\n popup: {\n ...props.styles?.popup,\n root: Object.assign({}, props.styles?.popup?.root, nestedPopupStyle),\n },\n }\n : props.styles\n }\n popupStyle={nestedPopupStyle}\n picker={value?.type || 'date'}\n value={\n Array.isArray(value?.value) && value.value.length === 2\n ? value.value.map((item) => item && dayjs(item))\n : null\n }\n onChange={(dateValue) => {\n onChange((currentValue) => {\n return Object.assign({ type: 'date' }, currentValue, {\n value:\n dateValue && dateValue[0] && dateValue[1]\n ? [\n dateValue[0].startOf(currentValue?.type || 'date').toDate(),\n dateValue[1].endOf(currentValue?.type || 'date').toDate(),\n ]\n : null,\n });\n });\n }}\n />\n </Space.Compact>\n {renderShortcuts}\n </Flex>\n );\n};\n\nexport default TypeDateRangePickerField;\n"],"names":["FIELD_MOBILE_POPUP_CLASS","TypeDateRangePickerField","valueProp","onChangeProp","defaultValue","shortcuts","shortcutOptions","props","formatMessage","useIntl","isMobile","fixedModeClass","getPopupContainer","useFilterPopupContainer","nestedPopupClassName","classnames","style","nestedPopupStyle","MOBILE_POPUP_Z_INDEX","typeList","defaultShortcuts","useMemo","dayjs","currentShortcuts","isControlled","innerValueRef","useRef","value","onChange","useCallback","newValue","handleShortcutClick","shortcut","start","end","type","isShortcutActive","valueStart","valueEnd","shortcutStart","shortcutEnd","renderShortcuts","jsx","index","jsxs","Flex","Space","Select","typeValue","currentValue","_a","startTime","endTime","val","label","DatePicker","_c","_b","_d","_f","_e","item","dateValue"],"mappings":";;;;;;;;;;AAWA,MAAMA,IAA2B,mCAE3BC,KAA2B,CAAC;AAAA,EAChC,OAAOC;AAAA,EACP,UAAUC;AAAA,EACV,cAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,iBAAAC;AAAA,EACA,GAAGC;AACL,MAAM;;AACJ,QAAM,EAA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,MAAM1C,CAAgB;AAAA,YAAA;AAAA,UACrE,IAEFV,EAAM;AAAA,UAEZ,YAAYU;AAAA,UACZ,SAAQU,KAAA,gBAAAA,EAAO,SAAQ;AAAA,UACvB,OACE,MAAM,QAAQA,KAAA,gBAAAA,EAAO,KAAK,KAAKA,EAAM,MAAM,WAAW,IAClDA,EAAM,MAAM,IAAI,CAACkC,MAASA,KAAQvC,EAAMuC,CAAI,CAAC,IAC7C;AAAA,UAEN,UAAU,CAACC,MAAc;AACvB,YAAAlC,EAAS,CAACqB,MACD,OAAO,OAAO,EAAE,MAAM,OAAA,GAAUA,GAAc;AAAA,cACnD,OACEa,KAAaA,EAAU,CAAC,KAAKA,EAAU,CAAC,IACpC;AAAA,gBACEA,EAAU,CAAC,EAAE,SAAQb,KAAA,gBAAAA,EAAc,SAAQ,MAAM,EAAE,OAAA;AAAA,gBACnDa,EAAU,CAAC,EAAE,OAAMb,KAAA,gBAAAA,EAAc,SAAQ,MAAM,EAAE,OAAA;AAAA,cAAO,IAE1D;AAAA,YAAA,CACP,CACF;AAAA,UACH;AAAA,QAAA;AAAA,MAAA;AAAA,IACF,GACF;AAAA,IACCR;AAAA,EAAA,GACH;AAEJ;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import g from "../PopoverItem.js";
|
|
3
3
|
import { Input as s } from "antd";
|
|
4
|
-
import c from "
|
|
4
|
+
import c from "lodash/get";
|
|
5
5
|
import h from "../style.module.scss.js";
|
|
6
6
|
import I from "../withLocale.js";
|
|
7
7
|
const F = I(
|
|
@@ -1,61 +1,59 @@
|
|
|
1
1
|
import { jsx as l, jsxs as w } from "react/jsx-runtime";
|
|
2
2
|
import x from "../PopoverItem.js";
|
|
3
3
|
import { Space as y, InputNumber as f, Input as c } from "antd";
|
|
4
|
-
import m from "
|
|
5
|
-
import o from "
|
|
6
|
-
import "
|
|
4
|
+
import m from "lodash/get";
|
|
5
|
+
import o from "lodash/isNumber";
|
|
6
|
+
import { useIntl as C } from "@kne/react-intl";
|
|
7
7
|
import h from "../style.module.scss.js";
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
import "../../../node_modules/@kne/react-intl/node_modules/react-intl/lib/index.js";
|
|
11
|
-
const v = (e, t, i) => !o(e[0]) && !o(e[1]) ? null : {
|
|
8
|
+
import F from "../withLocale.js";
|
|
9
|
+
const v = (e, t, u) => !o(e[0]) && !o(e[1]) ? null : {
|
|
12
10
|
label: ((r) => {
|
|
13
11
|
if (o(r[0]) && o(r[1]))
|
|
14
12
|
return `${r[0]}-${r[1]}${t || ""}`;
|
|
15
13
|
if (o(r[0]))
|
|
16
|
-
return
|
|
14
|
+
return u({ id: "over" }, { count: r[0], unit: t });
|
|
17
15
|
if (o(r[1]))
|
|
18
|
-
return
|
|
16
|
+
return u({ id: "lessThan" }, { count: r[1], unit: t });
|
|
19
17
|
})(e),
|
|
20
18
|
value: [e[0] || null, e[1] || null]
|
|
21
|
-
},
|
|
19
|
+
}, L = (e) => {
|
|
22
20
|
const t = m(e, "value");
|
|
23
21
|
return !(t && o(t[0]) && o(t[1]) && t[1] < t[0]);
|
|
24
|
-
},
|
|
22
|
+
}, k = F(
|
|
25
23
|
({
|
|
26
24
|
label: e,
|
|
27
25
|
value: t,
|
|
28
|
-
onChange:
|
|
26
|
+
onChange: u,
|
|
29
27
|
placeholder: r,
|
|
30
|
-
onValidate: b =
|
|
28
|
+
onValidate: b = L,
|
|
31
29
|
overlayClassName: I,
|
|
32
30
|
placement: $,
|
|
33
31
|
onOpenChange: N,
|
|
34
|
-
unit:
|
|
35
|
-
...
|
|
32
|
+
unit: i,
|
|
33
|
+
...d
|
|
36
34
|
}) => {
|
|
37
|
-
const { formatMessage: s } =
|
|
35
|
+
const { formatMessage: s } = C({ moduleName: "Filter" });
|
|
38
36
|
return /* @__PURE__ */ l(
|
|
39
37
|
x,
|
|
40
38
|
{
|
|
41
39
|
label: e,
|
|
42
40
|
value: t,
|
|
43
|
-
onChange:
|
|
41
|
+
onChange: u,
|
|
44
42
|
onValidate: b,
|
|
45
43
|
overlayClassName: I,
|
|
46
44
|
placement: $,
|
|
47
45
|
onOpenChange: N,
|
|
48
|
-
children: ({ value: n, onChange:
|
|
46
|
+
children: ({ value: n, onChange: p }) => /* @__PURE__ */ w(y.Compact, { children: [
|
|
49
47
|
/* @__PURE__ */ l(
|
|
50
48
|
f,
|
|
51
49
|
{
|
|
52
|
-
...
|
|
50
|
+
...d,
|
|
53
51
|
placeholder: r || `${s({ id: "pleaseInput" })}${e}`,
|
|
54
52
|
className: h["filter-item-number-range"],
|
|
55
53
|
value: m(n, "value[0]", ""),
|
|
56
|
-
onChange: (
|
|
57
|
-
|
|
58
|
-
v([
|
|
54
|
+
onChange: (a) => {
|
|
55
|
+
p(
|
|
56
|
+
v([a, m(n, "value[1]")], i, s)
|
|
59
57
|
);
|
|
60
58
|
}
|
|
61
59
|
}
|
|
@@ -76,25 +74,25 @@ const v = (e, t, i) => !o(e[0]) && !o(e[1]) ? null : {
|
|
|
76
74
|
/* @__PURE__ */ l(
|
|
77
75
|
f,
|
|
78
76
|
{
|
|
79
|
-
...
|
|
77
|
+
...d,
|
|
80
78
|
placeholder: r || `${s({ id: "pleaseInput" })}${e}`,
|
|
81
79
|
className: h["filter-item-number-range"],
|
|
82
80
|
value: m(n, "value[1]", ""),
|
|
83
|
-
onChange: (
|
|
84
|
-
|
|
85
|
-
v([m(n, "value[0]"),
|
|
81
|
+
onChange: (a) => {
|
|
82
|
+
p(
|
|
83
|
+
v([m(n, "value[0]"), a], i, s)
|
|
86
84
|
);
|
|
87
85
|
}
|
|
88
86
|
}
|
|
89
87
|
),
|
|
90
|
-
|
|
88
|
+
i && /* @__PURE__ */ l(
|
|
91
89
|
c,
|
|
92
90
|
{
|
|
93
91
|
style: {
|
|
94
92
|
width: 50,
|
|
95
93
|
borderLeft: 0
|
|
96
94
|
},
|
|
97
|
-
value:
|
|
95
|
+
value: i,
|
|
98
96
|
disabled: !0
|
|
99
97
|
}
|
|
100
98
|
)
|
|
@@ -104,6 +102,6 @@ const v = (e, t, i) => !o(e[0]) && !o(e[1]) ? null : {
|
|
|
104
102
|
}
|
|
105
103
|
);
|
|
106
104
|
export {
|
|
107
|
-
|
|
105
|
+
k as default
|
|
108
106
|
};
|
|
109
107
|
//# sourceMappingURL=NumberRangeFilterItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberRangeFilterItem.js","sources":["../../../../src/components/ReactFilter/fields/NumberRangeFilterItem.jsx"],"sourcesContent":["// @ts-nocheck\nimport PopoverItem from '../PopoverItem';\nimport { Input, InputNumber, Space } from 'antd';\nimport get from 'lodash/get';\nimport isNumber from 'lodash/isNumber';\nimport { useIntl } from '@kne/react-intl';\nimport style from '../style.module.scss';\nimport withLocale from '../withLocale';\n\nconst computedFilterValue = (range, unit, formatMessage) => {\n if (!isNumber(range[0]) && !isNumber(range[1])) {\n return null;\n }\n\n return {\n label: ((range) => {\n if (isNumber(range[0]) && isNumber(range[1])) {\n return `${range[0]}-${range[1]}${unit || ''}`;\n }\n if (isNumber(range[0])) {\n return formatMessage({ id: 'over' }, { count: range[0], unit });\n }\n if (isNumber(range[1])) {\n return formatMessage({ id: 'lessThan' }, { count: range[1], unit });\n }\n })(range),\n value: [range[0] || null, range[1] || null],\n };\n};\n\nconst defaultPropsOnValidate = (value) => {\n const range = get(value, 'value');\n return !(range && isNumber(range[0]) && isNumber(range[1]) && range[1] < range[0]);\n};\n\nconst NumberRangeFilterItem = withLocale(\n ({\n label,\n value,\n onChange,\n placeholder,\n onValidate = defaultPropsOnValidate,\n overlayClassName,\n placement,\n onOpenChange,\n unit,\n ...props\n }) => {\n const { formatMessage } = useIntl({ moduleName: 'Filter' });\n return (\n <PopoverItem\n label={label}\n value={value}\n onChange={onChange}\n {...{ onValidate, overlayClassName, placement, onOpenChange }}\n >\n {({ value, onChange }) => (\n <Space.Compact>\n <InputNumber\n {...props}\n placeholder={placeholder || `${formatMessage({ id: 'pleaseInput' })}${label}`}\n className={style['filter-item-number-range']}\n value={get(value, 'value[0]', '')}\n onChange={(target) => {\n onChange(\n computedFilterValue([target, get(value, 'value[1]')], unit, formatMessage),\n );\n }}\n />\n <Input\n style={{\n width: 30,\n borderLeft: 0,\n borderRight: 0,\n pointerEvents: 'none',\n }}\n placeholder=\"~\"\n disabled\n />\n <InputNumber\n {...props}\n placeholder={placeholder || `${formatMessage({ id: 'pleaseInput' })}${label}`}\n className={style['filter-item-number-range']}\n value={get(value, 'value[1]', '')}\n onChange={(target) => {\n onChange(\n computedFilterValue([get(value, 'value[0]'), target], unit, formatMessage),\n );\n }}\n />\n {unit && (\n <Input\n style={{\n width: 50,\n borderLeft: 0,\n }}\n value={unit}\n disabled\n />\n )}\n </Space.Compact>\n )}\n </PopoverItem>\n );\n },\n);\n\nexport default NumberRangeFilterItem;\n"],"names":["computedFilterValue","range","unit","formatMessage","isNumber","defaultPropsOnValidate","value","get","NumberRangeFilterItem","withLocale","label","onChange","placeholder","onValidate","overlayClassName","placement","onOpenChange","props","useIntl","jsx","PopoverItem","jsxs","Space","InputNumber","style","target","Input"],"mappings":"
|
|
1
|
+
{"version":3,"file":"NumberRangeFilterItem.js","sources":["../../../../src/components/ReactFilter/fields/NumberRangeFilterItem.jsx"],"sourcesContent":["// @ts-nocheck\nimport PopoverItem from '../PopoverItem';\nimport { Input, InputNumber, Space } from 'antd';\nimport get from 'lodash/get';\nimport isNumber from 'lodash/isNumber';\nimport { useIntl } from '@kne/react-intl';\nimport style from '../style.module.scss';\nimport withLocale from '../withLocale';\n\nconst computedFilterValue = (range, unit, formatMessage) => {\n if (!isNumber(range[0]) && !isNumber(range[1])) {\n return null;\n }\n\n return {\n label: ((range) => {\n if (isNumber(range[0]) && isNumber(range[1])) {\n return `${range[0]}-${range[1]}${unit || ''}`;\n }\n if (isNumber(range[0])) {\n return formatMessage({ id: 'over' }, { count: range[0], unit });\n }\n if (isNumber(range[1])) {\n return formatMessage({ id: 'lessThan' }, { count: range[1], unit });\n }\n })(range),\n value: [range[0] || null, range[1] || null],\n };\n};\n\nconst defaultPropsOnValidate = (value) => {\n const range = get(value, 'value');\n return !(range && isNumber(range[0]) && isNumber(range[1]) && range[1] < range[0]);\n};\n\nconst NumberRangeFilterItem = withLocale(\n ({\n label,\n value,\n onChange,\n placeholder,\n onValidate = defaultPropsOnValidate,\n overlayClassName,\n placement,\n onOpenChange,\n unit,\n ...props\n }) => {\n const { formatMessage } = useIntl({ moduleName: 'Filter' });\n return (\n <PopoverItem\n label={label}\n value={value}\n onChange={onChange}\n {...{ onValidate, overlayClassName, placement, onOpenChange }}\n >\n {({ value, onChange }) => (\n <Space.Compact>\n <InputNumber\n {...props}\n placeholder={placeholder || `${formatMessage({ id: 'pleaseInput' })}${label}`}\n className={style['filter-item-number-range']}\n value={get(value, 'value[0]', '')}\n onChange={(target) => {\n onChange(\n computedFilterValue([target, get(value, 'value[1]')], unit, formatMessage),\n );\n }}\n />\n <Input\n style={{\n width: 30,\n borderLeft: 0,\n borderRight: 0,\n pointerEvents: 'none',\n }}\n placeholder=\"~\"\n disabled\n />\n <InputNumber\n {...props}\n placeholder={placeholder || `${formatMessage({ id: 'pleaseInput' })}${label}`}\n className={style['filter-item-number-range']}\n value={get(value, 'value[1]', '')}\n onChange={(target) => {\n onChange(\n computedFilterValue([get(value, 'value[0]'), target], unit, formatMessage),\n );\n }}\n />\n {unit && (\n <Input\n style={{\n width: 50,\n borderLeft: 0,\n }}\n value={unit}\n disabled\n />\n )}\n </Space.Compact>\n )}\n </PopoverItem>\n );\n },\n);\n\nexport default NumberRangeFilterItem;\n"],"names":["computedFilterValue","range","unit","formatMessage","isNumber","defaultPropsOnValidate","value","get","NumberRangeFilterItem","withLocale","label","onChange","placeholder","onValidate","overlayClassName","placement","onOpenChange","props","useIntl","jsx","PopoverItem","jsxs","Space","InputNumber","style","target","Input"],"mappings":";;;;;;;;AASA,MAAMA,IAAsB,CAACC,GAAOC,GAAMC,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AAAA,cACC,OAAO;AAAA,gBACL,OAAO;AAAA,gBACP,YAAY;AAAA,cAAA;AAAA,cAEd,OAAOxB;AAAA,cACP,UAAQ;AAAA,YAAA;AAAA,UAAA;AAAA,QACV,EAAA,CAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { jsxs as S, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { CheckOutlined as x } from "@ant-design/icons";
|
|
3
|
+
import { createTreeUtils as A, SelectTree as M } from "@kne/super-select";
|
|
4
|
+
import { Flex as m, Checkbox as w } from "antd";
|
|
4
5
|
import v from "classnames";
|
|
5
|
-
import { useMemo as K, useCallback as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
function z(b, u, l, i) {
|
|
6
|
+
import { useMemo as K, useCallback as B } from "react";
|
|
7
|
+
import _ from "../buildSelectTreeMapping.js";
|
|
8
|
+
import q from "../flattenSelectTreeOptions.js";
|
|
9
|
+
import z from "../withFieldItem.js";
|
|
10
|
+
function D(b, u, l, i) {
|
|
11
11
|
return b.map((c) => {
|
|
12
12
|
const n = u.get(c);
|
|
13
13
|
if (!n) return null;
|
|
14
|
-
const { children: p, ...
|
|
14
|
+
const { children: p, ...d } = n;
|
|
15
15
|
return {
|
|
16
|
-
...
|
|
16
|
+
...d,
|
|
17
17
|
[l]: n.id,
|
|
18
18
|
[i]: n.label
|
|
19
19
|
};
|
|
20
20
|
}).filter(Boolean);
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const E = (b) => {
|
|
23
23
|
const {
|
|
24
24
|
options: u,
|
|
25
25
|
valueKey: l = "id",
|
|
@@ -27,19 +27,19 @@ const D = (b) => {
|
|
|
27
27
|
childrenKey: c = "children",
|
|
28
28
|
labelKey: n = "name",
|
|
29
29
|
single: p,
|
|
30
|
-
renderItem:
|
|
31
|
-
...
|
|
30
|
+
renderItem: d,
|
|
31
|
+
...O
|
|
32
32
|
} = b, k = K(
|
|
33
|
-
() =>
|
|
33
|
+
() => q(u, { valueKey: l, parentKey: i, childrenKey: c }),
|
|
34
34
|
[u, l, i, c]
|
|
35
|
-
),
|
|
36
|
-
const t =
|
|
37
|
-
return
|
|
38
|
-
}, [k, l, i, n]),
|
|
35
|
+
), o = K(() => {
|
|
36
|
+
const t = _(k, { valueKey: l, parentKey: i, labelKey: n });
|
|
37
|
+
return A(t);
|
|
38
|
+
}, [k, l, i, n]), T = B(
|
|
39
39
|
(t) => {
|
|
40
|
-
if (typeof
|
|
41
|
-
return
|
|
42
|
-
const e = t.item, f = t.props, a = t.isSelectedAll, F = t.value || [], y = t.setValue, V = t.onOpenChange, j = f.isPopup, N = f.renderItemContent, r = f.valueKey || l, h = F.map((
|
|
40
|
+
if (typeof d == "function")
|
|
41
|
+
return d(t);
|
|
42
|
+
const e = t.item, f = t.props, a = t.isSelectedAll, F = t.value || [], y = t.setValue, V = t.onOpenChange, j = f.isPopup, N = f.renderItemContent, r = f.valueKey || l, h = F.map((I) => I[r]), C = h.includes(e[r]);
|
|
43
43
|
if (p)
|
|
44
44
|
return /* @__PURE__ */ S(
|
|
45
45
|
m,
|
|
@@ -53,12 +53,12 @@ const D = (b) => {
|
|
|
53
53
|
},
|
|
54
54
|
children: [
|
|
55
55
|
/* @__PURE__ */ s(m, { vertical: !0, gap: 8, flex: 1, className: "select-tree-item-content", children: N(t) }),
|
|
56
|
-
/* @__PURE__ */ s("div", { className: "single-checked", children: C && /* @__PURE__ */ s(
|
|
56
|
+
/* @__PURE__ */ s("div", { className: "single-checked", children: C && /* @__PURE__ */ s(x, {}) })
|
|
57
57
|
]
|
|
58
58
|
},
|
|
59
59
|
e[r]
|
|
60
60
|
);
|
|
61
|
-
const { checked:
|
|
61
|
+
const { checked: g, indeterminate: U } = o.computedCheckboxStatus(
|
|
62
62
|
e[r],
|
|
63
63
|
h
|
|
64
64
|
);
|
|
@@ -66,16 +66,16 @@ const D = (b) => {
|
|
|
66
66
|
m,
|
|
67
67
|
{
|
|
68
68
|
className: v("select-tree-item", {
|
|
69
|
-
"is-selected":
|
|
69
|
+
"is-selected": g,
|
|
70
70
|
"is-disabled": e.disabled
|
|
71
71
|
}),
|
|
72
72
|
onClick: () => {
|
|
73
73
|
if (e.disabled || a) return;
|
|
74
|
-
const
|
|
74
|
+
const I = g ? o.setNodeUnchecked(e[r], h) : o.setNodeChecked(e[r], h);
|
|
75
75
|
y(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
D(
|
|
77
|
+
I,
|
|
78
|
+
o.mapping,
|
|
79
79
|
r,
|
|
80
80
|
f.labelKey || n
|
|
81
81
|
)
|
|
@@ -83,9 +83,9 @@ const D = (b) => {
|
|
|
83
83
|
},
|
|
84
84
|
children: [
|
|
85
85
|
/* @__PURE__ */ s(m, { children: /* @__PURE__ */ s(
|
|
86
|
-
|
|
86
|
+
w,
|
|
87
87
|
{
|
|
88
|
-
checked: a ||
|
|
88
|
+
checked: a || g,
|
|
89
89
|
indeterminate: !a && U,
|
|
90
90
|
disabled: a || e.disabled
|
|
91
91
|
}
|
|
@@ -96,22 +96,22 @@ const D = (b) => {
|
|
|
96
96
|
e[r]
|
|
97
97
|
);
|
|
98
98
|
},
|
|
99
|
-
[
|
|
99
|
+
[d, p, o, l, n]
|
|
100
100
|
);
|
|
101
101
|
return /* @__PURE__ */ s(
|
|
102
|
-
|
|
102
|
+
M,
|
|
103
103
|
{
|
|
104
|
-
...
|
|
104
|
+
...O,
|
|
105
105
|
single: p,
|
|
106
106
|
options: k,
|
|
107
107
|
valueKey: l,
|
|
108
108
|
parentKey: i,
|
|
109
109
|
childrenKey: c,
|
|
110
110
|
labelKey: n,
|
|
111
|
-
renderItem:
|
|
111
|
+
renderItem: T
|
|
112
112
|
}
|
|
113
113
|
);
|
|
114
|
-
}, Z =
|
|
114
|
+
}, Z = z(E, { forcePopup: !0 });
|
|
115
115
|
export {
|
|
116
116
|
Z as default
|
|
117
117
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import y from "../PopoverItem.js";
|
|
3
3
|
import p from "../common/TypeDateRangePickerField/index.js";
|
|
4
|
-
import d from "
|
|
4
|
+
import d from "lodash/get";
|
|
5
5
|
import g from "../style.module.scss.js";
|
|
6
6
|
import f from "dayjs";
|
|
7
7
|
import h from "../withLocale.js";
|