@pisell/materials 3.3.82 → 3.3.84
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/README.md +283 -1
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +7 -7
- package/build/lowcode/preview.js +9 -9
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +23 -23
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +23 -23
- package/es/components/PisellFields/index.d.ts +37 -0
- package/es/components/PisellFields/index.js +41 -0
- package/es/components/PisellLayouts/index.d.ts +33 -0
- package/es/components/PisellLayouts/index.js +43 -0
- package/es/components/PisellMetrics/index.d.ts +24 -0
- package/es/components/PisellMetrics/index.js +29 -0
- package/es/components/PisellTabbar/locales.d.ts +23 -0
- package/es/components/PisellTabbar/locales.js +8 -0
- package/es/components/PisellTabbar2/locales.d.ts +23 -0
- package/es/components/PisellTabbar2/locales.js +8 -0
- package/es/components/PisellTabbar3/locales.d.ts +23 -0
- package/es/components/PisellTabbar3/locales.js +8 -0
- package/es/components/cardMetricItem/index.d.ts +4 -1
- package/es/components/cardMetricItem/index.js +5 -0
- package/es/components/config-provider/index.d.ts +2 -0
- package/es/components/config-provider/index.js +6 -0
- package/es/components/dataSourceComponents/dataSourceForm/BaseForm.js +6 -8
- package/es/components/dataSourceComponents/dataSourceForm/serve.d.ts +5 -6
- package/es/components/dataSourceComponents/dataSourceForm/serve.js +39 -33
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +27 -30
- package/es/components/dataSourceComponents/dataSourceForm/urlUtils.js +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +2 -1
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +5 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +33 -15
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +2 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +2 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +2 -1
- package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.js +14 -3
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +21 -0
- package/es/components/dataSourceComponents/fields/Upload/constants.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/constants.js +1 -1
- package/es/components/dataSourceComponents/fields/Upload/utils.js +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +8 -6
- package/es/components/dataSourceComponents/hooks/useActions.js +3 -2
- package/es/components/dataSourceComponents/hooks/useFormSettingParams.d.ts +7 -0
- package/es/components/dataSourceComponents/hooks/useFormSettingParams.js +32 -0
- package/es/components/page/index.js +21 -123
- package/es/components/pisellCurrency/PisellCurrency.d.ts +39 -0
- package/es/components/pisellCurrency/PisellCurrency.js +67 -0
- package/es/components/pisellCurrency/PisellCurrency.less +43 -0
- package/es/components/pisellCurrency/PisellCurrency.stories.d.ts +56 -0
- package/es/components/pisellCurrency/PisellCurrency.stories.js +426 -0
- package/es/components/pisellCurrency/components/DisabledView.d.ts +11 -0
- package/es/components/pisellCurrency/components/DisabledView.js +51 -0
- package/es/components/pisellCurrency/components/EditView.d.ts +18 -0
- package/es/components/pisellCurrency/components/EditView.js +127 -0
- package/es/components/pisellCurrency/components/ReadOnlyView.d.ts +17 -0
- package/es/components/pisellCurrency/components/ReadOnlyView.js +70 -0
- package/es/components/pisellCurrency/components/index.d.ts +6 -0
- package/es/components/pisellCurrency/components/index.js +7 -0
- package/es/components/pisellCurrency/index.d.ts +6 -0
- package/es/components/pisellCurrency/index.js +7 -0
- package/es/components/pisellCurrency/types.d.ts +56 -0
- package/es/components/pisellCurrency/types.js +1 -0
- package/es/components/pisellCurrency/utils/currencyFormatter.d.ts +31 -0
- package/es/components/pisellCurrency/utils/currencyFormatter.js +50 -0
- package/es/components/pisellCurrency/utils/index.d.ts +5 -0
- package/es/components/pisellCurrency/utils/index.js +5 -0
- package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
- package/es/components/pisellDataSourceContainer/hooks/useHandleAction.d.ts +32 -0
- package/es/components/pisellDataSourceContainer/provider/ChildComponentProps.d.ts +13 -0
- package/es/components/pisellDataSourceContainer/provider/RefManager.d.ts +9 -0
- package/es/components/pisellDataSourceContainer/type.d.ts +84 -0
- package/es/components/pisellDatePicker/index.d.ts +0 -1
- package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +254 -0
- package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.less +96 -0
- package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.stories.js +1159 -0
- package/es/components/pisellDateTimeDisplay/components/DateDisplay.js +57 -0
- package/es/components/pisellDateTimeDisplay/components/TimeDisplay.js +44 -0
- package/es/components/pisellDateTimeDisplay/components/WeekdayDisplay.js +59 -0
- package/es/components/pisellDateTimeDisplay/components/index.js +3 -0
- package/es/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.js +81 -0
- package/es/components/pisellDateTimeDisplay/formats/index.js +1 -0
- package/es/components/pisellDateTimeDisplay/hooks/index.js +1 -0
- package/es/components/pisellDateTimeDisplay/hooks/useCurrentTime.js +86 -0
- package/es/components/pisellDateTimeDisplay/index.js +2 -0
- package/es/components/pisellDateTimeDisplay/types.js +1 -0
- package/es/components/pisellDateTimeDisplay/utils/formatDate.js +148 -0
- package/es/components/pisellDateTimeDisplay/utils/formatDateOrRelative.js +38 -0
- package/es/components/pisellDateTimeDisplay/utils/formatTime.js +44 -0
- package/es/components/pisellDateTimeDisplay/utils/formatWeekday.js +62 -0
- package/es/components/pisellDateTimeDisplay/utils/getRefreshInterval.js +28 -0
- package/es/components/pisellDateTimeDisplay/utils/index.js +7 -0
- package/es/components/pisellDateTimeDisplay/utils/localeUtils.js +36 -0
- package/es/components/pisellDateTimeDisplay/utils/relativeDay.js +45 -0
- package/es/components/pisellEmail/PisellEmail.d.ts +37 -0
- package/es/components/pisellEmail/PisellEmail.js +64 -0
- package/es/components/pisellEmail/PisellEmail.less +50 -0
- package/es/components/pisellEmail/PisellEmail.stories.d.ts +116 -0
- package/es/components/pisellEmail/PisellEmail.stories.js +699 -0
- package/es/components/pisellEmail/components/DisabledView.d.ts +14 -0
- package/es/components/pisellEmail/components/DisabledView.js +21 -0
- package/es/components/pisellEmail/components/EditView.d.ts +15 -0
- package/es/components/pisellEmail/components/EditView.js +146 -0
- package/es/components/pisellEmail/components/ReadOnlyView.d.ts +15 -0
- package/es/components/pisellEmail/components/ReadOnlyView.js +81 -0
- package/es/components/pisellEmail/constants/emailDomains.js +11 -0
- package/es/components/pisellEmail/constants/emailRegex.js +15 -0
- package/es/components/pisellEmail/index.d.ts +5 -0
- package/es/components/pisellEmail/index.js +5 -0
- package/es/components/pisellEmail/types.d.ts +176 -0
- package/es/components/pisellEmail/types.js +1 -0
- package/es/components/pisellEmail/utils/domainSuggestions.js +46 -0
- package/es/components/pisellEmail/utils/emailHelper.d.ts +66 -0
- package/es/components/pisellEmail/utils/emailHelper.js +135 -0
- package/es/components/pisellEmail/utils/emailValidator.d.ts +45 -0
- package/es/components/pisellEmail/utils/emailValidator.js +130 -0
- package/es/components/pisellEmail/utils/index.d.ts +6 -0
- package/es/components/pisellEmail/utils/index.js +12 -0
- package/es/components/pisellFind/PisellFind.stories.js +479 -0
- package/es/components/pisellFind/index.js +72 -0
- package/es/components/pisellLongText/PisellLongText.d.ts +39 -0
- package/es/components/pisellLongText/PisellLongText.js +66 -0
- package/es/components/pisellLongText/PisellLongText.less +60 -0
- package/es/components/pisellLongText/PisellLongText.stories.d.ts +123 -0
- package/es/components/pisellLongText/PisellLongText.stories.js +589 -0
- package/es/components/pisellLongText/components/DisabledView.d.ts +16 -0
- package/es/components/pisellLongText/components/DisabledView.js +51 -0
- package/es/components/pisellLongText/components/EditView.d.ts +19 -0
- package/es/components/pisellLongText/components/EditView.js +62 -0
- package/es/components/pisellLongText/components/ReadOnlyView.d.ts +18 -0
- package/es/components/pisellLongText/components/ReadOnlyView.js +97 -0
- package/es/components/pisellLongText/index.d.ts +6 -0
- package/es/components/pisellLongText/index.js +7 -0
- package/es/components/pisellLongText/types.d.ts +147 -0
- package/es/components/pisellLongText/types.js +1 -0
- package/es/components/pisellLookup/PisellLookup.js +636 -0
- package/es/components/pisellLookup/PisellLookup.less +637 -0
- package/es/components/pisellLookup/PisellLookup.stories.js +1012 -0
- package/es/components/pisellLookup/components/HotWords.js +49 -0
- package/es/components/pisellLookup/components/LookupAuxiliary.js +59 -0
- package/es/components/pisellLookup/components/LookupResultHost.js +185 -0
- package/es/components/pisellLookup/components/LookupTrigger.js +358 -0
- package/es/components/pisellLookup/components/SearchHistory.js +68 -0
- package/es/components/pisellLookup/components/SuggestWords.js +53 -0
- package/es/components/pisellLookup/components/index.js +10 -0
- package/es/components/pisellLookup/hooks/index.js +7 -0
- package/es/components/pisellLookup/hooks/useDebounceSearch.js +78 -0
- package/es/components/pisellLookup/hooks/useSearchHistory.js +125 -0
- package/es/components/pisellLookup/hooks/useSearchState.js +113 -0
- package/es/components/pisellLookup/index.js +5 -0
- package/es/components/pisellLookup/types.js +1 -0
- package/es/components/pisellLookup/utils/index.js +6 -0
- package/es/components/pisellLookup/utils/storage.js +118 -0
- package/es/components/pisellLookup/utils/trigger.js +76 -0
- package/es/components/pisellMetricCard/PisellMetricCard.d.ts +35 -0
- package/es/components/pisellMetricCard/PisellMetricCard.js +169 -0
- package/es/components/pisellMetricCard/PisellMetricCard.less +74 -0
- package/es/components/pisellMetricCard/PisellMetricCard.stories.js +208 -0
- package/es/components/pisellMetricCard/components/MetricComparison.d.ts +14 -0
- package/es/components/pisellMetricCard/components/MetricComparison.js +72 -0
- package/es/components/pisellMetricCard/components/MetricTitle.js +52 -0
- package/es/components/pisellMetricCard/components/MetricValue.js +29 -0
- package/es/components/pisellMetricCard/components/TrendIcon.js +30 -0
- package/es/components/pisellMetricCard/components/index.js +8 -0
- package/es/components/pisellMetricCard/index.js +7 -0
- package/es/components/pisellMetricCard/types.js +1 -0
- package/es/components/pisellMetricCard/utils/calculateTrend.js +29 -0
- package/es/components/pisellMetricCard/utils/formatMetricValue.d.ts +34 -0
- package/es/components/pisellMetricCard/utils/formatMetricValue.js +63 -0
- package/es/components/pisellMetricCard/utils/index.d.ts +5 -0
- package/es/components/pisellMetricCard/utils/index.js +6 -0
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.d.ts +9 -0
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.js +99 -0
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.less +231 -0
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.stories.d.ts +70 -0
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.stories.js +576 -0
- package/es/components/pisellMultipleSelect/components/DisabledView.d.ts +8 -0
- package/es/components/pisellMultipleSelect/components/DisabledView.js +56 -0
- package/es/components/pisellMultipleSelect/components/EditView.d.ts +8 -0
- package/es/components/pisellMultipleSelect/components/EditView.js +176 -0
- package/es/components/pisellMultipleSelect/components/ReadOnlyView.d.ts +8 -0
- package/es/components/pisellMultipleSelect/components/ReadOnlyView.js +57 -0
- package/es/components/pisellMultipleSelect/index.d.ts +6 -0
- package/es/components/pisellMultipleSelect/index.js +7 -0
- package/es/components/pisellMultipleSelect/types.d.ts +160 -0
- package/es/components/pisellMultipleSelect/types.js +1 -0
- package/es/components/pisellNumber/PisellNumber.d.ts +42 -0
- package/es/components/pisellNumber/PisellNumber.js +70 -0
- package/es/components/pisellNumber/PisellNumber.less +30 -0
- package/es/components/pisellNumber/PisellNumber.stories.d.ts +66 -0
- package/es/components/pisellNumber/PisellNumber.stories.js +427 -0
- package/es/components/pisellNumber/components/DisabledView.d.ts +11 -0
- package/es/components/pisellNumber/components/DisabledView.js +50 -0
- package/es/components/pisellNumber/components/EditView.d.ts +18 -0
- package/es/components/pisellNumber/components/EditView.js +87 -0
- package/es/components/pisellNumber/components/ReadOnlyView.d.ts +16 -0
- package/es/components/pisellNumber/components/ReadOnlyView.js +60 -0
- package/es/components/pisellNumber/components/index.d.ts +6 -0
- package/es/components/pisellNumber/components/index.js +7 -0
- package/es/components/pisellNumber/index.d.ts +6 -0
- package/es/components/pisellNumber/index.js +7 -0
- package/es/components/pisellNumber/types.d.ts +168 -0
- package/es/components/pisellNumber/types.js +1 -0
- package/es/components/pisellPercent/PisellPercent.d.ts +38 -0
- package/es/components/pisellPercent/PisellPercent.js +66 -0
- package/es/components/pisellPercent/PisellPercent.less +54 -0
- package/es/components/pisellPercent/PisellPercent.stories.d.ts +52 -0
- package/es/components/pisellPercent/PisellPercent.stories.js +332 -0
- package/es/components/pisellPercent/components/DisabledView.d.ts +11 -0
- package/es/components/pisellPercent/components/DisabledView.js +49 -0
- package/es/components/pisellPercent/components/EditView.d.ts +17 -0
- package/es/components/pisellPercent/components/EditView.js +120 -0
- package/es/components/pisellPercent/components/ReadOnlyView.d.ts +14 -0
- package/es/components/pisellPercent/components/ReadOnlyView.js +94 -0
- package/es/components/pisellPercent/components/index.d.ts +6 -0
- package/es/components/pisellPercent/components/index.js +7 -0
- package/es/components/pisellPercent/index.d.ts +6 -0
- package/es/components/pisellPercent/index.js +7 -0
- package/es/components/pisellPercent/types.d.ts +68 -0
- package/es/components/pisellPercent/types.js +1 -0
- package/es/components/pisellPercent/utils/index.d.ts +6 -0
- package/es/components/pisellPercent/utils/index.js +6 -0
- package/es/components/pisellPercent/utils/percentFormatter.d.ts +27 -0
- package/es/components/pisellPercent/utils/percentFormatter.js +50 -0
- package/es/components/pisellPercent/utils/rangeConverter.js +87 -0
- package/es/components/pisellPhone/PisellPhone.d.ts +36 -0
- package/es/components/pisellPhone/PisellPhone.js +63 -0
- package/es/components/pisellPhone/PisellPhone.less +85 -0
- package/es/components/pisellPhone/PisellPhone.stories.d.ts +80 -0
- package/es/components/pisellPhone/PisellPhone.stories.js +363 -0
- package/es/components/pisellPhone/components/DisabledView.d.ts +16 -0
- package/es/components/pisellPhone/components/DisabledView.js +53 -0
- package/es/components/pisellPhone/components/EditView.d.ts +19 -0
- package/es/components/pisellPhone/components/EditView.js +116 -0
- package/es/components/pisellPhone/components/ReadOnlyView.d.ts +17 -0
- package/es/components/pisellPhone/components/ReadOnlyView.js +76 -0
- package/es/components/pisellPhone/constants/countryCodes.d.ts +20 -0
- package/es/components/pisellPhone/constants/countryCodes.js +199 -0
- package/es/components/pisellPhone/index.d.ts +7 -0
- package/es/components/pisellPhone/index.js +9 -0
- package/es/components/pisellPhone/types.d.ts +209 -0
- package/es/components/pisellPhone/types.js +1 -0
- package/es/components/pisellPhone/utils/countryCodeHelper.d.ts +35 -0
- package/es/components/pisellPhone/utils/countryCodeHelper.js +87 -0
- package/es/components/pisellPhone/utils/index.d.ts +6 -0
- package/es/components/pisellPhone/utils/index.js +7 -0
- package/es/components/pisellPhone/utils/phoneFormatter.js +112 -0
- package/es/components/pisellPhone/utils/phoneValidator.d.ts +11 -0
- package/es/components/pisellPhone/utils/phoneValidator.js +59 -0
- package/es/components/pisellRating/PisellRating.d.ts +31 -0
- package/es/components/pisellRating/PisellRating.js +120 -0
- package/es/components/pisellRating/PisellRating.less +41 -0
- package/es/components/pisellRating/PisellRating.stories.d.ts +53 -0
- package/es/components/pisellRating/PisellRating.stories.js +243 -0
- package/es/components/pisellRating/index.d.ts +6 -0
- package/es/components/pisellRating/index.js +7 -0
- package/es/components/pisellRating/types.d.ts +124 -0
- package/es/components/pisellRating/types.js +1 -0
- package/es/components/pisellRow/index.d.ts +1 -1
- package/es/components/pisellSingleLineText/PisellSingleLineText.d.ts +40 -0
- package/es/components/pisellSingleLineText/PisellSingleLineText.js +67 -0
- package/es/components/pisellSingleLineText/PisellSingleLineText.less +201 -0
- package/es/components/pisellSingleLineText/PisellSingleLineText.stories.d.ts +102 -0
- package/es/components/pisellSingleLineText/PisellSingleLineText.stories.js +507 -0
- package/es/components/pisellSingleLineText/components/DisabledView.d.ts +16 -0
- package/es/components/pisellSingleLineText/components/DisabledView.js +51 -0
- package/es/components/pisellSingleLineText/components/EditView.d.ts +19 -0
- package/es/components/pisellSingleLineText/components/EditView.js +59 -0
- package/es/components/pisellSingleLineText/components/ReadOnlyView.d.ts +20 -0
- package/es/components/pisellSingleLineText/components/ReadOnlyView.js +153 -0
- package/es/components/pisellSingleLineText/index.d.ts +6 -0
- package/es/components/pisellSingleLineText/index.js +7 -0
- package/es/components/pisellSingleLineText/types.d.ts +139 -0
- package/es/components/pisellSingleLineText/types.js +1 -0
- package/es/components/pisellSingleSelect/PisellSingleSelect.d.ts +9 -0
- package/es/components/pisellSingleSelect/PisellSingleSelect.js +70 -0
- package/es/components/pisellSingleSelect/PisellSingleSelect.less +159 -0
- package/es/components/pisellSingleSelect/PisellSingleSelect.stories.d.ts +66 -0
- package/es/components/pisellSingleSelect/PisellSingleSelect.stories.js +517 -0
- package/es/components/pisellSingleSelect/components/DisabledView.d.ts +8 -0
- package/es/components/pisellSingleSelect/components/DisabledView.js +54 -0
- package/es/components/pisellSingleSelect/components/EditView.d.ts +8 -0
- package/es/components/pisellSingleSelect/components/EditView.js +156 -0
- package/es/components/pisellSingleSelect/components/ReadOnlyView.d.ts +8 -0
- package/es/components/pisellSingleSelect/components/ReadOnlyView.js +37 -0
- package/es/components/pisellSingleSelect/index.d.ts +6 -0
- package/es/components/pisellSingleSelect/index.js +7 -0
- package/es/components/pisellSingleSelect/types.d.ts +92 -0
- package/es/components/pisellSingleSelect/types.js +1 -0
- package/es/components/pisellStatisticList/index.js +5 -2
- package/es/components/pisellText/components/Editable/index.d.ts +3 -0
- package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.js +197 -0
- package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.less +49 -0
- package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.stories.js +209 -0
- package/es/components/pisellTimeRangeDisplay/components/DateBlock.js +30 -0
- package/es/components/pisellTimeRangeDisplay/components/DurationBlock.js +25 -0
- package/es/components/pisellTimeRangeDisplay/components/TimeRangeBlock.js +86 -0
- package/es/components/pisellTimeRangeDisplay/components/WeekdayBlock.js +23 -0
- package/es/components/pisellTimeRangeDisplay/components/index.js +4 -0
- package/es/components/pisellTimeRangeDisplay/index.js +1 -0
- package/es/components/pisellTimeRangeDisplay/types.js +1 -0
- package/es/components/pisellTimeRangeDisplay/utils/formatDuration.js +53 -0
- package/es/components/pisellTimeRangeDisplay/utils/index.js +5 -0
- package/es/components/pisellTimeRangeDisplay/utils/parseTimeRange.js +27 -0
- package/es/components/pisellUrl/PisellUrl.d.ts +37 -0
- package/es/components/pisellUrl/PisellUrl.js +64 -0
- package/es/components/pisellUrl/PisellUrl.less +46 -0
- package/es/components/pisellUrl/PisellUrl.stories.d.ts +108 -0
- package/es/components/pisellUrl/PisellUrl.stories.js +713 -0
- package/es/components/pisellUrl/components/DisabledView.d.ts +14 -0
- package/es/components/pisellUrl/components/DisabledView.js +21 -0
- package/es/components/pisellUrl/components/EditView.d.ts +15 -0
- package/es/components/pisellUrl/components/EditView.js +119 -0
- package/es/components/pisellUrl/components/ReadOnlyView.d.ts +15 -0
- package/es/components/pisellUrl/components/ReadOnlyView.js +90 -0
- package/es/components/pisellUrl/index.d.ts +5 -0
- package/es/components/pisellUrl/index.js +5 -0
- package/es/components/pisellUrl/types.d.ts +160 -0
- package/es/components/pisellUrl/types.js +1 -0
- package/es/components/pisellUrl/utils/index.js +12 -0
- package/es/components/pisellUrl/utils/urlFormatter.js +80 -0
- package/es/components/pisellUrl/utils/urlHelper.js +141 -0
- package/es/components/pisellUrl/utils/urlValidator.js +83 -0
- package/es/components/productCard/locales.d.ts +54 -0
- package/es/components/productCard/locales.js +84 -0
- package/es/components/productCard/utils.d.ts +2 -0
- package/es/components/productCard/utils.js +8 -2
- package/es/components/table/Table/fields/image/index.d.ts +0 -1
- package/es/components/table/Table/fields/pSwitch/index.d.ts +0 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/translation/index.d.ts +2 -0
- package/es/components/translation/index.js +12 -0
- package/es/components/translation/utils.d.ts +2 -0
- package/es/components/translation/utils.js +3 -1
- package/es/components/virtualInput/index.d.ts +24 -0
- package/es/components/walletCard/index.d.ts +2 -0
- package/es/components/walletCard/index.js +11 -3
- package/es/hooks/useResponsive.d.ts +1 -1
- package/es/index.d.ts +178 -134
- package/es/index.js +214 -117
- package/es/locales/en-US.d.ts +14 -0
- package/es/locales/en-US.js +16 -0
- package/es/locales/index.js +6 -2
- package/es/locales/ja.d.ts +337 -0
- package/es/locales/ja.js +416 -0
- package/es/locales/pt.d.ts +337 -0
- package/es/locales/pt.js +416 -0
- package/es/locales/zh-CN.d.ts +14 -0
- package/es/locales/zh-CN.js +16 -0
- package/es/locales/zh-TW.d.ts +14 -0
- package/es/locales/zh-TW.js +16 -0
- package/es/theme/tokens.js +257 -0
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/PisellFields/index.d.ts +37 -0
- package/lib/components/PisellFields/index.js +49 -0
- package/lib/components/PisellLayouts/index.d.ts +33 -0
- package/lib/components/PisellLayouts/index.js +57 -0
- package/lib/components/PisellMetrics/index.d.ts +24 -0
- package/lib/components/PisellMetrics/index.js +43 -0
- package/lib/components/PisellTabbar/locales.d.ts +23 -0
- package/lib/components/PisellTabbar/locales.js +8 -0
- package/lib/components/PisellTabbar2/locales.d.ts +23 -0
- package/lib/components/PisellTabbar2/locales.js +8 -0
- package/lib/components/PisellTabbar3/locales.d.ts +23 -0
- package/lib/components/PisellTabbar3/locales.js +8 -0
- package/lib/components/cardMetricItem/index.d.ts +4 -1
- package/lib/components/config-provider/index.d.ts +2 -0
- package/lib/components/config-provider/index.js +6 -0
- package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.js +3 -3
- package/lib/components/dataSourceComponents/dataSourceForm/serve.d.ts +5 -6
- package/lib/components/dataSourceComponents/dataSourceForm/serve.js +38 -22
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +4 -8
- package/lib/components/dataSourceComponents/dataSourceForm/urlUtils.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +2 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +2 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +33 -15
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +2 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +2 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +2 -1
- package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.js +11 -4
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +21 -0
- package/lib/components/dataSourceComponents/fields/Upload/constants.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/constants.js +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/utils.js +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +8 -6
- package/lib/components/dataSourceComponents/hooks/useActions.js +6 -2
- package/lib/components/dataSourceComponents/hooks/useFormSettingParams.d.ts +7 -0
- package/lib/components/dataSourceComponents/hooks/useFormSettingParams.js +63 -0
- package/lib/components/page/index.js +17 -122
- package/lib/components/pisellCurrency/PisellCurrency.d.ts +39 -0
- package/lib/components/pisellCurrency/PisellCurrency.js +63 -0
- package/lib/components/pisellCurrency/PisellCurrency.less +43 -0
- package/lib/components/pisellCurrency/PisellCurrency.stories.d.ts +56 -0
- package/lib/components/pisellCurrency/PisellCurrency.stories.js +251 -0
- package/lib/components/pisellCurrency/components/DisabledView.d.ts +11 -0
- package/lib/components/pisellCurrency/components/DisabledView.js +77 -0
- package/lib/components/pisellCurrency/components/EditView.d.ts +18 -0
- package/lib/components/pisellCurrency/components/EditView.js +117 -0
- package/lib/components/pisellCurrency/components/ReadOnlyView.d.ts +17 -0
- package/lib/components/pisellCurrency/components/ReadOnlyView.js +79 -0
- package/lib/components/pisellCurrency/components/index.d.ts +6 -0
- package/lib/components/pisellCurrency/components/index.js +45 -0
- package/lib/components/pisellCurrency/index.d.ts +6 -0
- package/lib/components/pisellCurrency/index.js +39 -0
- package/lib/components/pisellCurrency/types.d.ts +56 -0
- package/lib/components/pisellCurrency/types.js +17 -0
- package/lib/components/pisellCurrency/utils/currencyFormatter.d.ts +31 -0
- package/lib/components/pisellCurrency/utils/currencyFormatter.js +56 -0
- package/lib/components/pisellCurrency/utils/index.d.ts +5 -0
- package/lib/components/pisellCurrency/utils/index.js +29 -0
- package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
- package/lib/components/pisellDataSourceContainer/hooks/useHandleAction.d.ts +32 -0
- package/lib/components/pisellDataSourceContainer/provider/ChildComponentProps.d.ts +13 -0
- package/lib/components/pisellDataSourceContainer/provider/RefManager.d.ts +9 -0
- package/lib/components/pisellDataSourceContainer/type.d.ts +84 -0
- package/lib/components/pisellDatePicker/index.d.ts +0 -1
- package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +240 -0
- package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.less +96 -0
- package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.stories.js +846 -0
- package/lib/components/pisellDateTimeDisplay/components/DateDisplay.js +71 -0
- package/lib/components/pisellDateTimeDisplay/components/TimeDisplay.js +64 -0
- package/lib/components/pisellDateTimeDisplay/components/WeekdayDisplay.js +64 -0
- package/lib/components/pisellDateTimeDisplay/components/index.js +35 -0
- package/lib/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.js +98 -0
- package/lib/components/pisellDateTimeDisplay/formats/index.js +29 -0
- package/lib/components/pisellDateTimeDisplay/hooks/index.js +29 -0
- package/lib/components/pisellDateTimeDisplay/hooks/useCurrentTime.js +75 -0
- package/lib/components/pisellDateTimeDisplay/index.js +41 -0
- package/lib/components/pisellDateTimeDisplay/types.js +17 -0
- package/lib/components/pisellDateTimeDisplay/utils/formatDate.js +105 -0
- package/lib/components/pisellDateTimeDisplay/utils/formatDateOrRelative.js +54 -0
- package/lib/components/pisellDateTimeDisplay/utils/formatTime.js +47 -0
- package/lib/components/pisellDateTimeDisplay/utils/formatWeekday.js +46 -0
- package/lib/components/pisellDateTimeDisplay/utils/getRefreshInterval.js +35 -0
- package/lib/components/pisellDateTimeDisplay/utils/index.js +53 -0
- package/lib/components/pisellDateTimeDisplay/utils/localeUtils.js +46 -0
- package/lib/components/pisellDateTimeDisplay/utils/relativeDay.js +54 -0
- package/lib/components/pisellEmail/PisellEmail.d.ts +37 -0
- package/lib/components/pisellEmail/PisellEmail.js +62 -0
- package/lib/components/pisellEmail/PisellEmail.less +50 -0
- package/lib/components/pisellEmail/PisellEmail.stories.d.ts +116 -0
- package/lib/components/pisellEmail/PisellEmail.stories.js +532 -0
- package/lib/components/pisellEmail/components/DisabledView.d.ts +14 -0
- package/lib/components/pisellEmail/components/DisabledView.js +42 -0
- package/lib/components/pisellEmail/components/EditView.d.ts +15 -0
- package/lib/components/pisellEmail/components/EditView.js +123 -0
- package/lib/components/pisellEmail/components/ReadOnlyView.d.ts +15 -0
- package/lib/components/pisellEmail/components/ReadOnlyView.js +99 -0
- package/lib/components/pisellEmail/constants/emailDomains.js +49 -0
- package/lib/components/pisellEmail/constants/emailRegex.js +32 -0
- package/lib/components/pisellEmail/index.d.ts +5 -0
- package/lib/components/pisellEmail/index.js +40 -0
- package/lib/components/pisellEmail/types.d.ts +176 -0
- package/lib/components/pisellEmail/types.js +17 -0
- package/lib/components/pisellEmail/utils/domainSuggestions.js +42 -0
- package/lib/components/pisellEmail/utils/emailHelper.d.ts +66 -0
- package/lib/components/pisellEmail/utils/emailHelper.js +89 -0
- package/lib/components/pisellEmail/utils/emailValidator.d.ts +45 -0
- package/lib/components/pisellEmail/utils/emailValidator.js +97 -0
- package/lib/components/pisellEmail/utils/index.d.ts +6 -0
- package/lib/components/pisellEmail/utils/index.js +27 -0
- package/lib/components/pisellFind/PisellFind.stories.js +343 -0
- package/lib/components/pisellFind/index.js +68 -0
- package/lib/components/pisellLongText/PisellLongText.d.ts +39 -0
- package/lib/components/pisellLongText/PisellLongText.js +62 -0
- package/lib/components/pisellLongText/PisellLongText.less +60 -0
- package/lib/components/pisellLongText/PisellLongText.stories.d.ts +123 -0
- package/lib/components/pisellLongText/PisellLongText.stories.js +492 -0
- package/lib/components/pisellLongText/components/DisabledView.d.ts +16 -0
- package/lib/components/pisellLongText/components/DisabledView.js +51 -0
- package/lib/components/pisellLongText/components/EditView.d.ts +19 -0
- package/lib/components/pisellLongText/components/EditView.js +69 -0
- package/lib/components/pisellLongText/components/ReadOnlyView.d.ts +18 -0
- package/lib/components/pisellLongText/components/ReadOnlyView.js +86 -0
- package/lib/components/pisellLongText/index.d.ts +6 -0
- package/lib/components/pisellLongText/index.js +39 -0
- package/lib/components/pisellLongText/types.d.ts +147 -0
- package/lib/components/pisellLongText/types.js +17 -0
- package/lib/components/pisellLookup/PisellLookup.js +434 -0
- package/lib/components/pisellLookup/PisellLookup.less +637 -0
- package/lib/components/pisellLookup/PisellLookup.stories.js +631 -0
- package/lib/components/pisellLookup/components/HotWords.js +63 -0
- package/lib/components/pisellLookup/components/LookupAuxiliary.js +93 -0
- package/lib/components/pisellLookup/components/LookupResultHost.js +190 -0
- package/lib/components/pisellLookup/components/LookupTrigger.js +293 -0
- package/lib/components/pisellLookup/components/SearchHistory.js +73 -0
- package/lib/components/pisellLookup/components/SuggestWords.js +71 -0
- package/lib/components/pisellLookup/components/index.js +44 -0
- package/lib/components/pisellLookup/hooks/index.js +27 -0
- package/lib/components/pisellLookup/hooks/useDebounceSearch.js +66 -0
- package/lib/components/pisellLookup/hooks/useSearchHistory.js +107 -0
- package/lib/components/pisellLookup/hooks/useSearchState.js +91 -0
- package/lib/components/pisellLookup/index.js +29 -0
- package/lib/components/pisellLookup/types.js +17 -0
- package/lib/components/pisellLookup/utils/index.js +25 -0
- package/lib/components/pisellLookup/utils/storage.js +96 -0
- package/lib/components/pisellLookup/utils/trigger.js +66 -0
- package/lib/components/pisellMetricCard/PisellMetricCard.d.ts +35 -0
- package/lib/components/pisellMetricCard/PisellMetricCard.js +166 -0
- package/lib/components/pisellMetricCard/PisellMetricCard.less +74 -0
- package/lib/components/pisellMetricCard/PisellMetricCard.stories.js +238 -0
- package/lib/components/pisellMetricCard/components/MetricComparison.d.ts +14 -0
- package/lib/components/pisellMetricCard/components/MetricComparison.js +86 -0
- package/lib/components/pisellMetricCard/components/MetricTitle.js +84 -0
- package/lib/components/pisellMetricCard/components/MetricValue.js +56 -0
- package/lib/components/pisellMetricCard/components/TrendIcon.js +50 -0
- package/lib/components/pisellMetricCard/components/index.js +48 -0
- package/lib/components/pisellMetricCard/index.js +41 -0
- package/lib/components/pisellMetricCard/types.js +17 -0
- package/lib/components/pisellMetricCard/utils/calculateTrend.js +38 -0
- package/lib/components/pisellMetricCard/utils/formatMetricValue.d.ts +34 -0
- package/lib/components/pisellMetricCard/utils/formatMetricValue.js +52 -0
- package/lib/components/pisellMetricCard/utils/index.d.ts +5 -0
- package/lib/components/pisellMetricCard/utils/index.js +32 -0
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.d.ts +9 -0
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.js +97 -0
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.less +231 -0
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.stories.d.ts +70 -0
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.stories.js +491 -0
- package/lib/components/pisellMultipleSelect/components/DisabledView.d.ts +8 -0
- package/lib/components/pisellMultipleSelect/components/DisabledView.js +82 -0
- package/lib/components/pisellMultipleSelect/components/EditView.d.ts +8 -0
- package/lib/components/pisellMultipleSelect/components/EditView.js +155 -0
- package/lib/components/pisellMultipleSelect/components/ReadOnlyView.d.ts +8 -0
- package/lib/components/pisellMultipleSelect/components/ReadOnlyView.js +80 -0
- package/lib/components/pisellMultipleSelect/index.d.ts +6 -0
- package/lib/components/pisellMultipleSelect/index.js +39 -0
- package/lib/components/pisellMultipleSelect/types.d.ts +160 -0
- package/lib/components/pisellMultipleSelect/types.js +17 -0
- package/lib/components/pisellNumber/PisellNumber.d.ts +42 -0
- package/lib/components/pisellNumber/PisellNumber.js +63 -0
- package/lib/components/pisellNumber/PisellNumber.less +30 -0
- package/lib/components/pisellNumber/PisellNumber.stories.d.ts +66 -0
- package/lib/components/pisellNumber/PisellNumber.stories.js +341 -0
- package/lib/components/pisellNumber/components/DisabledView.d.ts +11 -0
- package/lib/components/pisellNumber/components/DisabledView.js +80 -0
- package/lib/components/pisellNumber/components/EditView.d.ts +18 -0
- package/lib/components/pisellNumber/components/EditView.js +97 -0
- package/lib/components/pisellNumber/components/ReadOnlyView.d.ts +16 -0
- package/lib/components/pisellNumber/components/ReadOnlyView.js +75 -0
- package/lib/components/pisellNumber/components/index.d.ts +6 -0
- package/lib/components/pisellNumber/components/index.js +45 -0
- package/lib/components/pisellNumber/index.d.ts +6 -0
- package/lib/components/pisellNumber/index.js +39 -0
- package/lib/components/pisellNumber/types.d.ts +168 -0
- package/lib/components/pisellNumber/types.js +17 -0
- package/lib/components/pisellPercent/PisellPercent.d.ts +38 -0
- package/lib/components/pisellPercent/PisellPercent.js +63 -0
- package/lib/components/pisellPercent/PisellPercent.less +54 -0
- package/lib/components/pisellPercent/PisellPercent.stories.d.ts +52 -0
- package/lib/components/pisellPercent/PisellPercent.stories.js +217 -0
- package/lib/components/pisellPercent/components/DisabledView.d.ts +11 -0
- package/lib/components/pisellPercent/components/DisabledView.js +74 -0
- package/lib/components/pisellPercent/components/EditView.d.ts +17 -0
- package/lib/components/pisellPercent/components/EditView.js +112 -0
- package/lib/components/pisellPercent/components/ReadOnlyView.d.ts +14 -0
- package/lib/components/pisellPercent/components/ReadOnlyView.js +109 -0
- package/lib/components/pisellPercent/components/index.d.ts +6 -0
- package/lib/components/pisellPercent/components/index.js +45 -0
- package/lib/components/pisellPercent/index.d.ts +6 -0
- package/lib/components/pisellPercent/index.js +39 -0
- package/lib/components/pisellPercent/types.d.ts +68 -0
- package/lib/components/pisellPercent/types.js +17 -0
- package/lib/components/pisellPercent/utils/index.d.ts +6 -0
- package/lib/components/pisellPercent/utils/index.js +34 -0
- package/lib/components/pisellPercent/utils/percentFormatter.d.ts +27 -0
- package/lib/components/pisellPercent/utils/percentFormatter.js +48 -0
- package/lib/components/pisellPercent/utils/rangeConverter.js +59 -0
- package/lib/components/pisellPhone/PisellPhone.d.ts +36 -0
- package/lib/components/pisellPhone/PisellPhone.js +62 -0
- package/lib/components/pisellPhone/PisellPhone.less +85 -0
- package/lib/components/pisellPhone/PisellPhone.stories.d.ts +80 -0
- package/lib/components/pisellPhone/PisellPhone.stories.js +290 -0
- package/lib/components/pisellPhone/components/DisabledView.d.ts +16 -0
- package/lib/components/pisellPhone/components/DisabledView.js +51 -0
- package/lib/components/pisellPhone/components/EditView.d.ts +19 -0
- package/lib/components/pisellPhone/components/EditView.js +101 -0
- package/lib/components/pisellPhone/components/ReadOnlyView.d.ts +17 -0
- package/lib/components/pisellPhone/components/ReadOnlyView.js +79 -0
- package/lib/components/pisellPhone/constants/countryCodes.d.ts +20 -0
- package/lib/components/pisellPhone/constants/countryCodes.js +233 -0
- package/lib/components/pisellPhone/index.d.ts +7 -0
- package/lib/components/pisellPhone/index.js +46 -0
- package/lib/components/pisellPhone/types.d.ts +209 -0
- package/lib/components/pisellPhone/types.js +17 -0
- package/lib/components/pisellPhone/utils/countryCodeHelper.d.ts +35 -0
- package/lib/components/pisellPhone/utils/countryCodeHelper.js +64 -0
- package/lib/components/pisellPhone/utils/index.d.ts +6 -0
- package/lib/components/pisellPhone/utils/index.js +49 -0
- package/lib/components/pisellPhone/utils/phoneFormatter.js +103 -0
- package/lib/components/pisellPhone/utils/phoneValidator.d.ts +11 -0
- package/lib/components/pisellPhone/utils/phoneValidator.js +61 -0
- package/lib/components/pisellRating/PisellRating.d.ts +31 -0
- package/lib/components/pisellRating/PisellRating.js +110 -0
- package/lib/components/pisellRating/PisellRating.less +41 -0
- package/lib/components/pisellRating/PisellRating.stories.d.ts +53 -0
- package/lib/components/pisellRating/PisellRating.stories.js +199 -0
- package/lib/components/pisellRating/index.d.ts +6 -0
- package/lib/components/pisellRating/index.js +39 -0
- package/lib/components/pisellRating/types.d.ts +124 -0
- package/lib/components/pisellRating/types.js +17 -0
- package/lib/components/pisellRow/index.d.ts +1 -1
- package/lib/components/pisellSingleLineText/PisellSingleLineText.d.ts +40 -0
- package/lib/components/pisellSingleLineText/PisellSingleLineText.js +62 -0
- package/lib/components/pisellSingleLineText/PisellSingleLineText.less +201 -0
- package/lib/components/pisellSingleLineText/PisellSingleLineText.stories.d.ts +102 -0
- package/lib/components/pisellSingleLineText/PisellSingleLineText.stories.js +379 -0
- package/lib/components/pisellSingleLineText/components/DisabledView.d.ts +16 -0
- package/lib/components/pisellSingleLineText/components/DisabledView.js +51 -0
- package/lib/components/pisellSingleLineText/components/EditView.d.ts +19 -0
- package/lib/components/pisellSingleLineText/components/EditView.js +69 -0
- package/lib/components/pisellSingleLineText/components/ReadOnlyView.d.ts +20 -0
- package/lib/components/pisellSingleLineText/components/ReadOnlyView.js +164 -0
- package/lib/components/pisellSingleLineText/index.d.ts +6 -0
- package/lib/components/pisellSingleLineText/index.js +39 -0
- package/lib/components/pisellSingleLineText/types.d.ts +139 -0
- package/lib/components/pisellSingleLineText/types.js +17 -0
- package/lib/components/pisellSingleSelect/PisellSingleSelect.d.ts +9 -0
- package/lib/components/pisellSingleSelect/PisellSingleSelect.js +78 -0
- package/lib/components/pisellSingleSelect/PisellSingleSelect.less +159 -0
- package/lib/components/pisellSingleSelect/PisellSingleSelect.stories.d.ts +66 -0
- package/lib/components/pisellSingleSelect/PisellSingleSelect.stories.js +444 -0
- package/lib/components/pisellSingleSelect/components/DisabledView.d.ts +8 -0
- package/lib/components/pisellSingleSelect/components/DisabledView.js +81 -0
- package/lib/components/pisellSingleSelect/components/EditView.d.ts +8 -0
- package/lib/components/pisellSingleSelect/components/EditView.js +141 -0
- package/lib/components/pisellSingleSelect/components/ReadOnlyView.d.ts +8 -0
- package/lib/components/pisellSingleSelect/components/ReadOnlyView.js +74 -0
- package/lib/components/pisellSingleSelect/index.d.ts +6 -0
- package/lib/components/pisellSingleSelect/index.js +39 -0
- package/lib/components/pisellSingleSelect/types.d.ts +92 -0
- package/lib/components/pisellSingleSelect/types.js +17 -0
- package/lib/components/pisellStatisticList/index.js +4 -2
- package/lib/components/pisellText/components/Editable/index.d.ts +3 -0
- package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.js +193 -0
- package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.less +49 -0
- package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.stories.js +187 -0
- package/lib/components/pisellTimeRangeDisplay/components/DateBlock.js +69 -0
- package/lib/components/pisellTimeRangeDisplay/components/DurationBlock.js +65 -0
- package/lib/components/pisellTimeRangeDisplay/components/TimeRangeBlock.js +120 -0
- package/lib/components/pisellTimeRangeDisplay/components/WeekdayBlock.js +64 -0
- package/lib/components/pisellTimeRangeDisplay/components/index.js +38 -0
- package/lib/components/pisellTimeRangeDisplay/index.js +40 -0
- package/lib/components/pisellTimeRangeDisplay/types.js +17 -0
- package/lib/components/pisellTimeRangeDisplay/utils/formatDuration.js +52 -0
- package/lib/components/pisellTimeRangeDisplay/utils/index.js +47 -0
- package/lib/components/pisellTimeRangeDisplay/utils/parseTimeRange.js +49 -0
- package/lib/components/pisellUrl/PisellUrl.d.ts +37 -0
- package/lib/components/pisellUrl/PisellUrl.js +62 -0
- package/lib/components/pisellUrl/PisellUrl.less +46 -0
- package/lib/components/pisellUrl/PisellUrl.stories.d.ts +108 -0
- package/lib/components/pisellUrl/PisellUrl.stories.js +506 -0
- package/lib/components/pisellUrl/components/DisabledView.d.ts +14 -0
- package/lib/components/pisellUrl/components/DisabledView.js +42 -0
- package/lib/components/pisellUrl/components/EditView.d.ts +15 -0
- package/lib/components/pisellUrl/components/EditView.js +109 -0
- package/lib/components/pisellUrl/components/ReadOnlyView.d.ts +15 -0
- package/lib/components/pisellUrl/components/ReadOnlyView.js +98 -0
- package/lib/components/pisellUrl/index.d.ts +5 -0
- package/lib/components/pisellUrl/index.js +40 -0
- package/lib/components/pisellUrl/types.d.ts +160 -0
- package/lib/components/pisellUrl/types.js +17 -0
- package/lib/components/pisellUrl/utils/index.js +27 -0
- package/lib/components/pisellUrl/utils/urlFormatter.js +66 -0
- package/lib/components/pisellUrl/utils/urlHelper.js +97 -0
- package/lib/components/pisellUrl/utils/urlValidator.js +77 -0
- package/lib/components/productCard/locales.d.ts +54 -0
- package/lib/components/productCard/locales.js +60 -0
- package/lib/components/productCard/utils.d.ts +2 -0
- package/lib/components/productCard/utils.js +8 -2
- package/lib/components/table/Table/fields/image/index.d.ts +0 -1
- package/lib/components/table/Table/fields/pSwitch/index.d.ts +0 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/translation/index.d.ts +2 -0
- package/lib/components/translation/index.js +14 -0
- package/lib/components/translation/utils.d.ts +2 -0
- package/lib/components/translation/utils.js +3 -1
- package/lib/components/virtualInput/index.d.ts +24 -0
- package/lib/components/walletCard/index.d.ts +2 -0
- package/lib/components/walletCard/index.js +11 -3
- package/lib/hooks/useResponsive.d.ts +1 -1
- package/lib/index.d.ts +178 -134
- package/lib/index.js +172 -115
- package/lib/locales/en-US.d.ts +14 -0
- package/lib/locales/en-US.js +16 -0
- package/lib/locales/index.js +6 -2
- package/lib/locales/ja.d.ts +337 -0
- package/lib/locales/ja.js +396 -0
- package/lib/locales/pt.d.ts +337 -0
- package/lib/locales/pt.js +396 -0
- package/lib/locales/zh-CN.d.ts +14 -0
- package/lib/locales/zh-CN.js +16 -0
- package/lib/locales/zh-TW.d.ts +14 -0
- package/lib/locales/zh-TW.js +16 -0
- package/lib/theme/tokens.js +268 -0
- package/lib/utils/platform.d.ts +1 -1
- package/lowcode/_utils/defaultSchema.ts +95 -30
- package/lowcode/auto-resize-text/meta.ts +27 -27
- package/lowcode/data-source-form/utils.ts +68 -4
- package/lowcode/pisell-currency/index.ts +3 -0
- package/lowcode/pisell-currency/meta.ts +350 -0
- package/lowcode/pisell-currency/snippets.ts +52 -0
- package/lowcode/pisell-datetime-display/index.ts +3 -0
- package/lowcode/pisell-datetime-display/meta.ts +509 -0
- package/lowcode/pisell-datetime-display/snippets.ts +1 -0
- package/lowcode/pisell-email/index.ts +1 -0
- package/lowcode/pisell-email/meta.ts +484 -0
- package/lowcode/pisell-email/snippets.ts +63 -0
- package/lowcode/pisell-find/meta.ts +365 -0
- package/lowcode/pisell-find/snippets.ts +37 -0
- package/lowcode/pisell-long-text/meta.ts +436 -0
- package/lowcode/pisell-long-text/snippets.ts +55 -0
- package/lowcode/pisell-lookup/meta.ts +845 -0
- package/lowcode/pisell-lookup/snippets.ts +93 -0
- package/lowcode/pisell-metric-card/meta.ts +493 -0
- package/lowcode/pisell-metric-card/snippets.ts +54 -0
- package/lowcode/pisell-multiple-select/index.ts +3 -0
- package/lowcode/pisell-multiple-select/meta.ts +422 -0
- package/lowcode/pisell-multiple-select/snippets.ts +111 -0
- package/lowcode/pisell-number/index.ts +3 -0
- package/lowcode/pisell-number/meta.ts +497 -0
- package/lowcode/pisell-number/snippets.ts +68 -0
- package/lowcode/pisell-percent/index.ts +3 -0
- package/lowcode/pisell-percent/meta.ts +201 -0
- package/lowcode/pisell-percent/snippets.ts +61 -0
- package/lowcode/pisell-phone/meta.ts +389 -0
- package/lowcode/pisell-phone/snippets.ts +52 -0
- package/lowcode/pisell-rating/index.ts +3 -0
- package/lowcode/pisell-rating/meta.ts +130 -0
- package/lowcode/pisell-rating/snippets.ts +38 -0
- package/lowcode/pisell-single-line-text/meta.ts +525 -0
- package/lowcode/pisell-single-line-text/snippets.ts +41 -0
- package/lowcode/pisell-single-select/index.ts +3 -0
- package/lowcode/pisell-single-select/meta.ts +370 -0
- package/lowcode/pisell-single-select/snippets.ts +70 -0
- package/lowcode/pisell-time-range-display/index.ts +3 -0
- package/lowcode/pisell-time-range-display/meta.ts +375 -0
- package/lowcode/pisell-time-range-display/snippets.ts +1 -0
- package/lowcode/pisell-url/index.ts +1 -0
- package/lowcode/pisell-url/meta.ts +512 -0
- package/lowcode/pisell-url/snippets.ts +75 -0
- package/package.json +4 -3
- package/es/components/Pagination/index.d.ts +0 -14
- package/es/components/PisellCards/components/GraphicTextCard/GraphicTextCard.d.ts +0 -9
- package/es/components/PisellCards/components/GraphicTextCard/components/index.d.ts +0 -6
- package/es/components/PisellCards/components/GraphicTextCard/index.d.ts +0 -5
- package/es/components/PisellCards/components/MultilevelCard/components/PanelWrapper.d.ts +0 -7
- package/es/components/PisellProcedure/PisellProcedure.d.ts +0 -22
- package/es/components/PisellProcedure/PisellProcedure.stories.d.ts +0 -163
- package/es/components/PisellProcedure/components/ProcedureBody.d.ts +0 -41
- package/es/components/PisellProcedure/components/ProcedureFooter.d.ts +0 -38
- package/es/components/PisellProcedure/components/ProcedureHeader.d.ts +0 -34
- package/es/components/PisellProcedure/components/index.d.ts +0 -12
- package/es/components/PisellProcedure/index.d.ts +0 -5
- package/es/components/PisellSteps/PisellSteps.d.ts +0 -14
- package/es/components/PisellTabbar/PisellTabbar.d.ts +0 -20
- package/es/components/PisellTabbar/components/index.d.ts +0 -1
- package/es/components/PisellTabbar/index.d.ts +0 -9
- package/es/components/PisellTabbar/template/Template1/index.d.ts +0 -6
- package/es/components/PisellTabbar2/PisellTabbar.d.ts +0 -23
- package/es/components/PisellTabbar2/components/index.d.ts +0 -1
- package/es/components/PisellTabbar2/index.d.ts +0 -6
- package/es/components/PisellTabbar3/index.d.ts +0 -6
- package/es/components/auto-resize-text/auto-text-size-standalone.d.ts +0 -20
- package/es/components/auto-resize-text/index.d.ts +0 -6
- package/es/components/cardPro/index.d.ts +0 -4
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -12
- package/es/components/drag-sort-tree/index.d.ts +0 -5
- package/es/components/filter/types.d.ts +0 -46
- package/es/components/iconfont/index.d.ts +0 -8
- package/es/components/login-and-register/index.d.ts +0 -82
- package/es/components/pisell-config-provider/context.d.ts +0 -20
- package/es/components/pisell-config-provider/index.d.ts +0 -12
- package/es/components/pisellBatchActionBar/PisellBatchActionBar.d.ts +0 -31
- package/es/components/pisellEmpty/index.d.ts +0 -19
- package/es/components/pisellLayout/index.d.ts +0 -14
- package/es/components/pisellQuickFilter/index.d.ts +0 -11
- package/es/components/pisellSort/index.d.ts +0 -4
- package/es/components/pisellStatisticList/index.d.ts +0 -21
- package/es/components/productCard/components/Action/index.d.ts +0 -4
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
- package/es/components/productCard/status.d.ts +0 -32
- package/es/components/productCard/types.d.ts +0 -84
- package/es/components/select/index.d.ts +0 -9
- package/es/components/sort/types.d.ts +0 -20
- package/es/components/table/Actions/component/ViewMode/index.d.ts +0 -9
- package/es/components/table/Table/fields/select/Edit/index.d.ts +0 -4
- package/es/components/table/types.d.ts +0 -268
- package/es/components/versionModal/index.d.ts +0 -23
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -12
- package/lib/components/Pagination/index.d.ts +0 -14
- package/lib/components/PisellCards/components/GraphicTextCard/GraphicTextCard.d.ts +0 -9
- package/lib/components/PisellCards/components/GraphicTextCard/components/index.d.ts +0 -6
- package/lib/components/PisellCards/components/GraphicTextCard/index.d.ts +0 -5
- package/lib/components/PisellCards/components/MultilevelCard/components/PanelWrapper.d.ts +0 -7
- package/lib/components/PisellProcedure/PisellProcedure.d.ts +0 -22
- package/lib/components/PisellProcedure/PisellProcedure.stories.d.ts +0 -163
- package/lib/components/PisellProcedure/components/ProcedureBody.d.ts +0 -41
- package/lib/components/PisellProcedure/components/ProcedureFooter.d.ts +0 -38
- package/lib/components/PisellProcedure/components/ProcedureHeader.d.ts +0 -34
- package/lib/components/PisellProcedure/components/index.d.ts +0 -12
- package/lib/components/PisellProcedure/index.d.ts +0 -5
- package/lib/components/PisellSteps/PisellSteps.d.ts +0 -14
- package/lib/components/PisellTabbar/PisellTabbar.d.ts +0 -20
- package/lib/components/PisellTabbar/components/index.d.ts +0 -1
- package/lib/components/PisellTabbar/index.d.ts +0 -9
- package/lib/components/PisellTabbar/template/Template1/index.d.ts +0 -6
- package/lib/components/PisellTabbar2/PisellTabbar.d.ts +0 -23
- package/lib/components/PisellTabbar2/components/index.d.ts +0 -1
- package/lib/components/PisellTabbar2/index.d.ts +0 -6
- package/lib/components/PisellTabbar3/index.d.ts +0 -6
- package/lib/components/auto-resize-text/auto-text-size-standalone.d.ts +0 -20
- package/lib/components/auto-resize-text/index.d.ts +0 -6
- package/lib/components/cardPro/index.d.ts +0 -4
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -12
- package/lib/components/drag-sort-tree/index.d.ts +0 -5
- package/lib/components/filter/types.d.ts +0 -46
- package/lib/components/iconfont/index.d.ts +0 -8
- package/lib/components/login-and-register/index.d.ts +0 -82
- package/lib/components/pisell-config-provider/context.d.ts +0 -20
- package/lib/components/pisell-config-provider/index.d.ts +0 -12
- package/lib/components/pisellBatchActionBar/PisellBatchActionBar.d.ts +0 -31
- package/lib/components/pisellEmpty/index.d.ts +0 -19
- package/lib/components/pisellLayout/index.d.ts +0 -14
- package/lib/components/pisellQuickFilter/index.d.ts +0 -11
- package/lib/components/pisellSort/index.d.ts +0 -4
- package/lib/components/pisellStatisticList/index.d.ts +0 -21
- package/lib/components/productCard/components/Action/index.d.ts +0 -4
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
- package/lib/components/productCard/status.d.ts +0 -32
- package/lib/components/productCard/types.d.ts +0 -84
- package/lib/components/select/index.d.ts +0 -9
- package/lib/components/sort/types.d.ts +0 -20
- package/lib/components/table/Actions/component/ViewMode/index.d.ts +0 -9
- package/lib/components/table/Table/fields/select/Edit/index.d.ts +0 -4
- package/lib/components/table/types.d.ts +0 -268
- package/lib/components/versionModal/index.d.ts +0 -23
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -12
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellDateTimeDisplay/components/DateDisplay.tsx
|
|
30
|
+
var DateDisplay_exports = {};
|
|
31
|
+
__export(DateDisplay_exports, {
|
|
32
|
+
DateDisplay: () => DateDisplay,
|
|
33
|
+
default: () => DateDisplay_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(DateDisplay_exports);
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
38
|
+
var import_utils = require("../utils");
|
|
39
|
+
var DateDisplay = ({
|
|
40
|
+
date,
|
|
41
|
+
format,
|
|
42
|
+
referenceDate = (0, import_dayjs.default)(),
|
|
43
|
+
style,
|
|
44
|
+
className
|
|
45
|
+
}) => {
|
|
46
|
+
const labels = format == null ? void 0 : format.relativeDayLabels;
|
|
47
|
+
const relativeDay = (format == null ? void 0 : format.showRelativeDay) ? (0, import_utils.getRelativeDay)(date, referenceDate) : null;
|
|
48
|
+
const formattedDate = relativeDay ? (labels == null ? void 0 : labels[relativeDay]) ?? (0, import_utils.getRelativeDayLabel)(relativeDay, date.locale()) : (0, import_utils.formatDate)(date, format);
|
|
49
|
+
if (!formattedDate) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
const inlineStyle = {
|
|
53
|
+
fontSize: style == null ? void 0 : style.fontSize,
|
|
54
|
+
fontWeight: style == null ? void 0 : style.fontWeight,
|
|
55
|
+
color: style == null ? void 0 : style.color,
|
|
56
|
+
lineHeight: style == null ? void 0 : style.lineHeight
|
|
57
|
+
};
|
|
58
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
59
|
+
"span",
|
|
60
|
+
{
|
|
61
|
+
className: `pisell-datetime-display-date ${className || ""}`.trim(),
|
|
62
|
+
style: inlineStyle
|
|
63
|
+
},
|
|
64
|
+
formattedDate
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
var DateDisplay_default = DateDisplay;
|
|
68
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
+
0 && (module.exports = {
|
|
70
|
+
DateDisplay
|
|
71
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellDateTimeDisplay/components/TimeDisplay.tsx
|
|
30
|
+
var TimeDisplay_exports = {};
|
|
31
|
+
__export(TimeDisplay_exports, {
|
|
32
|
+
TimeDisplay: () => TimeDisplay,
|
|
33
|
+
default: () => TimeDisplay_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(TimeDisplay_exports);
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_utils = require("../utils");
|
|
38
|
+
var TimeDisplay = ({
|
|
39
|
+
time,
|
|
40
|
+
format,
|
|
41
|
+
style,
|
|
42
|
+
className
|
|
43
|
+
}) => {
|
|
44
|
+
const formattedTime = (0, import_utils.formatTime)(time, format);
|
|
45
|
+
const inlineStyle = {
|
|
46
|
+
fontSize: style == null ? void 0 : style.fontSize,
|
|
47
|
+
fontWeight: style == null ? void 0 : style.fontWeight,
|
|
48
|
+
color: style == null ? void 0 : style.color,
|
|
49
|
+
lineHeight: style == null ? void 0 : style.lineHeight
|
|
50
|
+
};
|
|
51
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
52
|
+
"span",
|
|
53
|
+
{
|
|
54
|
+
className: `pisell-datetime-display-time ${className || ""}`.trim(),
|
|
55
|
+
style: inlineStyle
|
|
56
|
+
},
|
|
57
|
+
formattedTime
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
var TimeDisplay_default = TimeDisplay;
|
|
61
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
62
|
+
0 && (module.exports = {
|
|
63
|
+
TimeDisplay
|
|
64
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellDateTimeDisplay/components/WeekdayDisplay.tsx
|
|
30
|
+
var WeekdayDisplay_exports = {};
|
|
31
|
+
__export(WeekdayDisplay_exports, {
|
|
32
|
+
WeekdayDisplay: () => WeekdayDisplay,
|
|
33
|
+
default: () => WeekdayDisplay_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(WeekdayDisplay_exports);
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_utils = require("../utils");
|
|
38
|
+
var WeekdayDisplay = ({
|
|
39
|
+
weekday,
|
|
40
|
+
format,
|
|
41
|
+
style,
|
|
42
|
+
className
|
|
43
|
+
}) => {
|
|
44
|
+
const formattedWeekday = (0, import_utils.formatWeekday)(weekday, format);
|
|
45
|
+
const inlineStyle = {
|
|
46
|
+
fontSize: style == null ? void 0 : style.fontSize,
|
|
47
|
+
fontWeight: style == null ? void 0 : style.fontWeight,
|
|
48
|
+
color: style == null ? void 0 : style.color,
|
|
49
|
+
lineHeight: style == null ? void 0 : style.lineHeight
|
|
50
|
+
};
|
|
51
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
52
|
+
"span",
|
|
53
|
+
{
|
|
54
|
+
className: `pisell-datetime-display-weekday ${className || ""}`.trim(),
|
|
55
|
+
style: inlineStyle
|
|
56
|
+
},
|
|
57
|
+
formattedWeekday
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
var WeekdayDisplay_default = WeekdayDisplay;
|
|
61
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
62
|
+
0 && (module.exports = {
|
|
63
|
+
WeekdayDisplay
|
|
64
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellDateTimeDisplay/components/index.tsx
|
|
20
|
+
var components_exports = {};
|
|
21
|
+
__export(components_exports, {
|
|
22
|
+
DateDisplay: () => import_DateDisplay.DateDisplay,
|
|
23
|
+
TimeDisplay: () => import_TimeDisplay.TimeDisplay,
|
|
24
|
+
WeekdayDisplay: () => import_WeekdayDisplay.WeekdayDisplay
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(components_exports);
|
|
27
|
+
var import_TimeDisplay = require("./TimeDisplay");
|
|
28
|
+
var import_DateDisplay = require("./DateDisplay");
|
|
29
|
+
var import_WeekdayDisplay = require("./WeekdayDisplay");
|
|
30
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
+
0 && (module.exports = {
|
|
32
|
+
DateDisplay,
|
|
33
|
+
TimeDisplay,
|
|
34
|
+
WeekdayDisplay
|
|
35
|
+
});
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.ts
|
|
20
|
+
var dateTimeDisplayFormats_exports = {};
|
|
21
|
+
__export(dateTimeDisplayFormats_exports, {
|
|
22
|
+
DATETIME_DISPLAY_FORMATS: () => DATETIME_DISPLAY_FORMATS
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(dateTimeDisplayFormats_exports);
|
|
25
|
+
var DATETIME_DISPLAY_FORMATS = {
|
|
26
|
+
"zh-cn": {
|
|
27
|
+
dateFormat: {
|
|
28
|
+
order: "YMD",
|
|
29
|
+
showYear: true,
|
|
30
|
+
separator: "-",
|
|
31
|
+
showChineseUnit: false,
|
|
32
|
+
showRelativeDay: true
|
|
33
|
+
},
|
|
34
|
+
timeFormat: {
|
|
35
|
+
use12Hour: false,
|
|
36
|
+
showSeconds: false
|
|
37
|
+
},
|
|
38
|
+
weekdayFormat: {
|
|
39
|
+
full: false,
|
|
40
|
+
singleLetter: false
|
|
41
|
+
},
|
|
42
|
+
fields: {
|
|
43
|
+
showTime: true,
|
|
44
|
+
showDate: true,
|
|
45
|
+
showWeekday: true,
|
|
46
|
+
fieldOrder: ["date", "time", "weekday"],
|
|
47
|
+
inlineSeparators: [" - ", " "]
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
zh: {
|
|
51
|
+
// 兜底 zh
|
|
52
|
+
dateFormat: {
|
|
53
|
+
order: "YMD",
|
|
54
|
+
showYear: true,
|
|
55
|
+
separator: "-",
|
|
56
|
+
showChineseUnit: false,
|
|
57
|
+
showRelativeDay: true
|
|
58
|
+
},
|
|
59
|
+
timeFormat: { use12Hour: false, showSeconds: false },
|
|
60
|
+
weekdayFormat: { full: false, singleLetter: false },
|
|
61
|
+
fields: {
|
|
62
|
+
showTime: true,
|
|
63
|
+
showDate: true,
|
|
64
|
+
showWeekday: true,
|
|
65
|
+
fieldOrder: ["date", "time", "weekday"],
|
|
66
|
+
inlineSeparators: [" - ", " "]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
en: {
|
|
70
|
+
dateFormat: {
|
|
71
|
+
order: "DMY",
|
|
72
|
+
shortMonth: true,
|
|
73
|
+
showYear: true,
|
|
74
|
+
showRelativeDay: true,
|
|
75
|
+
useCommaBeforeYear: true
|
|
76
|
+
},
|
|
77
|
+
timeFormat: {
|
|
78
|
+
use12Hour: false,
|
|
79
|
+
showSeconds: false
|
|
80
|
+
},
|
|
81
|
+
weekdayFormat: {
|
|
82
|
+
full: false,
|
|
83
|
+
singleLetter: false,
|
|
84
|
+
trailingComma: true
|
|
85
|
+
},
|
|
86
|
+
fields: {
|
|
87
|
+
showTime: true,
|
|
88
|
+
showDate: true,
|
|
89
|
+
showWeekday: true,
|
|
90
|
+
fieldOrder: ["time", "weekday", "date"],
|
|
91
|
+
inlineSeparators: [" ", " "]
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
96
|
+
0 && (module.exports = {
|
|
97
|
+
DATETIME_DISPLAY_FORMATS
|
|
98
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellDateTimeDisplay/formats/index.ts
|
|
20
|
+
var formats_exports = {};
|
|
21
|
+
__export(formats_exports, {
|
|
22
|
+
DATETIME_DISPLAY_FORMATS: () => import_dateTimeDisplayFormats.DATETIME_DISPLAY_FORMATS
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(formats_exports);
|
|
25
|
+
var import_dateTimeDisplayFormats = require("./dateTimeDisplayFormats");
|
|
26
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
+
0 && (module.exports = {
|
|
28
|
+
DATETIME_DISPLAY_FORMATS
|
|
29
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellDateTimeDisplay/hooks/index.ts
|
|
20
|
+
var hooks_exports = {};
|
|
21
|
+
__export(hooks_exports, {
|
|
22
|
+
useCurrentTime: () => import_useCurrentTime.useCurrentTime
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(hooks_exports);
|
|
25
|
+
var import_useCurrentTime = require("./useCurrentTime");
|
|
26
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
+
0 && (module.exports = {
|
|
28
|
+
useCurrentTime
|
|
29
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellDateTimeDisplay/hooks/useCurrentTime.ts
|
|
30
|
+
var useCurrentTime_exports = {};
|
|
31
|
+
__export(useCurrentTime_exports, {
|
|
32
|
+
useCurrentTime: () => useCurrentTime
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(useCurrentTime_exports);
|
|
35
|
+
var import_react = require("react");
|
|
36
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
37
|
+
var import_localeUtils = require("../utils/localeUtils");
|
|
38
|
+
var import_usePisellConfig = __toESM(require("../../pisell-config-provider/hooks/usePisellConfig"));
|
|
39
|
+
function useCurrentTime(options) {
|
|
40
|
+
const {
|
|
41
|
+
refreshInterval = 6e4,
|
|
42
|
+
disabled = false,
|
|
43
|
+
locale: userLocale,
|
|
44
|
+
onUpdate
|
|
45
|
+
} = options || {};
|
|
46
|
+
const globalConfig = (0, import_usePisellConfig.default)();
|
|
47
|
+
const globalLocale = globalConfig == null ? void 0 : globalConfig.locale;
|
|
48
|
+
const dayjsLocale = (0, import_localeUtils.getDayjsLocale)(userLocale || globalLocale);
|
|
49
|
+
const [currentTime, setCurrentTime] = (0, import_react.useState)(() => {
|
|
50
|
+
const time = (0, import_dayjs.default)();
|
|
51
|
+
return time.locale(dayjsLocale);
|
|
52
|
+
});
|
|
53
|
+
(0, import_react.useEffect)(() => {
|
|
54
|
+
if (disabled) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const timer = setInterval(() => {
|
|
58
|
+
const time = (0, import_dayjs.default)();
|
|
59
|
+
const localizedTime = time.locale(dayjsLocale);
|
|
60
|
+
setCurrentTime(localizedTime);
|
|
61
|
+
onUpdate == null ? void 0 : onUpdate(localizedTime);
|
|
62
|
+
}, refreshInterval);
|
|
63
|
+
return () => {
|
|
64
|
+
clearInterval(timer);
|
|
65
|
+
};
|
|
66
|
+
}, [refreshInterval, disabled, dayjsLocale, onUpdate]);
|
|
67
|
+
(0, import_react.useEffect)(() => {
|
|
68
|
+
setCurrentTime((prevTime) => prevTime.locale(dayjsLocale));
|
|
69
|
+
}, [dayjsLocale]);
|
|
70
|
+
return currentTime;
|
|
71
|
+
}
|
|
72
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
73
|
+
0 && (module.exports = {
|
|
74
|
+
useCurrentTime
|
|
75
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellDateTimeDisplay/index.tsx
|
|
30
|
+
var pisellDateTimeDisplay_exports = {};
|
|
31
|
+
__export(pisellDateTimeDisplay_exports, {
|
|
32
|
+
PisellDateTimeDisplay: () => import_PisellDateTimeDisplay.default,
|
|
33
|
+
default: () => import_PisellDateTimeDisplay2.default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(pisellDateTimeDisplay_exports);
|
|
36
|
+
var import_PisellDateTimeDisplay = __toESM(require("./PisellDateTimeDisplay"));
|
|
37
|
+
var import_PisellDateTimeDisplay2 = __toESM(require("./PisellDateTimeDisplay"));
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
PisellDateTimeDisplay
|
|
41
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/components/pisellDateTimeDisplay/types.ts
|
|
16
|
+
var types_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(types_exports);
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellDateTimeDisplay/utils/formatDate.ts
|
|
20
|
+
var formatDate_exports = {};
|
|
21
|
+
__export(formatDate_exports, {
|
|
22
|
+
formatDate: () => formatDate
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(formatDate_exports);
|
|
25
|
+
var import_localeUtils = require("./localeUtils");
|
|
26
|
+
function formatDate(date, config) {
|
|
27
|
+
const {
|
|
28
|
+
order = "YMD",
|
|
29
|
+
shortMonth = true,
|
|
30
|
+
numericMonth = false,
|
|
31
|
+
showChineseUnit = false,
|
|
32
|
+
separator = "-",
|
|
33
|
+
showYear = false,
|
|
34
|
+
showMonth = true,
|
|
35
|
+
showDay = true,
|
|
36
|
+
useCommaBeforeYear = true
|
|
37
|
+
} = config || {};
|
|
38
|
+
const locale = date.locale();
|
|
39
|
+
const isChinese = (0, import_localeUtils.isChinese)(locale);
|
|
40
|
+
const parts = [];
|
|
41
|
+
const yearFormat = isChinese && showChineseUnit ? "YYYY年" : "YYYY";
|
|
42
|
+
let monthFormat = "";
|
|
43
|
+
if (numericMonth) {
|
|
44
|
+
monthFormat = isChinese && showChineseUnit ? "M月" : "MM";
|
|
45
|
+
} else {
|
|
46
|
+
if (isChinese) {
|
|
47
|
+
monthFormat = showChineseUnit ? "M月" : "M";
|
|
48
|
+
} else {
|
|
49
|
+
monthFormat = shortMonth ? "MMM" : "MMMM";
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const dayFormat = isChinese && showChineseUnit ? "D日" : "DD";
|
|
53
|
+
switch (order) {
|
|
54
|
+
case "YMD":
|
|
55
|
+
if (showYear) parts.push(yearFormat);
|
|
56
|
+
if (showMonth) parts.push(monthFormat);
|
|
57
|
+
if (showDay) parts.push(dayFormat);
|
|
58
|
+
break;
|
|
59
|
+
case "MDY":
|
|
60
|
+
if (showMonth) parts.push(monthFormat);
|
|
61
|
+
if (showDay) parts.push(dayFormat);
|
|
62
|
+
if (showYear) parts.push(yearFormat);
|
|
63
|
+
break;
|
|
64
|
+
case "DMY":
|
|
65
|
+
if (showDay) parts.push(dayFormat);
|
|
66
|
+
if (showMonth) parts.push(monthFormat);
|
|
67
|
+
if (showYear) parts.push(yearFormat);
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
if (parts.length === 0) {
|
|
71
|
+
return "";
|
|
72
|
+
}
|
|
73
|
+
if (isChinese && showChineseUnit) {
|
|
74
|
+
return date.format(parts.join(""));
|
|
75
|
+
}
|
|
76
|
+
if (order === "MDY" && !isChinese) {
|
|
77
|
+
const formatted = date.format(parts.join(" "));
|
|
78
|
+
if (showYear && showMonth && showDay) {
|
|
79
|
+
const [month, day, year] = formatted.split(" ");
|
|
80
|
+
return `${month} ${day}, ${year}`;
|
|
81
|
+
}
|
|
82
|
+
if (showYear && showDay && !showMonth) {
|
|
83
|
+
const [day, year] = formatted.split(" ");
|
|
84
|
+
return `${day}, ${year}`;
|
|
85
|
+
}
|
|
86
|
+
return formatted;
|
|
87
|
+
}
|
|
88
|
+
if (order === "DMY" && !isChinese) {
|
|
89
|
+
const formatted = date.format(parts.join(" "));
|
|
90
|
+
if (showYear && showMonth && showDay && useCommaBeforeYear) {
|
|
91
|
+
const [day, month, year] = formatted.split(" ");
|
|
92
|
+
return `${day} ${month}, ${year}`;
|
|
93
|
+
}
|
|
94
|
+
if (showYear && showDay && !showMonth && useCommaBeforeYear) {
|
|
95
|
+
const [day, year] = formatted.split(" ");
|
|
96
|
+
return `${day}, ${year}`;
|
|
97
|
+
}
|
|
98
|
+
return formatted;
|
|
99
|
+
}
|
|
100
|
+
return date.format(parts.join(separator));
|
|
101
|
+
}
|
|
102
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
103
|
+
0 && (module.exports = {
|
|
104
|
+
formatDate
|
|
105
|
+
});
|