@pisell/materials 6.9.4 → 6.9.5
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 +145 -145
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +18 -18
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +20 -20
- package/es/components/PisellFields/index.d.ts +36 -0
- package/es/components/PisellFields/index.js +41 -0
- package/es/components/PisellLayouts/index.d.ts +32 -0
- package/es/components/PisellLayouts/index.js +43 -0
- package/es/components/PisellMetrics/index.d.ts +23 -0
- package/es/components/PisellMetrics/index.js +29 -0
- package/es/components/cardMetricItem/index.d.ts +4 -1
- package/es/components/cardMetricItem/index.js +5 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +9 -9
- package/es/components/page/index.js +4 -121
- 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/pisellDateTimeDisplay/PisellDateTimeDisplay.d.ts +35 -0
- package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +188 -0
- package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.less +75 -0
- package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.stories.d.ts +176 -0
- package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.stories.js +1085 -0
- package/es/components/pisellDateTimeDisplay/components/DateDisplay.d.ts +43 -0
- package/es/components/pisellDateTimeDisplay/components/DateDisplay.js +50 -0
- package/es/components/pisellDateTimeDisplay/components/TimeDisplay.d.ts +42 -0
- package/es/components/pisellDateTimeDisplay/components/TimeDisplay.js +44 -0
- package/es/components/pisellDateTimeDisplay/components/WeekdayDisplay.d.ts +57 -0
- package/es/components/pisellDateTimeDisplay/components/WeekdayDisplay.js +59 -0
- package/es/components/pisellDateTimeDisplay/components/index.d.ts +6 -0
- package/es/components/pisellDateTimeDisplay/components/index.js +3 -0
- package/es/components/pisellDateTimeDisplay/hooks/index.d.ts +2 -0
- package/es/components/pisellDateTimeDisplay/hooks/index.js +1 -0
- package/es/components/pisellDateTimeDisplay/hooks/useCurrentTime.d.ts +45 -0
- package/es/components/pisellDateTimeDisplay/hooks/useCurrentTime.js +79 -0
- package/es/components/pisellDateTimeDisplay/index.d.ts +2 -0
- package/es/components/pisellDateTimeDisplay/index.js +1 -0
- package/es/components/pisellDateTimeDisplay/types.d.ts +298 -0
- package/es/components/pisellDateTimeDisplay/types.js +1 -0
- package/es/components/pisellDateTimeDisplay/utils/formatDate.d.ts +21 -0
- package/es/components/pisellDateTimeDisplay/utils/formatDate.js +127 -0
- package/es/components/pisellDateTimeDisplay/utils/formatTime.d.ts +19 -0
- package/es/components/pisellDateTimeDisplay/utils/formatTime.js +44 -0
- package/es/components/pisellDateTimeDisplay/utils/formatWeekday.d.ts +30 -0
- package/es/components/pisellDateTimeDisplay/utils/formatWeekday.js +61 -0
- package/es/components/pisellDateTimeDisplay/utils/getRefreshInterval.d.ts +18 -0
- package/es/components/pisellDateTimeDisplay/utils/getRefreshInterval.js +28 -0
- package/es/components/pisellDateTimeDisplay/utils/index.d.ts +4 -0
- package/es/components/pisellDateTimeDisplay/utils/index.js +4 -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.d.ts +5 -0
- package/es/components/pisellEmail/constants/emailDomains.js +11 -0
- package/es/components/pisellEmail/constants/emailRegex.d.ts +13 -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.d.ts +15 -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/pisellLayout/index.d.ts +1 -1
- 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/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.d.ts +17 -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.d.ts +12 -0
- package/es/components/pisellMetricCard/components/MetricTitle.js +52 -0
- package/es/components/pisellMetricCard/components/MetricValue.d.ts +12 -0
- package/es/components/pisellMetricCard/components/MetricValue.js +29 -0
- package/es/components/pisellMetricCard/components/TrendIcon.d.ts +14 -0
- package/es/components/pisellMetricCard/components/TrendIcon.js +30 -0
- package/es/components/pisellMetricCard/components/index.d.ts +7 -0
- package/es/components/pisellMetricCard/components/index.js +8 -0
- package/es/components/pisellMetricCard/index.d.ts +6 -0
- package/es/components/pisellMetricCard/index.js +7 -0
- package/es/components/pisellMetricCard/types.d.ts +201 -0
- package/es/components/pisellMetricCard/types.js +1 -0
- package/es/components/pisellMetricCard/utils/calculateTrend.d.ts +14 -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.d.ts +36 -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.d.ts +39 -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 +62 -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/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.d.ts +6 -0
- package/es/components/pisellUrl/utils/index.js +12 -0
- package/es/components/pisellUrl/utils/urlFormatter.d.ts +38 -0
- package/es/components/pisellUrl/utils/urlFormatter.js +80 -0
- package/es/components/pisellUrl/utils/urlHelper.d.ts +63 -0
- package/es/components/pisellUrl/utils/urlHelper.js +141 -0
- package/es/components/pisellUrl/utils/urlValidator.d.ts +46 -0
- package/es/components/pisellUrl/utils/urlValidator.js +83 -0
- package/es/components/table/Table/fields/index.d.ts +2 -2
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/index.d.ts +173 -135
- package/es/index.js +214 -118
- package/es/theme/tokens.d.ts +22 -0
- package/es/theme/tokens.js +277 -0
- package/lib/components/PisellFields/index.d.ts +36 -0
- package/lib/components/PisellFields/index.js +49 -0
- package/lib/components/PisellLayouts/index.d.ts +32 -0
- package/lib/components/PisellLayouts/index.js +57 -0
- package/lib/components/PisellMetrics/index.d.ts +23 -0
- package/lib/components/PisellMetrics/index.js +43 -0
- package/lib/components/cardMetricItem/index.d.ts +4 -1
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +9 -9
- package/lib/components/page/index.js +3 -121
- 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/pisellDateTimeDisplay/PisellDateTimeDisplay.d.ts +35 -0
- package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +178 -0
- package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.less +75 -0
- package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.stories.d.ts +176 -0
- package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.stories.js +783 -0
- package/lib/components/pisellDateTimeDisplay/components/DateDisplay.d.ts +43 -0
- package/lib/components/pisellDateTimeDisplay/components/DateDisplay.js +67 -0
- package/lib/components/pisellDateTimeDisplay/components/TimeDisplay.d.ts +42 -0
- package/lib/components/pisellDateTimeDisplay/components/TimeDisplay.js +64 -0
- package/lib/components/pisellDateTimeDisplay/components/WeekdayDisplay.d.ts +57 -0
- package/lib/components/pisellDateTimeDisplay/components/WeekdayDisplay.js +64 -0
- package/lib/components/pisellDateTimeDisplay/components/index.d.ts +6 -0
- package/lib/components/pisellDateTimeDisplay/components/index.js +35 -0
- package/lib/components/pisellDateTimeDisplay/hooks/index.d.ts +2 -0
- package/lib/components/pisellDateTimeDisplay/hooks/index.js +29 -0
- package/lib/components/pisellDateTimeDisplay/hooks/useCurrentTime.d.ts +45 -0
- package/lib/components/pisellDateTimeDisplay/hooks/useCurrentTime.js +72 -0
- package/lib/components/pisellDateTimeDisplay/index.d.ts +2 -0
- package/lib/components/pisellDateTimeDisplay/index.js +39 -0
- package/lib/components/pisellDateTimeDisplay/types.d.ts +298 -0
- package/lib/components/pisellDateTimeDisplay/types.js +17 -0
- package/lib/components/pisellDateTimeDisplay/utils/formatDate.d.ts +21 -0
- package/lib/components/pisellDateTimeDisplay/utils/formatDate.js +91 -0
- package/lib/components/pisellDateTimeDisplay/utils/formatTime.d.ts +19 -0
- package/lib/components/pisellDateTimeDisplay/utils/formatTime.js +47 -0
- package/lib/components/pisellDateTimeDisplay/utils/formatWeekday.d.ts +30 -0
- package/lib/components/pisellDateTimeDisplay/utils/formatWeekday.js +45 -0
- package/lib/components/pisellDateTimeDisplay/utils/getRefreshInterval.d.ts +18 -0
- package/lib/components/pisellDateTimeDisplay/utils/getRefreshInterval.js +35 -0
- package/lib/components/pisellDateTimeDisplay/utils/index.d.ts +4 -0
- package/lib/components/pisellDateTimeDisplay/utils/index.js +38 -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.d.ts +5 -0
- package/lib/components/pisellEmail/constants/emailDomains.js +49 -0
- package/lib/components/pisellEmail/constants/emailRegex.d.ts +13 -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.d.ts +15 -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/pisellLayout/index.d.ts +1 -1
- 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/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.d.ts +17 -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.d.ts +12 -0
- package/lib/components/pisellMetricCard/components/MetricTitle.js +84 -0
- package/lib/components/pisellMetricCard/components/MetricValue.d.ts +12 -0
- package/lib/components/pisellMetricCard/components/MetricValue.js +56 -0
- package/lib/components/pisellMetricCard/components/TrendIcon.d.ts +14 -0
- package/lib/components/pisellMetricCard/components/TrendIcon.js +50 -0
- package/lib/components/pisellMetricCard/components/index.d.ts +7 -0
- package/lib/components/pisellMetricCard/components/index.js +48 -0
- package/lib/components/pisellMetricCard/index.d.ts +6 -0
- package/lib/components/pisellMetricCard/index.js +41 -0
- package/lib/components/pisellMetricCard/types.d.ts +201 -0
- package/lib/components/pisellMetricCard/types.js +17 -0
- package/lib/components/pisellMetricCard/utils/calculateTrend.d.ts +14 -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.d.ts +36 -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.d.ts +39 -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 +62 -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/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.d.ts +6 -0
- package/lib/components/pisellUrl/utils/index.js +27 -0
- package/lib/components/pisellUrl/utils/urlFormatter.d.ts +38 -0
- package/lib/components/pisellUrl/utils/urlFormatter.js +66 -0
- package/lib/components/pisellUrl/utils/urlHelper.d.ts +63 -0
- package/lib/components/pisellUrl/utils/urlHelper.js +97 -0
- package/lib/components/pisellUrl/utils/urlValidator.d.ts +46 -0
- package/lib/components/pisellUrl/utils/urlValidator.js +77 -0
- package/lib/components/table/Table/fields/index.d.ts +2 -2
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/index.d.ts +173 -135
- package/lib/index.js +163 -117
- package/lib/theme/tokens.d.ts +22 -0
- package/lib/theme/tokens.js +277 -0
- 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-long-text/meta.ts +436 -0
- package/lowcode/pisell-long-text/snippets.ts +55 -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-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
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Dayjs } from 'dayjs';
|
|
3
|
+
import type { DateFormatConfig, TextStyleConfig } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* DateDisplay 组件 Props
|
|
6
|
+
*/
|
|
7
|
+
export interface DateDisplayProps {
|
|
8
|
+
/**
|
|
9
|
+
* 日期对象
|
|
10
|
+
*/
|
|
11
|
+
date: Dayjs;
|
|
12
|
+
/**
|
|
13
|
+
* 日期格式配置
|
|
14
|
+
*/
|
|
15
|
+
format?: DateFormatConfig;
|
|
16
|
+
/**
|
|
17
|
+
* 文本样式
|
|
18
|
+
*/
|
|
19
|
+
style?: TextStyleConfig;
|
|
20
|
+
/**
|
|
21
|
+
* 自定义类名
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 日期展示组件
|
|
27
|
+
*
|
|
28
|
+
* @description
|
|
29
|
+
* - 格式化并展示日期
|
|
30
|
+
* - 支持不同的日期顺序(YMD/MDY/DMY)
|
|
31
|
+
* - 支持年月日字段显隐
|
|
32
|
+
* - 支持中文单位(年、月、日)
|
|
33
|
+
* - 支持英文月份格式(简写/完整/数字)
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* <DateDisplay
|
|
37
|
+
* date={dayjs()}
|
|
38
|
+
* format={{ order: 'YMD', showYear: true, showChineseUnit: true }}
|
|
39
|
+
* style={{ fontSize: 18, fontWeight: 400, color: '#666' }}
|
|
40
|
+
* />
|
|
41
|
+
*/
|
|
42
|
+
export declare const DateDisplay: React.FC<DateDisplayProps>;
|
|
43
|
+
export default DateDisplay;
|
|
@@ -0,0 +1,67 @@
|
|
|
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_utils = require("../utils");
|
|
38
|
+
var DateDisplay = ({
|
|
39
|
+
date,
|
|
40
|
+
format,
|
|
41
|
+
style,
|
|
42
|
+
className
|
|
43
|
+
}) => {
|
|
44
|
+
const formattedDate = (0, import_utils.formatDate)(date, format);
|
|
45
|
+
if (!formattedDate) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
const inlineStyle = {
|
|
49
|
+
fontSize: style == null ? void 0 : style.fontSize,
|
|
50
|
+
fontWeight: style == null ? void 0 : style.fontWeight,
|
|
51
|
+
color: style == null ? void 0 : style.color,
|
|
52
|
+
lineHeight: style == null ? void 0 : style.lineHeight
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
55
|
+
"span",
|
|
56
|
+
{
|
|
57
|
+
className: `pisell-datetime-display-date ${className || ""}`.trim(),
|
|
58
|
+
style: inlineStyle
|
|
59
|
+
},
|
|
60
|
+
formattedDate
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
var DateDisplay_default = DateDisplay;
|
|
64
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
65
|
+
0 && (module.exports = {
|
|
66
|
+
DateDisplay
|
|
67
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Dayjs } from 'dayjs';
|
|
3
|
+
import type { TimeFormatConfig, TextStyleConfig } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* TimeDisplay 组件 Props
|
|
6
|
+
*/
|
|
7
|
+
export interface TimeDisplayProps {
|
|
8
|
+
/**
|
|
9
|
+
* 时间对象
|
|
10
|
+
*/
|
|
11
|
+
time: Dayjs;
|
|
12
|
+
/**
|
|
13
|
+
* 时间格式配置
|
|
14
|
+
*/
|
|
15
|
+
format?: TimeFormatConfig;
|
|
16
|
+
/**
|
|
17
|
+
* 文本样式
|
|
18
|
+
*/
|
|
19
|
+
style?: TextStyleConfig;
|
|
20
|
+
/**
|
|
21
|
+
* 自定义类名
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 时间展示组件
|
|
27
|
+
*
|
|
28
|
+
* @description
|
|
29
|
+
* - 格式化并展示时间
|
|
30
|
+
* - 支持 12/24 小时制
|
|
31
|
+
* - 支持显示秒
|
|
32
|
+
* - 支持小时补零
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* <TimeDisplay
|
|
36
|
+
* time={dayjs()}
|
|
37
|
+
* format={{ use12Hour: false, showSeconds: true }}
|
|
38
|
+
* style={{ fontSize: 24, fontWeight: 600, color: '#000' }}
|
|
39
|
+
* />
|
|
40
|
+
*/
|
|
41
|
+
export declare const TimeDisplay: React.FC<TimeDisplayProps>;
|
|
42
|
+
export default TimeDisplay;
|
|
@@ -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,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Dayjs } from 'dayjs';
|
|
3
|
+
import type { WeekdayFormatConfig, TextStyleConfig } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* WeekdayDisplay 组件 Props
|
|
6
|
+
*/
|
|
7
|
+
export interface WeekdayDisplayProps {
|
|
8
|
+
/**
|
|
9
|
+
* 日期对象(用于获取星期)
|
|
10
|
+
*/
|
|
11
|
+
weekday: Dayjs;
|
|
12
|
+
/**
|
|
13
|
+
* 星期格式配置
|
|
14
|
+
*/
|
|
15
|
+
format?: WeekdayFormatConfig;
|
|
16
|
+
/**
|
|
17
|
+
* 文本样式
|
|
18
|
+
*/
|
|
19
|
+
style?: TextStyleConfig;
|
|
20
|
+
/**
|
|
21
|
+
* 自定义类名
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 星期展示组件
|
|
27
|
+
*
|
|
28
|
+
* @description
|
|
29
|
+
* - 格式化并展示星期
|
|
30
|
+
* - 支持完整/缩写/单字母模式
|
|
31
|
+
* - 自动支持中英文
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* // 默认(缩写)
|
|
35
|
+
* <WeekdayDisplay
|
|
36
|
+
* weekday={dayjs()}
|
|
37
|
+
* format={{ full: false, singleLetter: false }}
|
|
38
|
+
* style={{ fontSize: 18, fontWeight: 400, color: '#666' }}
|
|
39
|
+
* />
|
|
40
|
+
* // => "Sat" / "周六"
|
|
41
|
+
*
|
|
42
|
+
* // 完整
|
|
43
|
+
* <WeekdayDisplay
|
|
44
|
+
* weekday={dayjs()}
|
|
45
|
+
* format={{ full: true }}
|
|
46
|
+
* />
|
|
47
|
+
* // => "Saturday" / "星期六"
|
|
48
|
+
*
|
|
49
|
+
* // 单字母
|
|
50
|
+
* <WeekdayDisplay
|
|
51
|
+
* weekday={dayjs()}
|
|
52
|
+
* format={{ singleLetter: true }}
|
|
53
|
+
* />
|
|
54
|
+
* // => "S" / "六"
|
|
55
|
+
*/
|
|
56
|
+
export declare const WeekdayDisplay: React.FC<WeekdayDisplayProps>;
|
|
57
|
+
export default WeekdayDisplay;
|
|
@@ -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,6 @@
|
|
|
1
|
+
export { TimeDisplay } from './TimeDisplay';
|
|
2
|
+
export { DateDisplay } from './DateDisplay';
|
|
3
|
+
export { WeekdayDisplay } from './WeekdayDisplay';
|
|
4
|
+
export type { TimeDisplayProps } from './TimeDisplay';
|
|
5
|
+
export type { DateDisplayProps } from './DateDisplay';
|
|
6
|
+
export type { WeekdayDisplayProps } from './WeekdayDisplay';
|
|
@@ -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,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,45 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
/**
|
|
3
|
+
* useCurrentTime Hook 配置项
|
|
4
|
+
*/
|
|
5
|
+
export interface UseCurrentTimeOptions {
|
|
6
|
+
/**
|
|
7
|
+
* 刷新间隔(毫秒)
|
|
8
|
+
* @default 60000
|
|
9
|
+
*/
|
|
10
|
+
refreshInterval?: number;
|
|
11
|
+
/**
|
|
12
|
+
* 是否禁用自动刷新
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* dayjs locale
|
|
18
|
+
* @example 'zh-cn' | 'en' | 'ja'
|
|
19
|
+
*/
|
|
20
|
+
locale?: string;
|
|
21
|
+
/**
|
|
22
|
+
* 时间更新回调
|
|
23
|
+
*/
|
|
24
|
+
onUpdate?: (time: Dayjs) => void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* 管理当前时间状态的自定义 Hook
|
|
28
|
+
*
|
|
29
|
+
* @description
|
|
30
|
+
* - 自动创建定时器刷新时间
|
|
31
|
+
* - 支持自定义刷新间隔
|
|
32
|
+
* - 支持国际化(locale)
|
|
33
|
+
* - 组件卸载时自动清除定时器
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* const currentTime = useCurrentTime({
|
|
37
|
+
* refreshInterval: 1000,
|
|
38
|
+
* locale: 'zh-cn',
|
|
39
|
+
* onUpdate: (time) => console.log(time.format())
|
|
40
|
+
* });
|
|
41
|
+
*
|
|
42
|
+
* @param options 配置项
|
|
43
|
+
* @returns 当前时间(Dayjs 对象)
|
|
44
|
+
*/
|
|
45
|
+
export declare function useCurrentTime(options?: UseCurrentTimeOptions): Dayjs;
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
function useCurrentTime(options) {
|
|
38
|
+
const {
|
|
39
|
+
refreshInterval = 6e4,
|
|
40
|
+
disabled = false,
|
|
41
|
+
locale,
|
|
42
|
+
onUpdate
|
|
43
|
+
} = options || {};
|
|
44
|
+
const [currentTime, setCurrentTime] = (0, import_react.useState)(() => {
|
|
45
|
+
const time = (0, import_dayjs.default)();
|
|
46
|
+
return locale ? time.locale(locale) : time;
|
|
47
|
+
});
|
|
48
|
+
(0, import_react.useEffect)(() => {
|
|
49
|
+
if (disabled) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const timer = setInterval(() => {
|
|
53
|
+
const time = (0, import_dayjs.default)();
|
|
54
|
+
const localizedTime = locale ? time.locale(locale) : time;
|
|
55
|
+
setCurrentTime(localizedTime);
|
|
56
|
+
onUpdate == null ? void 0 : onUpdate(localizedTime);
|
|
57
|
+
}, refreshInterval);
|
|
58
|
+
return () => {
|
|
59
|
+
clearInterval(timer);
|
|
60
|
+
};
|
|
61
|
+
}, [refreshInterval, disabled, locale, onUpdate]);
|
|
62
|
+
(0, import_react.useEffect)(() => {
|
|
63
|
+
if (locale) {
|
|
64
|
+
setCurrentTime((prevTime) => prevTime.locale(locale));
|
|
65
|
+
}
|
|
66
|
+
}, [locale]);
|
|
67
|
+
return currentTime;
|
|
68
|
+
}
|
|
69
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
70
|
+
0 && (module.exports = {
|
|
71
|
+
useCurrentTime
|
|
72
|
+
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { default as PisellDateTimeDisplay } from './PisellDateTimeDisplay';
|
|
2
|
+
export type { PisellDateTimeDisplayProps, LayoutDirection, DateOrder, TextAlign, FieldType, TimeFormatConfig, DateFormatConfig, WeekdayFormatConfig, FieldConfig, TextStyleConfig, ContainerStyleConfig, } from './types';
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellDateTimeDisplay_exports);
|
|
35
|
+
var import_PisellDateTimeDisplay = __toESM(require("./PisellDateTimeDisplay"));
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
PisellDateTimeDisplay
|
|
39
|
+
});
|