@jigowatts/jigowatts-ui 1.1.9 → 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.
- package/dist/assets/index13.css +1 -1
- package/dist/components/Card/index.cjs.js +1 -1
- package/dist/components/Card/index.cjs.js.map +1 -1
- package/dist/components/Card/index.es.js +10 -10
- package/dist/components/Card/index.es.js.map +1 -1
- package/dist/components/DataTable/index.cjs.js +1 -1
- package/dist/components/DataTable/index.es.js +43 -43
- package/dist/components/DatePickerController/index.cjs.js +1 -1
- package/dist/components/DatePickerController/index.cjs.js.map +1 -1
- package/dist/components/DatePickerController/index.d.ts +1 -1
- package/dist/components/DatePickerController/index.es.js +29 -27
- package/dist/components/DatePickerController/index.es.js.map +1 -1
- package/dist/components/DatePickerController/index.test.cjs.js +1 -1
- package/dist/components/DatePickerController/index.test.cjs.js.map +1 -1
- package/dist/components/DatePickerController/index.test.es.js +27 -14
- package/dist/components/DatePickerController/index.test.es.js.map +1 -1
- package/dist/components/InputController/index.cjs.js +1 -1
- package/dist/components/InputController/index.cjs.js.map +1 -1
- package/dist/components/InputController/index.es.js +4 -4
- package/dist/components/InputController/index.es.js.map +1 -1
- package/dist/components/Map/index.cjs.js +2 -2
- package/dist/components/Map/index.cjs.js.map +1 -1
- package/dist/components/Map/index.d.ts +1 -1
- package/dist/components/Map/index.es.js +1 -0
- package/dist/components/Map/index.es.js.map +1 -1
- package/dist/components/NumericFieldController/index.cjs.js +1 -1
- package/dist/components/NumericFieldController/index.cjs.js.map +1 -1
- package/dist/components/NumericFieldController/index.es.js +14 -14
- package/dist/components/NumericFieldController/index.es.js.map +1 -1
- package/dist/components/OfflineLabel/index.cjs.js +1 -1
- package/dist/components/OfflineLabel/index.cjs.js.map +1 -1
- package/dist/components/OfflineLabel/index.es.js +4 -4
- package/dist/components/OfflineLabel/index.es.js.map +1 -1
- package/dist/components/PasswordInputController/index.cjs.js +1 -1
- package/dist/components/PasswordInputController/index.cjs.js.map +1 -1
- package/dist/components/PasswordInputController/index.es.js +7 -8
- package/dist/components/PasswordInputController/index.es.js.map +1 -1
- package/dist/components/RangeDatePickerController/index.cjs.js +1 -1
- package/dist/components/RangeDatePickerController/index.cjs.js.map +1 -1
- package/dist/components/RangeDatePickerController/index.d.ts +3 -3
- package/dist/components/RangeDatePickerController/index.es.js +67 -65
- package/dist/components/RangeDatePickerController/index.es.js.map +1 -1
- package/dist/components/RangeDatePickerController/index.test.cjs.js +1 -1
- package/dist/components/RangeDatePickerController/index.test.cjs.js.map +1 -1
- package/dist/components/RangeDatePickerController/index.test.es.js +36 -13
- package/dist/components/RangeDatePickerController/index.test.es.js.map +1 -1
- package/dist/components/ReportChartMulti/index.cjs.js +1 -1
- package/dist/components/ReportChartMulti/index.cjs.js.map +1 -1
- package/dist/components/ReportChartMulti/index.d.ts +1 -1
- package/dist/components/ReportChartMulti/index.es.js +2 -1
- package/dist/components/ReportChartMulti/index.es.js.map +1 -1
- package/dist/components/SearchForm/index.cjs.js +1 -1
- package/dist/components/SearchForm/index.cjs.js.map +1 -1
- package/dist/components/SearchForm/index.es.js +17 -18
- package/dist/components/SearchForm/index.es.js.map +1 -1
- package/dist/components/SelectBoxController/index.cjs.js +1 -1
- package/dist/components/SelectBoxController/index.cjs.js.map +1 -1
- package/dist/components/SelectBoxController/index.es.js +14 -14
- package/dist/components/SelectBoxController/index.es.js.map +1 -1
- package/dist/components/SideMenu/index.cjs.js +1 -1
- package/dist/components/SideMenu/index.cjs.js.map +1 -1
- package/dist/components/SideMenu/index.d.ts +2 -2
- package/dist/components/SideMenu/index.es.js +2 -1
- package/dist/components/SideMenu/index.es.js.map +1 -1
- package/dist/components/SubMenu/index.cjs.js +1 -1
- package/dist/components/SubMenu/index.cjs.js.map +1 -1
- package/dist/components/SubMenu/index.d.ts +1 -1
- package/dist/components/SubMenu/index.es.js +42 -39
- package/dist/components/SubMenu/index.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +94 -98
- package/dist/index.es.js.map +1 -1
- package/package.json +98 -98
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),v=require("react"),C=require("@mui/icons-material
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),v=require("react"),C=require("@mui/icons-material"),m=require("@mui/material"),h=require("react-hook-form"),x=require("react-number-format"),F=v.forwardRef(function(a,s){const{valueType:u,defaultValue:p,onChange:o,allowLeadingZeros:i,...l}=a;return n.jsx(x.NumericFormat,{...l,getInputRef:s,allowLeadingZeros:u==="STRING"||i,onValueChange:(e,t)=>{if(!o||!t.event)return;let r;switch(u){case"STRING":r=e.value;break;case"FORMATTED_STRING":r=e.formattedValue;break;default:r=e.floatValue??void 0}const c={...t.event,target:{...t.event.target,name:a.name,value:r}};o(c)}})}),g=d=>{const{inputProps:a,config:s,defaultValue:u,emptyValue:p,...o}=d,{textFieldProps:i}=a??{},l=e=>e==null||e==="";return n.jsx(h.Controller,{control:o.control,defaultValue:u,name:o.name,render:({field:e,fieldState:t})=>{var r;return n.jsx(m.TextField,{...i,name:e.name,value:l(e.value)?"":e.value,onChange:c=>{e.onChange(c)},error:!!t.error,helperText:(r=t.error)==null?void 0:r.message,onBlur:e.onBlur,InputProps:{inputComponent:F,endAdornment:l(e.value)?void 0:n.jsx(m.InputAdornment,{position:"end",children:n.jsx(m.IconButton,{onClick:()=>{e.onChange(p)},edge:"end",children:n.jsx(C.Clear,{})})}),inputProps:{...s}}})}})};exports.NumericFieldController=g;exports.default=g;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../../src/components/NumericFieldController/index.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { forwardRef } from \"react\";\nimport
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../src/components/NumericFieldController/index.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { forwardRef } from \"react\";\nimport { Clear } from \"@mui/icons-material\";\nimport {\n IconButton,\n InputAdornment,\n InputBaseComponentProps,\n TextField,\n TextFieldProps,\n} from \"@mui/material\";\nimport {\n Controller,\n FieldPath,\n FieldValues,\n PathValue,\n UseControllerProps,\n} from \"react-hook-form\";\nimport { NumericFormat } from \"react-number-format\";\n\ntype MuiNumericFieldConfig = {\n displayErrorMessage?: boolean;\n /**\n *\n * @exmaple\n * - FLOAT: `1000`\n * - STRING: `'1000'`\n * - FORMATTED_STRING: `'1,000'`\n * @defaultValue `'FLOAT'`\n */\n valueType?: \"FLOAT\" | \"STRING\" | \"FORMATTED_STRING\";\n thousandSeparator?: boolean | string;\n decimalSeparator?: string;\n allowedDecimalSeparators?: Array<string>;\n thousandsGroupStyle?: \"thousand\" | \"lakh\" | \"wan\" | \"none\";\n decimalScale?: number;\n fixedDecimalScale?: boolean;\n allowNegative?: boolean;\n allowLeadingZeros?: boolean;\n suffix?: string;\n prefix?: string;\n};\n\ntype MuiNumericFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = UseControllerProps<TFieldValues, TName> & {\n /** Additional settings */\n config?: MuiNumericFieldConfig;\n /** Settings for MUI elements */\n inputProps?: {\n /**\n * Settings for TextField inside MuiTextField\n *\n * API: {@link https://mui.com/material-ui/api/text-field/}\n */\n textFieldProps?: TextFieldProps;\n };\n defaultValue: PathValue<FieldValues, FieldPath<FieldValues>>;\n emptyValue?: 0 | \"\" | null | undefined;\n};\n\n/**\n * 数値入力の表示フォーマット\n */\nconst NumberFormatCustom = forwardRef<\n HTMLInputElement,\n InputBaseComponentProps & MuiNumericFieldConfig\n>(function NumberFormatBase(props, ref) {\n // 不要なプロパティを除くためdestructureする\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { valueType, defaultValue, onChange, allowLeadingZeros, ...others } =\n props;\n\n return (\n <NumericFormat\n {...others}\n getInputRef={ref}\n allowLeadingZeros={valueType === \"STRING\" || allowLeadingZeros}\n onValueChange={(values, sourceInfo) => {\n if (!onChange || !sourceInfo.event) return;\n let value: string | number | undefined | null;\n switch (valueType) {\n case \"STRING\":\n value = values.value;\n break;\n case \"FORMATTED_STRING\":\n value = values.formattedValue;\n break;\n default:\n value = values.floatValue ?? undefined;\n }\n const event = {\n ...(sourceInfo.event as React.SyntheticEvent<HTMLInputElement>),\n target: {\n ...sourceInfo.event.target,\n name: props.name,\n value,\n },\n };\n onChange(event);\n }}\n />\n );\n});\n\n/**\n * React hook formとreact-number-formatで管理される数値入力コンポーネントです。\n * @typeParam TFieldValues - Type of the form.\n * @typeParam TName - Field name.\n * @example\n * ```\n *\n * <MuiNumericField<FormData, \"assets\">\n * name=\"assets\"\n * control={control}\n * defaultValue={undefined}\n * muiProps={{\n * textFieldProps: {\n * label: 'Assets',\n * fullWidth: true\n * }\n * }}\n * />\n * ```\n */\nexport const NumericFieldController: <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>(\n props: MuiNumericFieldProps<TFieldValues, TName>,\n) => JSX.Element = (props) => {\n const {\n inputProps: muiProps,\n config,\n defaultValue,\n emptyValue,\n ...others\n } = props;\n const { textFieldProps } = muiProps ?? {};\n\n const isEmptyValue = (value: string | number | undefined | null) => {\n return value === null || value === undefined || value === \"\";\n };\n return (\n <Controller\n control={others.control}\n defaultValue={defaultValue}\n name={others.name}\n render={({ field, fieldState }) => (\n <TextField\n {...textFieldProps}\n name={field.name}\n value={isEmptyValue(field.value) ? \"\" : field.value}\n onChange={(e) => {\n field.onChange(e);\n }}\n error={!!fieldState.error}\n helperText={fieldState.error?.message}\n onBlur={field.onBlur}\n InputProps={{\n inputComponent: NumberFormatCustom,\n endAdornment: !isEmptyValue(field.value) ? (\n <InputAdornment position=\"end\">\n <IconButton\n onClick={() => {\n field.onChange(emptyValue);\n }}\n edge=\"end\"\n >\n <Clear />\n </IconButton>\n </InputAdornment>\n ) : undefined,\n inputProps: {\n ...config,\n },\n }}\n />\n )}\n />\n );\n};\n\nexport default NumericFieldController;\n"],"names":["NumberFormatCustom","forwardRef","props","ref","valueType","defaultValue","onChange","allowLeadingZeros","others","jsx","NumericFormat","values","sourceInfo","value","event","NumericFieldController","muiProps","config","emptyValue","textFieldProps","isEmptyValue","Controller","field","fieldState","TextField","e","_a","InputAdornment","IconButton","Clear"],"mappings":"8RAgEMA,EAAqBC,EAAAA,WAGzB,SAA0BC,EAAOC,EAAK,CAGtC,KAAM,CAAE,UAAAC,EAAW,aAAAC,EAAc,SAAAC,EAAU,kBAAAC,EAAmB,GAAGC,GAC/DN,EAGA,OAAAO,EAAA,IAACC,EAAA,cAAA,CACE,GAAGF,EACJ,YAAaL,EACb,kBAAmBC,IAAc,UAAYG,EAC7C,cAAe,CAACI,EAAQC,IAAe,CACrC,GAAI,CAACN,GAAY,CAACM,EAAW,MAAO,OAChC,IAAAC,EACJ,OAAQT,EAAW,CACjB,IAAK,SACHS,EAAQF,EAAO,MACf,MACF,IAAK,mBACHE,EAAQF,EAAO,eACf,MACF,QACEE,EAAQF,EAAO,YAAc,MAAA,CAEjC,MAAMG,EAAQ,CACZ,GAAIF,EAAW,MACf,OAAQ,CACN,GAAGA,EAAW,MAAM,OACpB,KAAMV,EAAM,KACZ,MAAAW,CAAA,CAEJ,EACAP,EAASQ,CAAK,CAAA,CAChB,CACF,CAEJ,CAAC,EAsBYC,EAKOb,GAAU,CACtB,KAAA,CACJ,WAAYc,EACZ,OAAAC,EACA,aAAAZ,EACA,WAAAa,EACA,GAAGV,CAAA,EACDN,EACE,CAAE,eAAAiB,GAAmBH,GAAY,CAAC,EAElCI,EAAgBP,GACbA,GAAU,MAA+BA,IAAU,GAG1D,OAAAJ,EAAA,IAACY,EAAA,WAAA,CACC,QAASb,EAAO,QAChB,aAAAH,EACA,KAAMG,EAAO,KACb,OAAQ,CAAC,CAAE,MAAAc,EAAO,WAAAC,CAChB,IAAA,OAAAd,OAAAA,EAAA,IAACe,EAAA,UAAA,CACE,GAAGL,EACJ,KAAMG,EAAM,KACZ,MAAOF,EAAaE,EAAM,KAAK,EAAI,GAAKA,EAAM,MAC9C,SAAWG,GAAM,CACfH,EAAM,SAASG,CAAC,CAClB,EACA,MAAO,CAAC,CAACF,EAAW,MACpB,YAAYG,EAAAH,EAAW,QAAX,YAAAG,EAAkB,QAC9B,OAAQJ,EAAM,OACd,WAAY,CACV,eAAgBtB,EAChB,aAAeoB,EAAaE,EAAM,KAAK,EAWnC,OAVFb,MAACkB,EAAAA,eAAe,CAAA,SAAS,MACvB,SAAAlB,EAAA,IAACmB,EAAA,WAAA,CACC,QAAS,IAAM,CACbN,EAAM,SAASJ,CAAU,CAC3B,EACA,KAAK,MAEL,eAACW,EAAAA,MAAM,CAAA,CAAA,CAAA,GAEX,EAEF,WAAY,CACV,GAAGZ,CAAA,CACL,CACF,CAAA,EACF,CAEJ,CAEJ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as d } from "react";
|
|
3
|
-
import g from "@mui/icons-material
|
|
3
|
+
import { Clear as g } from "@mui/icons-material";
|
|
4
4
|
import { TextField as h, InputAdornment as C, IconButton as v } from "@mui/material";
|
|
5
5
|
import { Controller as f } from "react-hook-form";
|
|
6
6
|
import { NumericFormat as T } from "react-number-format";
|
|
@@ -12,25 +12,25 @@ const F = d(function(a, l) {
|
|
|
12
12
|
...u,
|
|
13
13
|
getInputRef: l,
|
|
14
14
|
allowLeadingZeros: m === "STRING" || i,
|
|
15
|
-
onValueChange: (e,
|
|
16
|
-
if (!t || !
|
|
17
|
-
let
|
|
15
|
+
onValueChange: (e, o) => {
|
|
16
|
+
if (!t || !o.event) return;
|
|
17
|
+
let r;
|
|
18
18
|
switch (m) {
|
|
19
19
|
case "STRING":
|
|
20
|
-
|
|
20
|
+
r = e.value;
|
|
21
21
|
break;
|
|
22
22
|
case "FORMATTED_STRING":
|
|
23
|
-
|
|
23
|
+
r = e.formattedValue;
|
|
24
24
|
break;
|
|
25
25
|
default:
|
|
26
|
-
|
|
26
|
+
r = e.floatValue ?? void 0;
|
|
27
27
|
}
|
|
28
28
|
const p = {
|
|
29
|
-
...
|
|
29
|
+
...o.event,
|
|
30
30
|
target: {
|
|
31
|
-
...
|
|
31
|
+
...o.event.target,
|
|
32
32
|
name: a.name,
|
|
33
|
-
value:
|
|
33
|
+
value: r
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
t(p);
|
|
@@ -51,8 +51,8 @@ const F = d(function(a, l) {
|
|
|
51
51
|
control: t.control,
|
|
52
52
|
defaultValue: m,
|
|
53
53
|
name: t.name,
|
|
54
|
-
render: ({ field: e, fieldState:
|
|
55
|
-
var
|
|
54
|
+
render: ({ field: e, fieldState: o }) => {
|
|
55
|
+
var r;
|
|
56
56
|
return /* @__PURE__ */ n(
|
|
57
57
|
h,
|
|
58
58
|
{
|
|
@@ -62,8 +62,8 @@ const F = d(function(a, l) {
|
|
|
62
62
|
onChange: (p) => {
|
|
63
63
|
e.onChange(p);
|
|
64
64
|
},
|
|
65
|
-
error: !!
|
|
66
|
-
helperText: (
|
|
65
|
+
error: !!o.error,
|
|
66
|
+
helperText: (r = o.error) == null ? void 0 : r.message,
|
|
67
67
|
onBlur: e.onBlur,
|
|
68
68
|
InputProps: {
|
|
69
69
|
inputComponent: F,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../src/components/NumericFieldController/index.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { forwardRef } from \"react\";\nimport
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../src/components/NumericFieldController/index.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { forwardRef } from \"react\";\nimport { Clear } from \"@mui/icons-material\";\nimport {\n IconButton,\n InputAdornment,\n InputBaseComponentProps,\n TextField,\n TextFieldProps,\n} from \"@mui/material\";\nimport {\n Controller,\n FieldPath,\n FieldValues,\n PathValue,\n UseControllerProps,\n} from \"react-hook-form\";\nimport { NumericFormat } from \"react-number-format\";\n\ntype MuiNumericFieldConfig = {\n displayErrorMessage?: boolean;\n /**\n *\n * @exmaple\n * - FLOAT: `1000`\n * - STRING: `'1000'`\n * - FORMATTED_STRING: `'1,000'`\n * @defaultValue `'FLOAT'`\n */\n valueType?: \"FLOAT\" | \"STRING\" | \"FORMATTED_STRING\";\n thousandSeparator?: boolean | string;\n decimalSeparator?: string;\n allowedDecimalSeparators?: Array<string>;\n thousandsGroupStyle?: \"thousand\" | \"lakh\" | \"wan\" | \"none\";\n decimalScale?: number;\n fixedDecimalScale?: boolean;\n allowNegative?: boolean;\n allowLeadingZeros?: boolean;\n suffix?: string;\n prefix?: string;\n};\n\ntype MuiNumericFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = UseControllerProps<TFieldValues, TName> & {\n /** Additional settings */\n config?: MuiNumericFieldConfig;\n /** Settings for MUI elements */\n inputProps?: {\n /**\n * Settings for TextField inside MuiTextField\n *\n * API: {@link https://mui.com/material-ui/api/text-field/}\n */\n textFieldProps?: TextFieldProps;\n };\n defaultValue: PathValue<FieldValues, FieldPath<FieldValues>>;\n emptyValue?: 0 | \"\" | null | undefined;\n};\n\n/**\n * 数値入力の表示フォーマット\n */\nconst NumberFormatCustom = forwardRef<\n HTMLInputElement,\n InputBaseComponentProps & MuiNumericFieldConfig\n>(function NumberFormatBase(props, ref) {\n // 不要なプロパティを除くためdestructureする\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { valueType, defaultValue, onChange, allowLeadingZeros, ...others } =\n props;\n\n return (\n <NumericFormat\n {...others}\n getInputRef={ref}\n allowLeadingZeros={valueType === \"STRING\" || allowLeadingZeros}\n onValueChange={(values, sourceInfo) => {\n if (!onChange || !sourceInfo.event) return;\n let value: string | number | undefined | null;\n switch (valueType) {\n case \"STRING\":\n value = values.value;\n break;\n case \"FORMATTED_STRING\":\n value = values.formattedValue;\n break;\n default:\n value = values.floatValue ?? undefined;\n }\n const event = {\n ...(sourceInfo.event as React.SyntheticEvent<HTMLInputElement>),\n target: {\n ...sourceInfo.event.target,\n name: props.name,\n value,\n },\n };\n onChange(event);\n }}\n />\n );\n});\n\n/**\n * React hook formとreact-number-formatで管理される数値入力コンポーネントです。\n * @typeParam TFieldValues - Type of the form.\n * @typeParam TName - Field name.\n * @example\n * ```\n *\n * <MuiNumericField<FormData, \"assets\">\n * name=\"assets\"\n * control={control}\n * defaultValue={undefined}\n * muiProps={{\n * textFieldProps: {\n * label: 'Assets',\n * fullWidth: true\n * }\n * }}\n * />\n * ```\n */\nexport const NumericFieldController: <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>(\n props: MuiNumericFieldProps<TFieldValues, TName>,\n) => JSX.Element = (props) => {\n const {\n inputProps: muiProps,\n config,\n defaultValue,\n emptyValue,\n ...others\n } = props;\n const { textFieldProps } = muiProps ?? {};\n\n const isEmptyValue = (value: string | number | undefined | null) => {\n return value === null || value === undefined || value === \"\";\n };\n return (\n <Controller\n control={others.control}\n defaultValue={defaultValue}\n name={others.name}\n render={({ field, fieldState }) => (\n <TextField\n {...textFieldProps}\n name={field.name}\n value={isEmptyValue(field.value) ? \"\" : field.value}\n onChange={(e) => {\n field.onChange(e);\n }}\n error={!!fieldState.error}\n helperText={fieldState.error?.message}\n onBlur={field.onBlur}\n InputProps={{\n inputComponent: NumberFormatCustom,\n endAdornment: !isEmptyValue(field.value) ? (\n <InputAdornment position=\"end\">\n <IconButton\n onClick={() => {\n field.onChange(emptyValue);\n }}\n edge=\"end\"\n >\n <Clear />\n </IconButton>\n </InputAdornment>\n ) : undefined,\n inputProps: {\n ...config,\n },\n }}\n />\n )}\n />\n );\n};\n\nexport default NumericFieldController;\n"],"names":["NumberFormatCustom","forwardRef","props","ref","valueType","defaultValue","onChange","allowLeadingZeros","others","jsx","NumericFormat","values","sourceInfo","value","event","NumericFieldController","muiProps","config","emptyValue","textFieldProps","isEmptyValue","Controller","field","fieldState","TextField","e","_a","InputAdornment","IconButton","Clear"],"mappings":";;;;;;AAgEA,MAAMA,IAAqBC,EAGzB,SAA0BC,GAAOC,GAAK;AAGtC,QAAM,EAAE,WAAAC,GAAW,cAAAC,GAAc,UAAAC,GAAU,mBAAAC,GAAmB,GAAGC,MAC/DN;AAGA,SAAA,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACE,GAAGF;AAAA,MACJ,aAAaL;AAAA,MACb,mBAAmBC,MAAc,YAAYG;AAAA,MAC7C,eAAe,CAACI,GAAQC,MAAe;AACrC,YAAI,CAACN,KAAY,CAACM,EAAW,MAAO;AAChC,YAAAC;AACJ,gBAAQT,GAAW;AAAA,UACjB,KAAK;AACH,YAAAS,IAAQF,EAAO;AACf;AAAA,UACF,KAAK;AACH,YAAAE,IAAQF,EAAO;AACf;AAAA,UACF;AACE,YAAAE,IAAQF,EAAO,cAAc;AAAA,QAAA;AAEjC,cAAMG,IAAQ;AAAA,UACZ,GAAIF,EAAW;AAAA,UACf,QAAQ;AAAA,YACN,GAAGA,EAAW,MAAM;AAAA,YACpB,MAAMV,EAAM;AAAA,YACZ,OAAAW;AAAA,UAAA;AAAA,QAEJ;AACA,QAAAP,EAASQ,CAAK;AAAA,MAAA;AAAA,IAChB;AAAA,EACF;AAEJ,CAAC,GAsBYC,IAKM,CAACb,MAAU;AACtB,QAAA;AAAA,IACJ,YAAYc;AAAA,IACZ,QAAAC;AAAA,IACA,cAAAZ;AAAA,IACA,YAAAa;AAAA,IACA,GAAGV;AAAA,EAAA,IACDN,GACE,EAAE,gBAAAiB,MAAmBH,KAAY,CAAC,GAElCI,IAAe,CAACP,MACbA,KAAU,QAA+BA,MAAU;AAG1D,SAAA,gBAAAJ;AAAA,IAACY;AAAA,IAAA;AAAA,MACC,SAASb,EAAO;AAAA,MAChB,cAAAH;AAAA,MACA,MAAMG,EAAO;AAAA,MACb,QAAQ,CAAC,EAAE,OAAAc,GAAO,YAAAC,EAChB,MAAA;;AAAA,+BAAAd;AAAA,UAACe;AAAA,UAAA;AAAA,YACE,GAAGL;AAAA,YACJ,MAAMG,EAAM;AAAA,YACZ,OAAOF,EAAaE,EAAM,KAAK,IAAI,KAAKA,EAAM;AAAA,YAC9C,UAAU,CAACG,MAAM;AACf,cAAAH,EAAM,SAASG,CAAC;AAAA,YAClB;AAAA,YACA,OAAO,CAAC,CAACF,EAAW;AAAA,YACpB,aAAYG,IAAAH,EAAW,UAAX,gBAAAG,EAAkB;AAAA,YAC9B,QAAQJ,EAAM;AAAA,YACd,YAAY;AAAA,cACV,gBAAgBtB;AAAA,cAChB,cAAeoB,EAAaE,EAAM,KAAK,IAWnC,SAVF,gBAAAb,EAACkB,GAAe,EAAA,UAAS,OACvB,UAAA,gBAAAlB;AAAA,gBAACmB;AAAA,gBAAA;AAAA,kBACC,SAAS,MAAM;AACb,oBAAAN,EAAM,SAASJ,CAAU;AAAA,kBAC3B;AAAA,kBACA,MAAK;AAAA,kBAEL,4BAACW,GAAM,CAAA,CAAA;AAAA,gBAAA;AAAA,iBAEX;AAAA,cAEF,YAAY;AAAA,gBACV,GAAGZ;AAAA,cAAA;AAAA,YACL;AAAA,UACF;AAAA,QAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('../../assets/index26.css');const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('../../assets/index26.css');const e=require("react/jsx-runtime"),n=require("@mui/icons-material"),i=require("classnames"),o="_offlineLabel_2osy9_1",a={offlineLabel:o},l=s=>{const{fontSize:t="xx-small"}=s;return e.jsxs("div",{className:i(a.offlineLabel),style:{fontSize:t},children:[e.jsx(n.SignalWifiStatusbarConnectedNoInternet4,{fontSize:"small"}),"オフライン"]})};exports.OfflineLabel=l;exports.default=l;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../../src/components/OfflineLabel/index.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../src/components/OfflineLabel/index.tsx"],"sourcesContent":["import { SignalWifiStatusbarConnectedNoInternet4 } from \"@mui/icons-material\";\nimport classNames from \"classnames\";\n\nimport styles from \"./index.module.scss\";\n\ntype Props = {\n fontSize?: \"xx-small\" | \"large\";\n};\n\nexport const OfflineLabel = (props: Props) => {\n const { fontSize = \"xx-small\" } = props;\n\n return (\n <div\n className={classNames(styles.offlineLabel)}\n style={{ fontSize: fontSize }}\n >\n <SignalWifiStatusbarConnectedNoInternet4 fontSize={\"small\"} />\n オフライン\n </div>\n );\n};\n\nexport default OfflineLabel;\n"],"names":["OfflineLabel","props","fontSize","jsxs","classNames","styles","jsx","SignalWifiStatusbarConnectedNoInternet4"],"mappings":"uPASaA,EAAgBC,GAAiB,CACtC,KAAA,CAAE,SAAAC,EAAW,UAAA,EAAeD,EAGhC,OAAAE,EAAA,KAAC,MAAA,CACC,UAAWC,EAAWC,EAAO,YAAY,EACzC,MAAO,CAAE,SAAAH,CAAmB,EAE5B,SAAA,CAACI,EAAAA,IAAAC,EAAA,wCAAA,CAAwC,SAAU,OAAS,CAAA,EAAE,OAAA,CAAA,CAEhE,CAEJ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as o, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { SignalWifiStatusbarConnectedNoInternet4 as t } from "@mui/icons-material";
|
|
3
|
+
import n from "classnames";
|
|
4
4
|
import '../../assets/index26.css';const f = "_offlineLabel_2osy9_1", a = {
|
|
5
5
|
offlineLabel: f
|
|
6
6
|
}, c = (e) => {
|
|
@@ -8,10 +8,10 @@ import '../../assets/index26.css';const f = "_offlineLabel_2osy9_1", a = {
|
|
|
8
8
|
return /* @__PURE__ */ o(
|
|
9
9
|
"div",
|
|
10
10
|
{
|
|
11
|
-
className:
|
|
11
|
+
className: n(a.offlineLabel),
|
|
12
12
|
style: { fontSize: l },
|
|
13
13
|
children: [
|
|
14
|
-
/* @__PURE__ */ s(
|
|
14
|
+
/* @__PURE__ */ s(t, { fontSize: "small" }),
|
|
15
15
|
"オフライン"
|
|
16
16
|
]
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../src/components/OfflineLabel/index.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../src/components/OfflineLabel/index.tsx"],"sourcesContent":["import { SignalWifiStatusbarConnectedNoInternet4 } from \"@mui/icons-material\";\nimport classNames from \"classnames\";\n\nimport styles from \"./index.module.scss\";\n\ntype Props = {\n fontSize?: \"xx-small\" | \"large\";\n};\n\nexport const OfflineLabel = (props: Props) => {\n const { fontSize = \"xx-small\" } = props;\n\n return (\n <div\n className={classNames(styles.offlineLabel)}\n style={{ fontSize: fontSize }}\n >\n <SignalWifiStatusbarConnectedNoInternet4 fontSize={\"small\"} />\n オフライン\n </div>\n );\n};\n\nexport default OfflineLabel;\n"],"names":["OfflineLabel","props","fontSize","jsxs","classNames","styles","jsx","SignalWifiStatusbarConnectedNoInternet4"],"mappings":";;;;;GASaA,IAAe,CAACC,MAAiB;AACtC,QAAA,EAAE,UAAAC,IAAW,WAAA,IAAeD;AAGhC,SAAA,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAWC,EAAO,YAAY;AAAA,MACzC,OAAO,EAAE,UAAAH,EAAmB;AAAA,MAE5B,UAAA;AAAA,QAAC,gBAAAI,EAAAC,GAAA,EAAwC,UAAU,QAAS,CAAA;AAAA,QAAE;AAAA,MAAA;AAAA,IAAA;AAAA,EAEhE;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),h=require("react"),i=require("@mui/icons-material"),o=require("@mui/material"),m=require("react-hook-form"),l=a=>{const{control:u,name:d,autoComplete:c,placeholder:p,defaultValue:x,inputProps:C}=a,[r,w]=h.useState(!1),b=()=>{w(!r)};return e.jsx(m.Controller,{control:u,name:d,defaultValue:x,render:({field:t,fieldState:s})=>{var n;return e.jsxs(o.FormControl,{error:s.invalid,children:[e.jsx(o.TextField,{...t,type:r?"text":"password",autoComplete:c,placeholder:p,value:t.value??"",InputProps:{...C,endAdornment:t.value?e.jsx(o.InputAdornment,{position:"end",children:e.jsx(o.IconButton,{"aria-label":"toggle password visibility",onClick:b,edge:"end",children:r?e.jsx(i.VisibilityOff,{}):e.jsx(i.Visibility,{})})}):void 0},sx:{"& .MuiInput-underline:before":{borderColor:"#CCCCCC"},"& .MuiInputBase-root":{backgroundColor:"#FFFFFF"},"input:-webkit-autofill":{WebkitBoxShadow:"0 0 0 1000px white inset"}}}),e.jsx(o.FormHelperText,{children:(n=s.error)==null?void 0:n.message})]})}})};exports.PasswordInputController=l;exports.default=l;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../../src/components/PasswordInputController/index.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../src/components/PasswordInputController/index.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport { Visibility, VisibilityOff } from \"@mui/icons-material\";\nimport {\n FilledInputProps,\n FormControl,\n FormHelperText,\n IconButton,\n InputAdornment,\n InputProps,\n OutlinedInputProps,\n TextField,\n} from \"@mui/material\";\nimport {\n Controller,\n FieldPath,\n PathValue,\n type Control,\n type FieldValues,\n} from \"react-hook-form\";\n\ntype MultilineOption = {\n rows: number;\n};\n\ntype Props<T extends FieldValues> = {\n control: Control<T>;\n textareaOption?: MultilineOption;\n name: FieldPath<T>;\n defaultValue: PathValue<T, FieldPath<T>>;\n autoComplete?: string;\n placeholder?: string;\n inputProps?:\n | Partial<FilledInputProps>\n | Partial<OutlinedInputProps>\n | Partial<InputProps>;\n};\n\nexport const PasswordInputController = <T extends FieldValues>(\n props: Props<T>,\n) => {\n const { control, name, autoComplete, placeholder, defaultValue, inputProps } =\n props;\n\n const [showPassword, setShowPassword] = useState(false);\n\n const handleClickShowPassword = () => {\n setShowPassword(!showPassword);\n };\n\n return (\n <Controller\n control={control}\n name={name}\n defaultValue={defaultValue}\n render={({ field, fieldState }) => (\n <FormControl error={fieldState.invalid}>\n <TextField\n {...field}\n type={showPassword ? \"text\" : \"password\"}\n autoComplete={autoComplete}\n placeholder={placeholder}\n value={field.value ?? \"\"}\n InputProps={{\n ...inputProps,\n endAdornment: field.value ? (\n <InputAdornment position=\"end\">\n <IconButton\n aria-label=\"toggle password visibility\"\n onClick={handleClickShowPassword}\n edge=\"end\"\n >\n {showPassword ? <VisibilityOff /> : <Visibility />}\n </IconButton>\n </InputAdornment>\n ) : undefined,\n }}\n sx={{\n \"& .MuiInput-underline:before\": {\n borderColor: \"#CCCCCC\",\n },\n \"& .MuiInputBase-root\": {\n backgroundColor: \"#FFFFFF\",\n },\n \"input:-webkit-autofill\": {\n WebkitBoxShadow: \"0 0 0 1000px white inset\",\n },\n }}\n />\n <FormHelperText>{fieldState.error?.message}</FormHelperText>\n </FormControl>\n )}\n />\n );\n};\n\nexport default PasswordInputController;\n"],"names":["PasswordInputController","props","control","name","autoComplete","placeholder","defaultValue","inputProps","showPassword","setShowPassword","useState","handleClickShowPassword","jsx","Controller","field","fieldState","jsxs","FormControl","TextField","InputAdornment","IconButton","VisibilityOff","Visibility","FormHelperText","_a"],"mappings":"6PAqCaA,EACXC,GACG,CACH,KAAM,CAAE,QAAAC,EAAS,KAAAC,EAAM,aAAAC,EAAc,YAAAC,EAAa,aAAAC,EAAc,WAAAC,GAC9DN,EAEI,CAACO,EAAcC,CAAe,EAAIC,EAAAA,SAAS,EAAK,EAEhDC,EAA0B,IAAM,CACpCF,EAAgB,CAACD,CAAY,CAC/B,EAGE,OAAAI,EAAA,IAACC,EAAA,WAAA,CACC,QAAAX,EACA,KAAAC,EACA,aAAAG,EACA,OAAQ,CAAC,CAAE,MAAAQ,EAAO,WAAAC,KACfC,OAAAA,OAAAA,EAAAA,KAAAC,EAAA,YAAA,CAAY,MAAOF,EAAW,QAC7B,SAAA,CAAAH,EAAA,IAACM,EAAA,UAAA,CACE,GAAGJ,EACJ,KAAMN,EAAe,OAAS,WAC9B,aAAAJ,EACA,YAAAC,EACA,MAAOS,EAAM,OAAS,GACtB,WAAY,CACV,GAAGP,EACH,aAAcO,EAAM,MACjBF,EAAA,IAAAO,EAAA,eAAA,CAAe,SAAS,MACvB,SAAAP,EAAA,IAACQ,EAAA,WAAA,CACC,aAAW,6BACX,QAAST,EACT,KAAK,MAEJ,SAAeH,EAAAI,MAACS,EAAAA,cAAc,CAAA,CAAA,QAAMC,EAAAA,WAAW,CAAA,CAAA,CAAA,GAEpD,EACE,MACN,EACA,GAAI,CACF,+BAAgC,CAC9B,YAAa,SACf,EACA,uBAAwB,CACtB,gBAAiB,SACnB,EACA,yBAA0B,CACxB,gBAAiB,0BAAA,CACnB,CACF,CACF,EACCV,EAAA,IAAAW,EAAA,eAAA,CAAgB,UAAWC,EAAAT,EAAA,QAAA,YAAAS,EAAO,OAAQ,CAAA,CAAA,CAC7C,CAAA,EAAA,CAEJ,CAEJ"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx as o, jsxs as C } from "react/jsx-runtime";
|
|
2
2
|
import { useState as w } from "react";
|
|
3
|
-
import h from "@mui/icons-material
|
|
4
|
-
import f from "@mui/
|
|
5
|
-
import { FormControl as b, TextField as x, InputAdornment as F, IconButton as v, FormHelperText as I } from "@mui/material";
|
|
3
|
+
import { VisibilityOff as h, Visibility as b } from "@mui/icons-material";
|
|
4
|
+
import { FormControl as f, TextField as x, InputAdornment as F, IconButton as v, FormHelperText as I } from "@mui/material";
|
|
6
5
|
import { Controller as P } from "react-hook-form";
|
|
7
|
-
const
|
|
6
|
+
const V = (i) => {
|
|
8
7
|
const { control: s, name: l, autoComplete: a, placeholder: d, defaultValue: p, inputProps: u } = i, [r, m] = w(!1), c = () => {
|
|
9
8
|
m(!r);
|
|
10
9
|
};
|
|
@@ -16,7 +15,7 @@ const j = (i) => {
|
|
|
16
15
|
defaultValue: p,
|
|
17
16
|
render: ({ field: e, fieldState: t }) => {
|
|
18
17
|
var n;
|
|
19
|
-
return /* @__PURE__ */ C(
|
|
18
|
+
return /* @__PURE__ */ C(f, { error: t.invalid, children: [
|
|
20
19
|
/* @__PURE__ */ o(
|
|
21
20
|
x,
|
|
22
21
|
{
|
|
@@ -33,7 +32,7 @@ const j = (i) => {
|
|
|
33
32
|
"aria-label": "toggle password visibility",
|
|
34
33
|
onClick: c,
|
|
35
34
|
edge: "end",
|
|
36
|
-
children: r ? /* @__PURE__ */ o(
|
|
35
|
+
children: r ? /* @__PURE__ */ o(h, {}) : /* @__PURE__ */ o(b, {})
|
|
37
36
|
}
|
|
38
37
|
) }) : void 0
|
|
39
38
|
},
|
|
@@ -57,7 +56,7 @@ const j = (i) => {
|
|
|
57
56
|
);
|
|
58
57
|
};
|
|
59
58
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
V as PasswordInputController,
|
|
60
|
+
V as default
|
|
62
61
|
};
|
|
63
62
|
//# sourceMappingURL=index.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../src/components/PasswordInputController/index.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../src/components/PasswordInputController/index.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport { Visibility, VisibilityOff } from \"@mui/icons-material\";\nimport {\n FilledInputProps,\n FormControl,\n FormHelperText,\n IconButton,\n InputAdornment,\n InputProps,\n OutlinedInputProps,\n TextField,\n} from \"@mui/material\";\nimport {\n Controller,\n FieldPath,\n PathValue,\n type Control,\n type FieldValues,\n} from \"react-hook-form\";\n\ntype MultilineOption = {\n rows: number;\n};\n\ntype Props<T extends FieldValues> = {\n control: Control<T>;\n textareaOption?: MultilineOption;\n name: FieldPath<T>;\n defaultValue: PathValue<T, FieldPath<T>>;\n autoComplete?: string;\n placeholder?: string;\n inputProps?:\n | Partial<FilledInputProps>\n | Partial<OutlinedInputProps>\n | Partial<InputProps>;\n};\n\nexport const PasswordInputController = <T extends FieldValues>(\n props: Props<T>,\n) => {\n const { control, name, autoComplete, placeholder, defaultValue, inputProps } =\n props;\n\n const [showPassword, setShowPassword] = useState(false);\n\n const handleClickShowPassword = () => {\n setShowPassword(!showPassword);\n };\n\n return (\n <Controller\n control={control}\n name={name}\n defaultValue={defaultValue}\n render={({ field, fieldState }) => (\n <FormControl error={fieldState.invalid}>\n <TextField\n {...field}\n type={showPassword ? \"text\" : \"password\"}\n autoComplete={autoComplete}\n placeholder={placeholder}\n value={field.value ?? \"\"}\n InputProps={{\n ...inputProps,\n endAdornment: field.value ? (\n <InputAdornment position=\"end\">\n <IconButton\n aria-label=\"toggle password visibility\"\n onClick={handleClickShowPassword}\n edge=\"end\"\n >\n {showPassword ? <VisibilityOff /> : <Visibility />}\n </IconButton>\n </InputAdornment>\n ) : undefined,\n }}\n sx={{\n \"& .MuiInput-underline:before\": {\n borderColor: \"#CCCCCC\",\n },\n \"& .MuiInputBase-root\": {\n backgroundColor: \"#FFFFFF\",\n },\n \"input:-webkit-autofill\": {\n WebkitBoxShadow: \"0 0 0 1000px white inset\",\n },\n }}\n />\n <FormHelperText>{fieldState.error?.message}</FormHelperText>\n </FormControl>\n )}\n />\n );\n};\n\nexport default PasswordInputController;\n"],"names":["PasswordInputController","props","control","name","autoComplete","placeholder","defaultValue","inputProps","showPassword","setShowPassword","useState","handleClickShowPassword","jsx","Controller","field","fieldState","jsxs","FormControl","TextField","InputAdornment","IconButton","VisibilityOff","Visibility","FormHelperText","_a"],"mappings":";;;;;AAqCa,MAAAA,IAA0B,CACrCC,MACG;AACH,QAAM,EAAE,SAAAC,GAAS,MAAAC,GAAM,cAAAC,GAAc,aAAAC,GAAa,cAAAC,GAAc,YAAAC,MAC9DN,GAEI,CAACO,GAAcC,CAAe,IAAIC,EAAS,EAAK,GAEhDC,IAA0B,MAAM;AACpC,IAAAF,EAAgB,CAACD,CAAY;AAAA,EAC/B;AAGE,SAAA,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAAX;AAAA,MACA,MAAAC;AAAA,MACA,cAAAG;AAAA,MACA,QAAQ,CAAC,EAAE,OAAAQ,GAAO,YAAAC,QACf;;AAAA,+BAAAC,EAAAC,GAAA,EAAY,OAAOF,EAAW,SAC7B,UAAA;AAAA,UAAA,gBAAAH;AAAA,YAACM;AAAA,YAAA;AAAA,cACE,GAAGJ;AAAA,cACJ,MAAMN,IAAe,SAAS;AAAA,cAC9B,cAAAJ;AAAA,cACA,aAAAC;AAAA,cACA,OAAOS,EAAM,SAAS;AAAA,cACtB,YAAY;AAAA,gBACV,GAAGP;AAAA,gBACH,cAAcO,EAAM,QACjB,gBAAAF,EAAAO,GAAA,EAAe,UAAS,OACvB,UAAA,gBAAAP;AAAA,kBAACQ;AAAA,kBAAA;AAAA,oBACC,cAAW;AAAA,oBACX,SAAST;AAAA,oBACT,MAAK;AAAA,oBAEJ,UAAeH,IAAA,gBAAAI,EAACS,GAAc,CAAA,CAAA,sBAAMC,GAAW,CAAA,CAAA;AAAA,kBAAA;AAAA,mBAEpD,IACE;AAAA,cACN;AAAA,cACA,IAAI;AAAA,gBACF,gCAAgC;AAAA,kBAC9B,aAAa;AAAA,gBACf;AAAA,gBACA,wBAAwB;AAAA,kBACtB,iBAAiB;AAAA,gBACnB;AAAA,gBACA,0BAA0B;AAAA,kBACxB,iBAAiB;AAAA,gBAAA;AAAA,cACnB;AAAA,YACF;AAAA,UACF;AAAA,UACC,gBAAAV,EAAAW,GAAA,EAAgB,WAAWC,IAAAT,EAAA,UAAA,gBAAAS,EAAO,QAAQ,CAAA;AAAA,QAAA,EAC7C,CAAA;AAAA;AAAA,IAAA;AAAA,EAEJ;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),l=require("@mui/material"),x=require("@mui/x-date-pickers"),q=require("@mui/x-date-pickers/AdapterDateFns"),D=require("@mui/x-date-pickers/locales"),T=require("@mui/x-date-pickers/LocalizationProvider"),h=require("date-fns"),v=require("date-fns/locale/ja"),f=require("react-hook-form"),F=require("../../constants/datetime.cjs.js"),g={".MuiButtonBase-root":{padding:.5,paddingLeft:0},"& input::placeholder":{fontSize:"x-small"}},j=["clear","accept"],P=y=>{const{control:c,fromDateInfo:a,toDateInfo:i,dateFormat:r,setValue:u}=y,d=(e,t)=>{const s=e?e instanceof Date?e:typeof e=="string"?h.parse(e,r,new Date):null:null;return typeof e=="string"&&u(t.name,s),s},m=(e,t)=>{u(t.name,e??t.defaultValue,{shouldDirty:!0})},p=(()=>{const e=[];return r.includes("yyyy")&&e.push("year"),r.includes("MM")&&e.push("month"),r.includes("dd")&&e.push("day"),r.includes("HH")&&e.push("hours"),r.includes("mm")&&e.push("minutes"),r.includes("ss")&&e.push("seconds"),e})();return n.jsx(T.LocalizationProvider,{dateAdapter:q.AdapterDateFns,adapterLocale:v,localeText:D.jaJP.components.MuiLocalizationProvider.defaultProps.localeText,children:n.jsxs(l.Grid,{container:!0,alignItems:"center",rowSpacing:1,columnSpacing:1,children:[n.jsx(l.Grid,{item:!0,xs:11.4,sm:5.7,md:11.4,xl:5.7,children:n.jsx(f.Controller,{control:c,name:a.name,defaultValue:a.defaultValue,render:({field:e,fieldState:t})=>{var s;return n.jsx(x.DateTimePicker,{...e,format:r,views:p,sx:g,value:d(e.value,a),onChange:o=>{m(o,a)},slotProps:{textField:{error:!!t.error,helperText:(s=t.error)==null?void 0:s.message,fullWidth:!0},actionBar:{actions:j}}})}})}),n.jsx(l.Grid,{item:!0,xs:.6,sm:.6,md:.6,lg:.6,textAlign:"center",children:"~"}),n.jsx(l.Grid,{item:!0,xs:11.4,sm:5.7,md:11.4,xl:5.7,children:n.jsx(f.Controller,{control:c,name:i.name,defaultValue:i.defaultValue,render:({field:e,fieldState:t})=>{var s;return n.jsx(x.DateTimePicker,{...e,format:r,views:p,sx:g,value:d(e.value,i),onChange:o=>{r===F.DATETIME_FORMAT&&o!==null&&!e.value&&(o=h.set(o,{hours:23,minutes:59,seconds:59})),m(o,i)},slotProps:{textField:{error:!!t.error,helperText:(s=t.error)==null?void 0:s.message,fullWidth:!0},actionBar:{actions:j}}})}})})]})})};exports.RangeDatePickerController=P;exports.default=P;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../../src/components/RangeDatePickerController/index.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../src/components/RangeDatePickerController/index.tsx"],"sourcesContent":["import { Grid } from \"@mui/material\";\nimport {\n DateTimePicker,\n PickersActionBarAction,\n type DateOrTimeView,\n} from \"@mui/x-date-pickers\";\nimport { AdapterDateFns } from \"@mui/x-date-pickers/AdapterDateFns\";\nimport { jaJP } from \"@mui/x-date-pickers/locales\";\nimport { LocalizationProvider } from \"@mui/x-date-pickers/LocalizationProvider\";\nimport { parse, set } from \"date-fns\";\nimport ja from \"date-fns/locale/ja\";\nimport {\n Controller,\n type Control,\n type FieldValues,\n type UseFormSetValue,\n} from \"react-hook-form\";\n\nimport { DATETIME_FORMAT } from \"@/constants/datetime\";\n\nexport type PickerInfo = {\n name: string;\n defaultValue?: string | undefined | null;\n};\n\ntype Props = {\n control: Control;\n fromDateInfo: PickerInfo;\n toDateInfo: PickerInfo;\n dateFormat: string;\n setValue: UseFormSetValue<FieldValues>;\n};\n\nconst pickerStyles = {\n \".MuiButtonBase-root\": {\n padding: 0.5,\n paddingLeft: 0,\n },\n \"& input::placeholder\": {\n fontSize: \"x-small\",\n },\n};\n\nconst pickerActions: PickersActionBarAction[] = [\"clear\", \"accept\"];\n\n/**\n * Date,DateTimeをを選択できるコンポーネント\n * dateFormatに合わせてpickerViewを生成します。\n * @param props\n * @returns\n */\nexport const RangeDatePickerController = (props: Props) => {\n const { control, fromDateInfo, toDateInfo, dateFormat, setValue } = props;\n\n /**\n * 受信した値を適切な日付またはnullに変換します。\n * @param value ユーザーによる値、呼び出し側からセットされた値\n * @param pickerInfo 紐づくpickerの情報\n * @returns\n */\n const convertValue = (\n value: string | Date | null,\n pickerInfo: PickerInfo,\n ): Date | null => {\n const newValue = value\n ? value instanceof Date\n ? value\n : typeof value === \"string\"\n ? parse(value, dateFormat, new Date())\n : null\n : null;\n // NOTE:呼び出し側からはstringがセットされる可能性が高いため、変換後controlに紐付けvalueも置き換えます。\n if (typeof value === \"string\") {\n setValue(pickerInfo.name, newValue);\n }\n return newValue;\n };\n\n const handleOnchange = (value: Date | null, pickerInfo: PickerInfo) => {\n setValue(pickerInfo.name, value ?? pickerInfo.defaultValue, {\n shouldDirty: true,\n });\n };\n\n const views: DateOrTimeView[] = (() => {\n const v: DateOrTimeView[] = [];\n\n if (dateFormat.includes(\"yyyy\")) {\n v.push(\"year\");\n }\n if (dateFormat.includes(\"MM\")) {\n v.push(\"month\");\n }\n if (dateFormat.includes(\"dd\")) {\n v.push(\"day\");\n }\n if (dateFormat.includes(\"HH\")) {\n v.push(\"hours\");\n }\n if (dateFormat.includes(\"mm\")) {\n v.push(\"minutes\");\n }\n if (dateFormat.includes(\"ss\")) {\n v.push(\"seconds\");\n }\n return v;\n })();\n\n return (\n <LocalizationProvider\n dateAdapter={AdapterDateFns}\n adapterLocale={ja}\n localeText={\n jaJP.components.MuiLocalizationProvider.defaultProps.localeText\n }\n >\n <Grid container alignItems=\"center\" rowSpacing={1} columnSpacing={1}>\n <Grid item xs={11.4} sm={5.7} md={11.4} xl={5.7}>\n <Controller\n control={control}\n name={fromDateInfo.name}\n defaultValue={fromDateInfo.defaultValue}\n render={({ field, fieldState }) => (\n <DateTimePicker\n {...field}\n format={dateFormat}\n views={views}\n sx={pickerStyles}\n value={convertValue(field.value, fromDateInfo)}\n onChange={(newDate) => {\n handleOnchange(newDate, fromDateInfo);\n }}\n slotProps={{\n textField: {\n error: !!fieldState.error,\n helperText: fieldState.error?.message,\n fullWidth: true,\n },\n // NOTE: clearボタンが文字を隠していまうのでとりあえずcalendar内のもので代用\n // field: {\n // clearable: true,\n // },\n actionBar: { actions: pickerActions },\n }}\n />\n )}\n />\n </Grid>\n <Grid item xs={0.6} sm={0.6} md={0.6} lg={0.6} textAlign=\"center\">\n ~\n </Grid>\n {/* <Grid item xs={1} sm={0} lg={0}>\n <></>\n </Grid> */}\n <Grid item xs={11.4} sm={5.7} md={11.4} xl={5.7}>\n <Controller\n control={control}\n name={toDateInfo.name}\n defaultValue={toDateInfo.defaultValue}\n render={({ field, fieldState }) => (\n <DateTimePicker\n {...field}\n format={dateFormat}\n views={views}\n sx={pickerStyles}\n value={convertValue(field.value, toDateInfo)}\n onChange={(newDate) => {\n // NOTE: 値がない状態からh日付をを入力した場合に限りto入力部だけデフォルトで23:59:59が入るようにします。\n if (\n dateFormat === DATETIME_FORMAT &&\n newDate !== null &&\n !field.value\n ) {\n newDate = set(newDate, {\n hours: 23,\n minutes: 59,\n seconds: 59,\n });\n }\n handleOnchange(newDate, toDateInfo);\n }}\n slotProps={{\n textField: {\n error: !!fieldState.error,\n helperText: fieldState.error?.message,\n fullWidth: true,\n },\n // NOTE: clearボタンが文字を隠していまうのでとりあえずcalendar内のもので代用\n // field: {\n // clearable: true,\n // },\n actionBar: { actions: pickerActions },\n }}\n />\n )}\n />\n </Grid>\n </Grid>\n </LocalizationProvider>\n );\n};\n\nexport default RangeDatePickerController;"],"names":["pickerStyles","pickerActions","RangeDatePickerController","props","control","fromDateInfo","toDateInfo","dateFormat","setValue","convertValue","value","pickerInfo","newValue","parse","handleOnchange","views","v","jsx","LocalizationProvider","AdapterDateFns","ja","jaJP","jsxs","Grid","Controller","field","fieldState","DateTimePicker","newDate","_a","DATETIME_FORMAT","set"],"mappings":"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"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Control, FieldValues, UseFormSetValue } from 'react-hook-form';
|
|
2
2
|
|
|
3
|
-
export type
|
|
3
|
+
export type PickerInfo = {
|
|
4
4
|
name: string;
|
|
5
5
|
defaultValue?: string | undefined | null;
|
|
6
6
|
};
|
|
7
7
|
type Props = {
|
|
8
8
|
control: Control;
|
|
9
|
-
fromDateInfo:
|
|
10
|
-
toDateInfo:
|
|
9
|
+
fromDateInfo: PickerInfo;
|
|
10
|
+
toDateInfo: PickerInfo;
|
|
11
11
|
dateFormat: string;
|
|
12
12
|
setValue: UseFormSetValue<FieldValues>;
|
|
13
13
|
};
|
|
@@ -1,121 +1,123 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
|
|
1
|
+
import { jsx as n, jsxs as P } from "react/jsx-runtime";
|
|
2
|
+
import { Grid as l } from "@mui/material";
|
|
3
|
+
import { DateTimePicker as f } from "@mui/x-date-pickers";
|
|
4
|
+
import { AdapterDateFns as T } from "@mui/x-date-pickers/AdapterDateFns";
|
|
5
|
+
import { jaJP as V } from "@mui/x-date-pickers/locales";
|
|
6
|
+
import { LocalizationProvider as A } from "@mui/x-date-pickers/LocalizationProvider";
|
|
7
|
+
import { set as D, parse as M } from "date-fns";
|
|
8
|
+
import v from "date-fns/locale/ja";
|
|
9
|
+
import { Controller as h } from "react-hook-form";
|
|
10
|
+
import { DATETIME_FORMAT as F } from "../../constants/datetime.es.js";
|
|
11
|
+
const x = {
|
|
12
|
+
".MuiButtonBase-root": {
|
|
13
|
+
padding: 0.5,
|
|
14
|
+
paddingLeft: 0
|
|
15
|
+
},
|
|
16
|
+
"& input::placeholder": {
|
|
17
|
+
fontSize: "x-small"
|
|
18
|
+
}
|
|
19
|
+
}, g = ["clear", "accept"], R = (y) => {
|
|
20
|
+
const { control: u, fromDateInfo: s, toDateInfo: i, dateFormat: r, setValue: m } = y, c = (e, t) => {
|
|
21
|
+
const o = e ? e instanceof Date ? e : typeof e == "string" ? M(e, r, /* @__PURE__ */ new Date()) : null : null;
|
|
22
|
+
return typeof e == "string" && m(t.name, o), o;
|
|
23
|
+
}, d = (e, t) => {
|
|
24
|
+
m(t.name, e ?? t.defaultValue, {
|
|
17
25
|
shouldDirty: !0
|
|
18
26
|
});
|
|
19
|
-
},
|
|
27
|
+
}, p = (() => {
|
|
20
28
|
const e = [];
|
|
21
29
|
return r.includes("yyyy") && e.push("year"), r.includes("MM") && e.push("month"), r.includes("dd") && e.push("day"), r.includes("HH") && e.push("hours"), r.includes("mm") && e.push("minutes"), r.includes("ss") && e.push("seconds"), e;
|
|
22
30
|
})();
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
|
|
31
|
+
return /* @__PURE__ */ n(
|
|
32
|
+
A,
|
|
25
33
|
{
|
|
26
|
-
dateAdapter:
|
|
27
|
-
adapterLocale:
|
|
28
|
-
localeText:
|
|
29
|
-
children: /* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
|
|
34
|
+
dateAdapter: T,
|
|
35
|
+
adapterLocale: v,
|
|
36
|
+
localeText: V.components.MuiLocalizationProvider.defaultProps.localeText,
|
|
37
|
+
children: /* @__PURE__ */ P(l, { container: !0, alignItems: "center", rowSpacing: 1, columnSpacing: 1, children: [
|
|
38
|
+
/* @__PURE__ */ n(l, { item: !0, xs: 11.4, sm: 5.7, md: 11.4, xl: 5.7, children: /* @__PURE__ */ n(
|
|
39
|
+
h,
|
|
32
40
|
{
|
|
33
|
-
control:
|
|
41
|
+
control: u,
|
|
34
42
|
name: s.name,
|
|
35
43
|
defaultValue: s.defaultValue,
|
|
36
|
-
render: ({ field: e, fieldState:
|
|
37
|
-
var
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
-
|
|
44
|
+
render: ({ field: e, fieldState: t }) => {
|
|
45
|
+
var o;
|
|
46
|
+
return /* @__PURE__ */ n(
|
|
47
|
+
f,
|
|
40
48
|
{
|
|
41
49
|
...e,
|
|
42
50
|
format: r,
|
|
43
|
-
views:
|
|
44
|
-
sx:
|
|
45
|
-
".MuiButtonBase-root": {
|
|
46
|
-
padding: 0.5
|
|
47
|
-
}
|
|
48
|
-
},
|
|
51
|
+
views: p,
|
|
52
|
+
sx: x,
|
|
49
53
|
value: c(e.value, s),
|
|
50
|
-
onChange: (
|
|
51
|
-
|
|
54
|
+
onChange: (a) => {
|
|
55
|
+
d(a, s);
|
|
52
56
|
},
|
|
53
57
|
slotProps: {
|
|
54
58
|
textField: {
|
|
55
|
-
error: !!
|
|
56
|
-
helperText: (
|
|
59
|
+
error: !!t.error,
|
|
60
|
+
helperText: (o = t.error) == null ? void 0 : o.message,
|
|
61
|
+
fullWidth: !0
|
|
57
62
|
},
|
|
58
63
|
// NOTE: clearボタンが文字を隠していまうのでとりあえずcalendar内のもので代用
|
|
59
64
|
// field: {
|
|
60
65
|
// clearable: true,
|
|
61
66
|
// },
|
|
62
|
-
actionBar: { actions:
|
|
67
|
+
actionBar: { actions: g }
|
|
63
68
|
}
|
|
64
69
|
}
|
|
65
70
|
);
|
|
66
71
|
}
|
|
67
72
|
}
|
|
68
|
-
),
|
|
69
|
-
"~",
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
|
|
73
|
+
) }),
|
|
74
|
+
/* @__PURE__ */ n(l, { item: !0, xs: 0.6, sm: 0.6, md: 0.6, lg: 0.6, textAlign: "center", children: "~" }),
|
|
75
|
+
/* @__PURE__ */ n(l, { item: !0, xs: 11.4, sm: 5.7, md: 11.4, xl: 5.7, children: /* @__PURE__ */ n(
|
|
76
|
+
h,
|
|
72
77
|
{
|
|
73
|
-
control:
|
|
78
|
+
control: u,
|
|
74
79
|
name: i.name,
|
|
75
80
|
defaultValue: i.defaultValue,
|
|
76
|
-
render: ({ field: e, fieldState:
|
|
77
|
-
var
|
|
78
|
-
return /* @__PURE__ */
|
|
79
|
-
|
|
81
|
+
render: ({ field: e, fieldState: t }) => {
|
|
82
|
+
var o;
|
|
83
|
+
return /* @__PURE__ */ n(
|
|
84
|
+
f,
|
|
80
85
|
{
|
|
81
86
|
...e,
|
|
82
87
|
format: r,
|
|
83
|
-
views:
|
|
84
|
-
sx:
|
|
85
|
-
".MuiButtonBase-root": {
|
|
86
|
-
padding: 0.5
|
|
87
|
-
}
|
|
88
|
-
},
|
|
88
|
+
views: p,
|
|
89
|
+
sx: x,
|
|
89
90
|
value: c(e.value, i),
|
|
90
|
-
onChange: (
|
|
91
|
-
r ===
|
|
91
|
+
onChange: (a) => {
|
|
92
|
+
r === F && a !== null && !e.value && (a = D(a, {
|
|
92
93
|
hours: 23,
|
|
93
94
|
minutes: 59,
|
|
94
95
|
seconds: 59
|
|
95
|
-
})),
|
|
96
|
+
})), d(a, i);
|
|
96
97
|
},
|
|
97
98
|
slotProps: {
|
|
98
99
|
textField: {
|
|
99
|
-
error: !!
|
|
100
|
-
helperText: (
|
|
100
|
+
error: !!t.error,
|
|
101
|
+
helperText: (o = t.error) == null ? void 0 : o.message,
|
|
102
|
+
fullWidth: !0
|
|
101
103
|
},
|
|
102
104
|
// NOTE: clearボタンが文字を隠していまうのでとりあえずcalendar内のもので代用
|
|
103
105
|
// field: {
|
|
104
106
|
// clearable: true,
|
|
105
107
|
// },
|
|
106
|
-
actionBar: { actions:
|
|
108
|
+
actionBar: { actions: g }
|
|
107
109
|
}
|
|
108
110
|
}
|
|
109
111
|
);
|
|
110
112
|
}
|
|
111
113
|
}
|
|
112
|
-
)
|
|
114
|
+
) })
|
|
113
115
|
] })
|
|
114
116
|
}
|
|
115
117
|
);
|
|
116
118
|
};
|
|
117
119
|
export {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
+
R as RangeDatePickerController,
|
|
121
|
+
R as default
|
|
120
122
|
};
|
|
121
123
|
//# sourceMappingURL=index.es.js.map
|