@selfeesas/shared-components 1.1.1 → 1.2.1

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.
@@ -125,8 +125,8 @@ declare const __VLS_component_5: DefineComponent<ExtractPropTypes<__VLS_WithDefa
125
125
  flat: boolean;
126
126
  dense: boolean;
127
127
  rounded: boolean;
128
- bordered: boolean;
129
128
  title: string;
129
+ bordered: boolean;
130
130
  subtitle: string;
131
131
  showHeader: boolean;
132
132
  colorScheme: "primary" | "secondary" | "accent" | "info" | "warning" | "error" | "success" | "neutral";
@@ -926,13 +926,13 @@ export declare const DatePicker: DefineComponent<ExtractPropTypes<__VLS_WithDefa
926
926
  label: string;
927
927
  outlined: boolean;
928
928
  rules: ((val: string) => boolean | string)[];
929
+ placeholder: string;
929
930
  date: string;
930
931
  minDate: string;
931
932
  maxDate: string;
932
933
  datesDisabled: DisabledDate[];
933
934
  requiredErrorMessage: string;
934
935
  invalidDateErrorMessage: string;
935
- placeholder: string;
936
936
  closeLabel: string;
937
937
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
938
938
 
@@ -952,6 +952,35 @@ export declare interface DatePickerProps {
952
952
  rules?: ((val: string) => boolean | string)[];
953
953
  }
954
954
 
955
+ export declare interface DatePreset {
956
+ id: string;
957
+ label: string;
958
+ getRange: (currentDate: Date) => {
959
+ from: string;
960
+ to: string;
961
+ };
962
+ }
963
+
964
+ export declare const datePresets: {
965
+ currentMonth: (now?: Date) => {
966
+ from: string;
967
+ to: string;
968
+ };
969
+ previousMonth: (now?: Date) => {
970
+ from: string;
971
+ to: string;
972
+ };
973
+ last3Months: typeof getLastThreeFullMonths;
974
+ currentYear: (now?: Date) => {
975
+ from: string;
976
+ to: string;
977
+ };
978
+ previousYear: (now?: Date) => {
979
+ from: string;
980
+ to: string;
981
+ };
982
+ };
983
+
955
984
  export declare const DateRange: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_7<__VLS_TypePropsToOption_11<DateRangeProps>, {
956
985
  from: string;
957
986
  to: string;
@@ -973,8 +1002,12 @@ export declare const DateRange: DefineComponent<ExtractPropTypes<__VLS_WithDefau
973
1002
  idCy: string;
974
1003
  hideActions: boolean;
975
1004
  allowSameDate: boolean;
1005
+ hideShortcuts: boolean;
1006
+ shortcuts: () => {
1007
+ id: string;
1008
+ label: string;
1009
+ }[];
976
1010
  }>>, {
977
- resetDate: () => void;
978
1011
  setDateRange: (dateRange: {
979
1012
  from: string;
980
1013
  to: string;
@@ -983,6 +1016,7 @@ export declare const DateRange: DefineComponent<ExtractPropTypes<__VLS_WithDefau
983
1016
  from: string;
984
1017
  to: string;
985
1018
  };
1019
+ resetDate: () => void;
986
1020
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
987
1021
  "update:dateRange": (value: {
988
1022
  from: string;
@@ -1010,6 +1044,11 @@ export declare const DateRange: DefineComponent<ExtractPropTypes<__VLS_WithDefau
1010
1044
  idCy: string;
1011
1045
  hideActions: boolean;
1012
1046
  allowSameDate: boolean;
1047
+ hideShortcuts: boolean;
1048
+ shortcuts: () => {
1049
+ id: string;
1050
+ label: string;
1051
+ }[];
1013
1052
  }>>> & Readonly<{
1014
1053
  onClear?: (() => any) | undefined;
1015
1054
  "onUpdate:dateRange"?: ((value: {
@@ -1037,6 +1076,11 @@ export declare const DateRange: DefineComponent<ExtractPropTypes<__VLS_WithDefau
1037
1076
  highlightEvents: string[];
1038
1077
  idCy: string;
1039
1078
  hideActions: boolean;
1079
+ hideShortcuts: boolean;
1080
+ shortcuts: Array<{
1081
+ id: "currentMonth" | "previousMonth" | "last3Months" | "currentYear" | "previousYear";
1082
+ label: string;
1083
+ }>;
1040
1084
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1041
1085
 
1042
1086
  export declare interface DateRangeLocale {
@@ -1072,6 +1116,11 @@ export declare interface DateRangeProps {
1072
1116
  isIconCalendar?: boolean;
1073
1117
  resetPosition?: 'bottom' | 'side';
1074
1118
  hideActions?: boolean;
1119
+ hideShortcuts?: boolean;
1120
+ shortcuts?: Array<{
1121
+ id: 'currentMonth' | 'previousMonth' | 'last3Months' | 'currentYear' | 'previousYear';
1122
+ label: string;
1123
+ }>;
1075
1124
  }
1076
1125
 
1077
1126
  export declare interface DateRangeType {
@@ -1167,6 +1216,17 @@ export declare interface ExportButtonProps<T = any> {
1167
1216
 
1168
1217
  export declare function formatDate(dateStr: string): string;
1169
1218
 
1219
+ export declare function formatDateToDDMMYYYY(date: Date): string;
1220
+
1221
+ export declare function getFirstDayOfMonth(year: number, month: number): Date;
1222
+
1223
+ export declare function getLastDayOfMonth(year: number, month: number): Date;
1224
+
1225
+ export declare function getLastThreeFullMonths(currentDate?: Date): {
1226
+ from: string;
1227
+ to: string;
1228
+ };
1229
+
1170
1230
  export declare function isDateSelectable(date: DateInput, minDateProps?: DateInput | null, maxDateProps?: DateInput | null, datesDisabled?: DisabledDate[]): boolean;
1171
1231
 
1172
1232
  export declare const Layout: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
@@ -1236,6 +1296,8 @@ export declare interface Pagination {
1236
1296
  rowsPerPageOptions?: number[];
1237
1297
  }
1238
1298
 
1299
+ export declare function parseDate(dateStr: string): Date;
1300
+
1239
1301
  export declare interface Particle {
1240
1302
  size: number;
1241
1303
  x: number;