@ews-admin/global-design-system 1.21.0 → 1.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +17 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +38 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +38 -8
- package/dist/index.js.map +1 -1
- package/dist/utils/index.d.ts +16 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/locations.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/utils/index.ts +36 -2
- package/src/utils/locations.ts +16 -14
package/dist/index.d.ts
CHANGED
|
@@ -721,7 +721,22 @@ declare function formatCurrency(amount: number, currency?: string): string;
|
|
|
721
721
|
interface FormatDateOptions extends Intl.DateTimeFormatOptions {
|
|
722
722
|
locale?: string | string[];
|
|
723
723
|
}
|
|
724
|
-
|
|
724
|
+
/**
|
|
725
|
+
* Parses a date value the way every date coming from these platforms'
|
|
726
|
+
* Java/Kotlin backends actually shows up, without the classic off-by-one
|
|
727
|
+
* timezone bug.
|
|
728
|
+
*
|
|
729
|
+
* A bare "YYYY-MM-DD" string is parsed by `new Date(...)` as UTC midnight
|
|
730
|
+
* (per the ECMAScript spec), which then shifts a day earlier once formatted
|
|
731
|
+
* in any timezone behind UTC. This function parses date-only strings (and
|
|
732
|
+
* Jackson's `[year, month, day, ...]` LocalDate/LocalDateTime array
|
|
733
|
+
* serialization) as local calendar components instead. Full ISO datetime
|
|
734
|
+
* strings (with a time and/or timezone), Date objects, and numeric
|
|
735
|
+
* timestamps are unaffected and still go through the normal `new Date(...)`
|
|
736
|
+
* parse.
|
|
737
|
+
*/
|
|
738
|
+
declare function parseDateSafe(date: Date | string | number | number[]): Date;
|
|
739
|
+
declare function formatDate(date: Date | string | number | number[], options?: FormatDateOptions): string;
|
|
725
740
|
/**
|
|
726
741
|
* Utility function to debounce function calls
|
|
727
742
|
* @param func - Function to debounce
|
|
@@ -827,5 +842,5 @@ interface ThemeProviderProps {
|
|
|
827
842
|
declare const ThemeProvider: React__default.FC<ThemeProviderProps>;
|
|
828
843
|
declare const useTheme: () => ThemeContextType;
|
|
829
844
|
|
|
830
|
-
export { BLOOD_TYPES, BloodType, Button, COUNTRY_CODES, DoctorIcon, DropdownMultiSelect, Icon, ImageCropModal, Input, Logo, Modal, MultiSearchAutocomplete, PatientIcon, PaymentDueBanner, PhoneInput, ProfileImageUpload, RegionSelect, SearchAutocomplete, Select, SpecialtySearchAutocomplete, SupportedCountry, Tag, TagList, ThemeDebugger, ThemeProvider, ThemeToggle, UserIcon, cn, createEnvConfig, debounce, extractCountryCodeFromPhoneNumber, formatCurrency, formatDate, formatNumeric, formatPhoneNumberWithCountryCode, generateId, getDefaultCountryCode, getRegionOptions, getRegionsByCountry, isValidPhoneNumber, useDebounce, useDebouncedCallback, useSelectField, useTheme };
|
|
845
|
+
export { BLOOD_TYPES, BloodType, Button, COUNTRY_CODES, DoctorIcon, DropdownMultiSelect, Icon, ImageCropModal, Input, Logo, Modal, MultiSearchAutocomplete, PatientIcon, PaymentDueBanner, PhoneInput, ProfileImageUpload, RegionSelect, SearchAutocomplete, Select, SpecialtySearchAutocomplete, SupportedCountry, Tag, TagList, ThemeDebugger, ThemeProvider, ThemeToggle, UserIcon, cn, createEnvConfig, debounce, extractCountryCodeFromPhoneNumber, formatCurrency, formatDate, formatNumeric, formatPhoneNumberWithCountryCode, generateId, getDefaultCountryCode, getRegionOptions, getRegionsByCountry, isValidPhoneNumber, parseDateSafe, useDebounce, useDebouncedCallback, useSelectField, useTheme };
|
|
831
846
|
export type { AcceptedImageMimeType, ButtonProps, CountryCodeOption, CountryCodeSelectProps, DropdownMultiSelectProps, EnvConfig, EnvConfigOverrides, Environment, ErrorField, ErrorObject, FormatDateOptions, IconProps, ImageCropModalProps, InputProps, LogoProps, ModalProps, PaymentDueBannerProps, PhoneInputProps, ProfileImageUploadProps, RegionSelectProps, SearchableEntity, SelectOption, SelectProps, SimpleIconProps, Specialty, SpecialtySearchAutocompleteProps, TagListProps, TagProps, Theme, ThemeConfig, ThemeContextType, ThemeDebuggerProps, ThemeToggleProps, UseSelectFieldProps };
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,YAAY,EACV,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,YAAY,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAEjF,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CA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