@v-c/picker 1.1.0-rc.1 → 1.1.0-rc.3

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.
@@ -1,12 +1,19 @@
1
- import { ComputedRef, Ref } from 'vue';
1
+ import { ComputedRef, Ref, ShallowRef } from 'vue';
2
2
  import { GenerateConfig } from '../../generate';
3
3
  import { BaseInfo, FormatType, Locale } from '../../interface';
4
4
  type TriggerCalendarChange<ValueType extends object[]> = (calendarValues: ValueType) => void;
5
+ type UseInnerValueReturn<ValueType extends object[]> = readonly [
6
+ ShallowRef<ValueType>,
7
+ (val: ValueType) => void,
8
+ Ref<ValueType>,
9
+ TriggerCalendarChange<ValueType>,
10
+ () => void
11
+ ];
5
12
  /**
6
13
  * Control the internal `value` align with prop `value` and provide a temp `calendarValue` for ui.
7
14
  * `calendarValue` will be reset when blur & focus & open.
8
15
  */
9
- export declare function useInnerValue<ValueType extends DateType[], DateType extends object = any>(generateConfig: Ref<GenerateConfig<DateType>>, locale: Ref<Locale>, formatList: Ref<FormatType[]>, rangeValue: Ref<boolean | undefined>, order: Ref<boolean | undefined>, defaultValue: Ref<ValueType | undefined>, value: Ref<ValueType | undefined>, onCalendarChange?: (dates: ValueType, dateStrings: [string, string], info: BaseInfo) => void, onOk?: (dates: ValueType) => void): any;
16
+ export declare function useInnerValue<ValueType extends DateType[], DateType extends object = any>(generateConfig: Ref<GenerateConfig<DateType>>, locale: Ref<Locale>, formatList: Ref<FormatType[]>, rangeValue: Ref<boolean | undefined>, order: Ref<boolean | undefined>, defaultValue: Ref<ValueType | undefined>, value: Ref<ValueType | undefined>, onCalendarChange?: (dates: ValueType, dateStrings: [string, string], info: BaseInfo) => void, onOk?: (dates: ValueType) => void): UseInnerValueReturn<ValueType>;
10
17
  export default function useRangeValue<ValueType extends DateType[], DateType extends object = any>(info: ComputedRef<{
11
18
  generateConfig: GenerateConfig<DateType>;
12
19
  locale: Locale;
@@ -6,7 +6,7 @@ function getLocale(locale) {
6
6
  return tmpLocales[locale] || tmpLocales[locale.replace(/_/g, "")] || tmpLocales[locale.replace(/_.*$/g, "")];
7
7
  }
8
8
  function localeParse(format) {
9
- return format.replace(/Y/g, "y").replace(/D/g, "d").replace(/gggg/, "yyyy").replace(/g/g, "G").replace(/([Ww])o/g, "wo");
9
+ return format.replace(/Y/g, "y").replace(/D/g, "d").replace(/gggg/, "yyyy").replace(/g/g, "G").replace(/([Ww])o/g, "wo").replace(/A/g, "a");
10
10
  }
11
11
  function parse$1(text, format, locale) {
12
12
  return parse(text, localeParse(format), /* @__PURE__ */ new Date(), { locale: getLocale(locale) });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@v-c/picker",
3
3
  "type": "module",
4
- "version": "1.1.0-rc.1",
4
+ "version": "1.1.0-rc.3",
5
5
  "description": "picker ui component for vue",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -72,10 +72,10 @@
72
72
  }
73
73
  },
74
74
  "dependencies": {
75
- "@v-c/overflow": "^1.0.5",
76
- "@v-c/util": "^1.0.19",
75
+ "@v-c/overflow": "^1.1.0-rc.1",
77
76
  "@v-c/resize-observer": "^1.0.8",
78
- "@v-c/trigger": "^1.0.14"
77
+ "@v-c/trigger": "^1.0.14",
78
+ "@v-c/util": "^1.0.19"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@types/luxon": "^3.7.1"