nuxt-hs-ui 2.0.31 → 2.0.33

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/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.15.0"
6
6
  },
7
- "version": "2.0.31",
7
+ "version": "2.0.33",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -10,7 +10,7 @@
10
10
  import dayjs from "dayjs/esm/index";
11
11
  // flatpickr cdn 経由で使用する
12
12
  import flatpickr from "flatpickr";
13
- import monthSelectPlugin from "flatpickr/dist/plugins/monthSelect";
13
+ // import monthSelectPlugin from "flatpickr/dist/plugins/monthSelect";
14
14
  // [ vueuse ]
15
15
  import { useMounted } from "@vueuse/core";
16
16
  // [ NUXT ]
@@ -64,6 +64,7 @@ const hsMisc = useHsMisc();
64
64
  const isMounted = useMounted();
65
65
  // ----------------------------------------------------------------------------
66
66
  // flatpickr
67
+ // const MonthSelectPlugin: any = monthSelectPlugin;
67
68
  const timeDateFormat = "YYYY-MM-DD HH:mm:ss.SSS";
68
69
  const timeOutputDateFormat = "HH:mm:ss.SSS";
69
70
  const timeShowDateFormat = "HH:mm";
@@ -73,7 +74,8 @@ type Props = {
73
74
  // ----------------------------------------------------------------------------
74
75
  // Input 種類別
75
76
  textAlign?: "left" | "center" | "right";
76
- mode?: "all" | "date" | "time" | "month";
77
+ mode?: "all" | "date" | "time";
78
+ // mode?: "all" | "date" | "time" | "month";
77
79
  /** mode=time の場合、[HH:mm:ss.SSS] に固定 */
78
80
  dataFormat?: string;
79
81
  /** mode=time の場合、[HH:mm] に固定 */
@@ -352,22 +354,20 @@ const initFlatPickerOption = () => {
352
354
  state.option.noCalendar = true;
353
355
  }
354
356
  }
355
- if (props.mode === "month") {
356
- state.option.disableMobile = true;
357
- }
358
357
  if (props.disableMobile) {
359
358
  state.option.disableMobile = true;
360
359
  }
361
- if (props.mode === "month") {
362
- state.option.plugins = [
363
- new (monthSelectPlugin as any)({
364
- shorthand: true, // デフォルトはfalse
365
- dateFormat: "m.y", // デフォルトは"F Y"
366
- altFormat: "F Y", // デフォルトは"F Y"
367
- theme: "dark", // デフォルトは"light"
368
- }),
369
- ];
370
- }
360
+ // if (props.mode === "month") {
361
+ // state.option.disableMobile = true;
362
+ // state.option.plugins = [
363
+ // new MonthSelectPlugin({
364
+ // shorthand: true, // デフォルトはfalse
365
+ // dateFormat: "m.y", // デフォルトは"F Y"
366
+ // altFormat: "F Y", // デフォルトは"F Y"
367
+ // theme: "dark", // デフォルトは"light"
368
+ // }),
369
+ // ];
370
+ // }
371
371
  };
372
372
 
373
373
  const onOpen = () => {
@@ -505,10 +505,10 @@ const datePickerToday = () => {
505
505
  if (props.readonly === true) return;
506
506
  if (props.disabled === true) return;
507
507
  if (state.date !== null) return;
508
- let inputValue = dayjs();
509
- if (props.mode === "month") {
510
- inputValue = inputValue.startOf("month");
511
- }
508
+ const inputValue = dayjs();
509
+ // if (props.mode === "month") {
510
+ // inputValue = inputValue.startOf("month");
511
+ // }
512
512
  const d = getShiftDayjs(inputValue);
513
513
  if (checkDate(d.format("YYYY-MM-DD")) === false) {
514
514
  Toast.Warning(
@@ -845,7 +845,8 @@ const computedIsFocusOpenBtn = computed(() => {
845
845
  "
846
846
  @click.stop="datePickerToday()"
847
847
  >
848
- {{ props.mode === "month" ? "Now" : "Today" }}
848
+ <!-- {{ props.mode === "month" ? "Now" : "Today" }} -->
849
+ Today
849
850
  </span>
850
851
  </div>
851
852
  <template #right-icons>
@@ -40,6 +40,7 @@ type Props = {
40
40
  classRow?: ClassType;
41
41
  classImg?: ClassType;
42
42
  classImgTag?: ClassType;
43
+ nullable?: boolean;
43
44
  // ----------------------------------------------------------------------------
44
45
  data: number | null;
45
46
  diff?: number | null | undefined;
@@ -202,7 +203,7 @@ const displayList = computed<SelectItemShow[]>(() => {
202
203
  unKnownData: unKnownData.value,
203
204
  unKnownSelected: unKnownSelected.value,
204
205
  isShowHidden: isShowHidden.value,
205
- require: props.require,
206
+ require: props.require || !props.nullable,
206
207
  nullText: props.nullText,
207
208
  }).map((row) => {
208
209
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-hs-ui",
3
- "version": "2.0.31",
3
+ "version": "2.0.33",
4
4
  "description": "My new Nuxt module",
5
5
  "repository": "https://github.com/hare-systems-ryo/nuxt-hs-ui",
6
6
  "license": "MIT",