@abgov/react-components 4.0.0-alpha.64 → 4.0.0-alpha.66
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/lib/input/input.d.ts +28 -22
- package/package.json +1 -1
- package/react-components.esm.js +56 -29
- package/react-components.umd.js +59 -28
package/lib/input/input.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
import { GoAIconType } from '../..';
|
|
3
|
-
declare type GoAInputType = "text" | "
|
|
3
|
+
declare type GoAInputType = "text" | "password" | "email" | "number" | "date" | "datetime-local" | "month" | "range" | "search" | "tel" | "time" | "url" | "week";
|
|
4
4
|
declare type GoAAutoCapitalize = "on" | "off" | "none" | "sentences" | "words" | "characters";
|
|
5
5
|
interface WCProps {
|
|
6
6
|
ref?: React.MutableRefObject<HTMLInputElement | null>;
|
|
@@ -24,8 +24,8 @@ interface WCProps {
|
|
|
24
24
|
prefix?: string;
|
|
25
25
|
suffix?: string;
|
|
26
26
|
testid?: string;
|
|
27
|
-
min?: string;
|
|
28
|
-
max?: string;
|
|
27
|
+
min?: string | number;
|
|
28
|
+
max?: string | number;
|
|
29
29
|
step?: number;
|
|
30
30
|
}
|
|
31
31
|
declare global {
|
|
@@ -35,10 +35,8 @@ declare global {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
interface BaseProps {
|
|
39
39
|
name: string;
|
|
40
|
-
value: string;
|
|
41
|
-
onChange: (name: string, value: string) => void;
|
|
42
40
|
id?: string;
|
|
43
41
|
disabled?: boolean;
|
|
44
42
|
autoCapitalize?: GoAAutoCapitalize;
|
|
@@ -56,8 +54,26 @@ export interface InputProps {
|
|
|
56
54
|
prefix?: string;
|
|
57
55
|
suffix?: string;
|
|
58
56
|
testId?: string;
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
}
|
|
58
|
+
export interface InputProps extends BaseProps {
|
|
59
|
+
onChange: (name: string, value: string) => void;
|
|
60
|
+
value: string;
|
|
61
|
+
min?: number | string;
|
|
62
|
+
max?: number | string;
|
|
63
|
+
step?: number;
|
|
64
|
+
}
|
|
65
|
+
interface NumberInputProps extends BaseProps {
|
|
66
|
+
onChange: (name: string, value: number) => void;
|
|
67
|
+
value: number;
|
|
68
|
+
min?: number;
|
|
69
|
+
max?: number;
|
|
70
|
+
step?: number;
|
|
71
|
+
}
|
|
72
|
+
interface DateInputProps extends BaseProps {
|
|
73
|
+
onChange: (name: string, value: Date) => void;
|
|
74
|
+
value: string | Date;
|
|
75
|
+
min?: string | Date;
|
|
76
|
+
max?: string | Date;
|
|
61
77
|
step?: number;
|
|
62
78
|
}
|
|
63
79
|
export declare const GoAInput: FC<InputProps & {
|
|
@@ -65,25 +81,15 @@ export declare const GoAInput: FC<InputProps & {
|
|
|
65
81
|
}>;
|
|
66
82
|
export declare const GoAInputText: FC<InputProps>;
|
|
67
83
|
export declare const GoAInputPassword: FC<InputProps>;
|
|
68
|
-
export declare const GoAInputDate: FC<
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
export declare const GoAInputTime: FC<Omit<InputProps, "value"> & {
|
|
72
|
-
value: Date | string;
|
|
73
|
-
}>;
|
|
74
|
-
export declare const GoAInputDateTime: FC<Omit<InputProps, "value"> & {
|
|
75
|
-
value: Date;
|
|
76
|
-
}>;
|
|
84
|
+
export declare const GoAInputDate: FC<DateInputProps>;
|
|
85
|
+
export declare const GoAInputTime: FC<DateInputProps>;
|
|
86
|
+
export declare const GoAInputDateTime: FC<DateInputProps>;
|
|
77
87
|
export declare const GoAInputEmail: FC<InputProps>;
|
|
78
88
|
export declare const GoAInputSearch: FC<InputProps>;
|
|
79
89
|
export declare const GoAInputUrl: FC<InputProps>;
|
|
80
90
|
export declare const GoAInputTel: FC<InputProps>;
|
|
81
91
|
export declare const GoAInputFile: FC<InputProps>;
|
|
82
92
|
export declare const GoAInputMonth: FC<InputProps>;
|
|
83
|
-
export declare const GoAInputNumber: FC<
|
|
84
|
-
value: number;
|
|
85
|
-
min?: number;
|
|
86
|
-
max?: number;
|
|
87
|
-
}>;
|
|
93
|
+
export declare const GoAInputNumber: FC<NumberInputProps>;
|
|
88
94
|
export declare const GoAInputRange: FC<InputProps>;
|
|
89
95
|
export default GoAInput;
|
package/package.json
CHANGED
package/react-components.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { useRef, useEffect } from 'react';
|
|
3
|
-
import { format } from 'date-fns';
|
|
3
|
+
import { parseISO, format } from 'date-fns';
|
|
4
4
|
|
|
5
5
|
function noop() {}
|
|
6
6
|
|
|
@@ -1162,7 +1162,7 @@ function create_fragment$F(ctx) {
|
|
|
1162
1162
|
ctx[2]);
|
|
1163
1163
|
attr(div2, "style", div2_style_value = `--max-content-width: ${
|
|
1164
1164
|
/*maxcontentwidth*/
|
|
1165
|
-
ctx[3] || "
|
|
1165
|
+
ctx[3] || "100%"}`);
|
|
1166
1166
|
},
|
|
1167
1167
|
|
|
1168
1168
|
m(target, anchor) {
|
|
@@ -1198,7 +1198,7 @@ function create_fragment$F(ctx) {
|
|
|
1198
1198
|
/*maxcontentwidth*/
|
|
1199
1199
|
8 && div2_style_value !== (div2_style_value = `--max-content-width: ${
|
|
1200
1200
|
/*maxcontentwidth*/
|
|
1201
|
-
ctx[3] || "
|
|
1201
|
+
ctx[3] || "100%"}`)) {
|
|
1202
1202
|
attr(div2, "style", div2_style_value);
|
|
1203
1203
|
}
|
|
1204
1204
|
},
|
|
@@ -6976,7 +6976,7 @@ function create_fragment$k(ctx) {
|
|
|
6976
6976
|
attr(div5, "class", "app-footer");
|
|
6977
6977
|
attr(div5, "style", div5_style_value = `--max-content-width: ${
|
|
6978
6978
|
/*maxcontentwidth*/
|
|
6979
|
-
ctx[0] || "
|
|
6979
|
+
ctx[0] || "100%"}`);
|
|
6980
6980
|
},
|
|
6981
6981
|
|
|
6982
6982
|
m(target, anchor) {
|
|
@@ -7038,7 +7038,7 @@ function create_fragment$k(ctx) {
|
|
|
7038
7038
|
/*maxcontentwidth*/
|
|
7039
7039
|
1 && div5_style_value !== (div5_style_value = `--max-content-width: ${
|
|
7040
7040
|
/*maxcontentwidth*/
|
|
7041
|
-
ctx[0] || "
|
|
7041
|
+
ctx[0] || "100%"}`)) {
|
|
7042
7042
|
attr(div5, "style", div5_style_value);
|
|
7043
7043
|
}
|
|
7044
7044
|
},
|
|
@@ -7090,7 +7090,7 @@ function instance$i($$self, $$props, $$invalidate) {
|
|
|
7090
7090
|
class Footer extends SvelteElement {
|
|
7091
7091
|
constructor(options) {
|
|
7092
7092
|
super();
|
|
7093
|
-
this.shadowRoot.innerHTML = `<style>*{box-sizing:border-box}.app-footer{background-color:var(--color-gray-100);border-top:2px solid var(--color-gray-200);border-bottom:1rem solid var(--goa-color-brand)}.content{padding:2rem 1rem;margin:0 auto;width:min(var(--max-content-width),
|
|
7093
|
+
this.shadowRoot.innerHTML = `<style>*{box-sizing:border-box}.app-footer{background-color:var(--color-gray-100);border-top:2px solid var(--color-gray-200);border-bottom:1rem solid var(--goa-color-brand)}.content{padding:2rem 1rem;margin:0 auto;width:min(var(--max-content-width), 100%)}@media(min-width: 640px){.content{padding:2rem 1.5rem}}.meta-section{display:flex;flex-direction:column;padding:1rem 0}.meta-section.with-meta-links{gap:2rem;justify-content:space-between}.meta-links{display:none}.with-meta-links .meta-links{display:block}.nav-links{display:flex;flex-direction:column;gap:2rem}.abgov{display:flex;flex-direction:column;justify-content:space-between;width:100%}@media(min-width: 640px){.meta-section{flex-direction:row;gap:2rem}.nav-links{flex-direction:row}.abgov{align-items:center;flex-direction:row-reverse}}.abgov.with-meta-links{gap:1rem;flex-direction:column;width:unset}@media(min-width: 640px){.abgov.with-meta-links{align-items:flex-end}}.goa-copyright{white-space:nowrap}a{color:var(--goa-color-text-secondary)}</style>`;
|
|
7094
7094
|
init(this, {
|
|
7095
7095
|
target: this.shadowRoot,
|
|
7096
7096
|
props: attribute_to_object(this.attributes),
|
|
@@ -10225,7 +10225,7 @@ function create_if_block$5(ctx) {
|
|
|
10225
10225
|
}
|
|
10226
10226
|
|
|
10227
10227
|
};
|
|
10228
|
-
} // (
|
|
10228
|
+
} // (55:8) {#if heading}
|
|
10229
10229
|
|
|
10230
10230
|
|
|
10231
10231
|
function create_if_block_3(ctx) {
|
|
@@ -10259,7 +10259,7 @@ function create_if_block_3(ctx) {
|
|
|
10259
10259
|
}
|
|
10260
10260
|
|
|
10261
10261
|
};
|
|
10262
|
-
} // (
|
|
10262
|
+
} // (58:8) {#if isClosable}
|
|
10263
10263
|
|
|
10264
10264
|
|
|
10265
10265
|
function create_if_block_2$2(ctx) {
|
|
@@ -10297,7 +10297,7 @@ function create_if_block_2$2(ctx) {
|
|
|
10297
10297
|
}
|
|
10298
10298
|
|
|
10299
10299
|
};
|
|
10300
|
-
} // (
|
|
10300
|
+
} // (72:10) {:else}
|
|
10301
10301
|
|
|
10302
10302
|
|
|
10303
10303
|
function create_else_block$1(ctx) {
|
|
@@ -10318,7 +10318,7 @@ function create_else_block$1(ctx) {
|
|
|
10318
10318
|
}
|
|
10319
10319
|
|
|
10320
10320
|
};
|
|
10321
|
-
} // (
|
|
10321
|
+
} // (68:10) {#if isScrollable}
|
|
10322
10322
|
|
|
10323
10323
|
|
|
10324
10324
|
function create_if_block_1$3(ctx) {
|
|
@@ -10433,9 +10433,6 @@ function instance$b($$self, $$props, $$invalidate) {
|
|
|
10433
10433
|
let {
|
|
10434
10434
|
width
|
|
10435
10435
|
} = $$props;
|
|
10436
|
-
onMount(() => {
|
|
10437
|
-
console.log("in the modal v2");
|
|
10438
|
-
});
|
|
10439
10436
|
|
|
10440
10437
|
function close(e) {
|
|
10441
10438
|
if (!isClosable) {
|
|
@@ -13629,7 +13626,7 @@ function create_fragment$3(ctx) {
|
|
|
13629
13626
|
attr(div, "style", div_style_value = `
|
|
13630
13627
|
--max-content-width: ${
|
|
13631
13628
|
/*maxcontentwidth*/
|
|
13632
|
-
ctx[1] || "
|
|
13629
|
+
ctx[1] || "100%"};
|
|
13633
13630
|
--nav-column-width: ${
|
|
13634
13631
|
/*navcolumnwidth*/
|
|
13635
13632
|
ctx[0] || "var(--layout-nav-column-width)"};
|
|
@@ -13651,7 +13648,7 @@ function create_fragment$3(ctx) {
|
|
|
13651
13648
|
3 && div_style_value !== (div_style_value = `
|
|
13652
13649
|
--max-content-width: ${
|
|
13653
13650
|
/*maxcontentwidth*/
|
|
13654
|
-
ctx[1] || "
|
|
13651
|
+
ctx[1] || "100%"};
|
|
13655
13652
|
--nav-column-width: ${
|
|
13656
13653
|
/*navcolumnwidth*/
|
|
13657
13654
|
ctx[0] || "var(--layout-nav-column-width)"};
|
|
@@ -14828,38 +14825,55 @@ const GoAInputPassword = props => {
|
|
|
14828
14825
|
const GoAInputDate = _a => {
|
|
14829
14826
|
var {
|
|
14830
14827
|
value,
|
|
14831
|
-
min,
|
|
14832
|
-
max
|
|
14828
|
+
min = "",
|
|
14829
|
+
max = ""
|
|
14833
14830
|
} = _a,
|
|
14834
14831
|
props = __rest(_a, ["value", "min", "max"]);
|
|
14835
14832
|
|
|
14836
|
-
const
|
|
14833
|
+
const _format = value => {
|
|
14834
|
+
return format(value, "yyyy-MM-dd");
|
|
14835
|
+
};
|
|
14836
|
+
|
|
14837
|
+
const _value = _format(typeof value === "string" ? parseISO(value) : value);
|
|
14838
|
+
|
|
14839
|
+
const _min = min && _format(typeof min === "string" ? parseISO(min) : min);
|
|
14837
14840
|
|
|
14838
|
-
const
|
|
14841
|
+
const _max = max && _format(typeof max === "string" ? parseISO(max) : max);
|
|
14839
14842
|
|
|
14840
|
-
const
|
|
14843
|
+
const onDateChange = (name, value) => {
|
|
14844
|
+
props.onChange(name, parseISO(value));
|
|
14845
|
+
};
|
|
14841
14846
|
|
|
14842
14847
|
return jsx(GoAInput, Object.assign({}, props, {
|
|
14848
|
+
onChange: onDateChange,
|
|
14843
14849
|
min: _min,
|
|
14844
14850
|
max: _max,
|
|
14845
|
-
value:
|
|
14851
|
+
value: _value,
|
|
14846
14852
|
type: "date"
|
|
14847
14853
|
}), void 0);
|
|
14848
14854
|
};
|
|
14849
14855
|
const GoAInputTime = _a => {
|
|
14850
14856
|
var {
|
|
14851
|
-
value
|
|
14857
|
+
value,
|
|
14858
|
+
min = "",
|
|
14859
|
+
max = ""
|
|
14852
14860
|
} = _a,
|
|
14853
|
-
props = __rest(_a, ["value"]);
|
|
14861
|
+
props = __rest(_a, ["value", "min", "max"]);
|
|
14862
|
+
|
|
14863
|
+
const onDateChange = (name, value) => {
|
|
14864
|
+
props.onChange(name, parseISO(value));
|
|
14865
|
+
};
|
|
14854
14866
|
|
|
14855
14867
|
try {
|
|
14856
|
-
const d = typeof value === "string" ?
|
|
14868
|
+
const d = typeof value === "string" ? parseISO(value) : value;
|
|
14857
14869
|
return jsx(GoAInput, Object.assign({}, props, {
|
|
14870
|
+
onChange: onDateChange,
|
|
14858
14871
|
value: format(d, "hh:mm"),
|
|
14859
14872
|
type: "time"
|
|
14860
14873
|
}), void 0);
|
|
14861
14874
|
} catch (e) {
|
|
14862
14875
|
return jsx(GoAInput, Object.assign({}, props, {
|
|
14876
|
+
onChange: onDateChange,
|
|
14863
14877
|
value: value,
|
|
14864
14878
|
type: "time"
|
|
14865
14879
|
}), void 0);
|
|
@@ -14867,12 +14881,20 @@ const GoAInputTime = _a => {
|
|
|
14867
14881
|
};
|
|
14868
14882
|
const GoAInputDateTime = _a => {
|
|
14869
14883
|
var {
|
|
14870
|
-
value
|
|
14884
|
+
value,
|
|
14885
|
+
min = "",
|
|
14886
|
+
max = ""
|
|
14871
14887
|
} = _a,
|
|
14872
|
-
props = __rest(_a, ["value"]);
|
|
14888
|
+
props = __rest(_a, ["value", "min", "max"]);
|
|
14889
|
+
|
|
14890
|
+
const d = typeof value === "string" ? parseISO(value) : value;
|
|
14891
|
+
|
|
14892
|
+
const onDateChange = (name, value) => {
|
|
14893
|
+
props.onChange(name, parseISO(value));
|
|
14894
|
+
};
|
|
14873
14895
|
|
|
14874
|
-
const d = typeof value === "string" ? new Date(value) : value;
|
|
14875
14896
|
return jsx(GoAInput, Object.assign({}, props, {
|
|
14897
|
+
onChange: onDateChange,
|
|
14876
14898
|
value: format(d, "yyyy-MM-dd'T'hh:mm"),
|
|
14877
14899
|
type: "datetime-local"
|
|
14878
14900
|
}), void 0);
|
|
@@ -14916,13 +14938,18 @@ const GoAInputMonth = props => {
|
|
|
14916
14938
|
};
|
|
14917
14939
|
const GoAInputNumber = _a => {
|
|
14918
14940
|
var {
|
|
14919
|
-
min,
|
|
14920
|
-
max,
|
|
14941
|
+
min = Number.MIN_VALUE,
|
|
14942
|
+
max = Number.MAX_VALUE,
|
|
14921
14943
|
value
|
|
14922
14944
|
} = _a,
|
|
14923
14945
|
props = __rest(_a, ["min", "max", "value"]);
|
|
14924
14946
|
|
|
14947
|
+
const onNumberChange = (name, value) => {
|
|
14948
|
+
props.onChange(name, parseInt(value));
|
|
14949
|
+
};
|
|
14950
|
+
|
|
14925
14951
|
return jsx(GoAInput, Object.assign({}, props, {
|
|
14952
|
+
onChange: onNumberChange,
|
|
14926
14953
|
min: min === null || min === void 0 ? void 0 : min.toString(),
|
|
14927
14954
|
max: max === null || max === void 0 ? void 0 : max.toString(),
|
|
14928
14955
|
value: value.toString(),
|
package/react-components.umd.js
CHANGED
|
@@ -1203,7 +1203,7 @@
|
|
|
1203
1203
|
ctx[2]);
|
|
1204
1204
|
attr(div2, "style", div2_style_value = `--max-content-width: ${
|
|
1205
1205
|
/*maxcontentwidth*/
|
|
1206
|
-
ctx[3] || "
|
|
1206
|
+
ctx[3] || "100%"}`);
|
|
1207
1207
|
},
|
|
1208
1208
|
|
|
1209
1209
|
m(target, anchor) {
|
|
@@ -1239,7 +1239,7 @@
|
|
|
1239
1239
|
/*maxcontentwidth*/
|
|
1240
1240
|
8 && div2_style_value !== (div2_style_value = `--max-content-width: ${
|
|
1241
1241
|
/*maxcontentwidth*/
|
|
1242
|
-
ctx[3] || "
|
|
1242
|
+
ctx[3] || "100%"}`)) {
|
|
1243
1243
|
attr(div2, "style", div2_style_value);
|
|
1244
1244
|
}
|
|
1245
1245
|
},
|
|
@@ -7022,7 +7022,7 @@
|
|
|
7022
7022
|
attr(div5, "class", "app-footer");
|
|
7023
7023
|
attr(div5, "style", div5_style_value = `--max-content-width: ${
|
|
7024
7024
|
/*maxcontentwidth*/
|
|
7025
|
-
ctx[0] || "
|
|
7025
|
+
ctx[0] || "100%"}`);
|
|
7026
7026
|
},
|
|
7027
7027
|
|
|
7028
7028
|
m(target, anchor) {
|
|
@@ -7084,7 +7084,7 @@
|
|
|
7084
7084
|
/*maxcontentwidth*/
|
|
7085
7085
|
1 && div5_style_value !== (div5_style_value = `--max-content-width: ${
|
|
7086
7086
|
/*maxcontentwidth*/
|
|
7087
|
-
ctx[0] || "
|
|
7087
|
+
ctx[0] || "100%"}`)) {
|
|
7088
7088
|
attr(div5, "style", div5_style_value);
|
|
7089
7089
|
}
|
|
7090
7090
|
},
|
|
@@ -7137,7 +7137,7 @@
|
|
|
7137
7137
|
class Footer extends SvelteElement {
|
|
7138
7138
|
constructor(options) {
|
|
7139
7139
|
super();
|
|
7140
|
-
this.shadowRoot.innerHTML = `<style>*{box-sizing:border-box}.app-footer{background-color:var(--color-gray-100);border-top:2px solid var(--color-gray-200);border-bottom:1rem solid var(--goa-color-brand)}.content{padding:2rem 1rem;margin:0 auto;width:min(var(--max-content-width),
|
|
7140
|
+
this.shadowRoot.innerHTML = `<style>*{box-sizing:border-box}.app-footer{background-color:var(--color-gray-100);border-top:2px solid var(--color-gray-200);border-bottom:1rem solid var(--goa-color-brand)}.content{padding:2rem 1rem;margin:0 auto;width:min(var(--max-content-width), 100%)}@media(min-width: 640px){.content{padding:2rem 1.5rem}}.meta-section{display:flex;flex-direction:column;padding:1rem 0}.meta-section.with-meta-links{gap:2rem;justify-content:space-between}.meta-links{display:none}.with-meta-links .meta-links{display:block}.nav-links{display:flex;flex-direction:column;gap:2rem}.abgov{display:flex;flex-direction:column;justify-content:space-between;width:100%}@media(min-width: 640px){.meta-section{flex-direction:row;gap:2rem}.nav-links{flex-direction:row}.abgov{align-items:center;flex-direction:row-reverse}}.abgov.with-meta-links{gap:1rem;flex-direction:column;width:unset}@media(min-width: 640px){.abgov.with-meta-links{align-items:flex-end}}.goa-copyright{white-space:nowrap}a{color:var(--goa-color-text-secondary)}</style>`;
|
|
7141
7141
|
init(this, {
|
|
7142
7142
|
target: this.shadowRoot,
|
|
7143
7143
|
props: attribute_to_object(this.attributes),
|
|
@@ -10272,7 +10272,7 @@
|
|
|
10272
10272
|
}
|
|
10273
10273
|
|
|
10274
10274
|
};
|
|
10275
|
-
} // (
|
|
10275
|
+
} // (55:8) {#if heading}
|
|
10276
10276
|
|
|
10277
10277
|
|
|
10278
10278
|
function create_if_block_3(ctx) {
|
|
@@ -10306,7 +10306,7 @@
|
|
|
10306
10306
|
}
|
|
10307
10307
|
|
|
10308
10308
|
};
|
|
10309
|
-
} // (
|
|
10309
|
+
} // (58:8) {#if isClosable}
|
|
10310
10310
|
|
|
10311
10311
|
|
|
10312
10312
|
function create_if_block_2$2(ctx) {
|
|
@@ -10344,7 +10344,7 @@
|
|
|
10344
10344
|
}
|
|
10345
10345
|
|
|
10346
10346
|
};
|
|
10347
|
-
} // (
|
|
10347
|
+
} // (72:10) {:else}
|
|
10348
10348
|
|
|
10349
10349
|
|
|
10350
10350
|
function create_else_block$1(ctx) {
|
|
@@ -10365,7 +10365,7 @@
|
|
|
10365
10365
|
}
|
|
10366
10366
|
|
|
10367
10367
|
};
|
|
10368
|
-
} // (
|
|
10368
|
+
} // (68:10) {#if isScrollable}
|
|
10369
10369
|
|
|
10370
10370
|
|
|
10371
10371
|
function create_if_block_1$3(ctx) {
|
|
@@ -10480,9 +10480,6 @@
|
|
|
10480
10480
|
let {
|
|
10481
10481
|
width
|
|
10482
10482
|
} = $$props;
|
|
10483
|
-
onMount(() => {
|
|
10484
|
-
console.log("in the modal v2");
|
|
10485
|
-
});
|
|
10486
10483
|
|
|
10487
10484
|
function close(e) {
|
|
10488
10485
|
if (!isClosable) {
|
|
@@ -13678,7 +13675,7 @@
|
|
|
13678
13675
|
attr(div, "style", div_style_value = `
|
|
13679
13676
|
--max-content-width: ${
|
|
13680
13677
|
/*maxcontentwidth*/
|
|
13681
|
-
ctx[1] || "
|
|
13678
|
+
ctx[1] || "100%"};
|
|
13682
13679
|
--nav-column-width: ${
|
|
13683
13680
|
/*navcolumnwidth*/
|
|
13684
13681
|
ctx[0] || "var(--layout-nav-column-width)"};
|
|
@@ -13700,7 +13697,7 @@
|
|
|
13700
13697
|
3 && div_style_value !== (div_style_value = `
|
|
13701
13698
|
--max-content-width: ${
|
|
13702
13699
|
/*maxcontentwidth*/
|
|
13703
|
-
ctx[1] || "
|
|
13700
|
+
ctx[1] || "100%"};
|
|
13704
13701
|
--nav-column-width: ${
|
|
13705
13702
|
/*navcolumnwidth*/
|
|
13706
13703
|
ctx[0] || "var(--layout-nav-column-width)"};
|
|
@@ -14873,46 +14870,73 @@
|
|
|
14873
14870
|
};
|
|
14874
14871
|
var GoAInputDate = function GoAInputDate(_a) {
|
|
14875
14872
|
var value = _a.value,
|
|
14876
|
-
|
|
14877
|
-
|
|
14873
|
+
_b = _a.min,
|
|
14874
|
+
min = _b === void 0 ? "" : _b,
|
|
14875
|
+
_c = _a.max,
|
|
14876
|
+
max = _c === void 0 ? "" : _c,
|
|
14878
14877
|
props = __rest(_a, ["value", "min", "max"]);
|
|
14879
14878
|
|
|
14880
|
-
var
|
|
14879
|
+
var _format = function _format(value) {
|
|
14880
|
+
return dateFns.format(value, "yyyy-MM-dd");
|
|
14881
|
+
};
|
|
14881
14882
|
|
|
14882
|
-
var
|
|
14883
|
+
var _value = _format(typeof value === "string" ? dateFns.parseISO(value) : value);
|
|
14883
14884
|
|
|
14884
|
-
var
|
|
14885
|
+
var _min = min && _format(typeof min === "string" ? dateFns.parseISO(min) : min);
|
|
14886
|
+
|
|
14887
|
+
var _max = max && _format(typeof max === "string" ? dateFns.parseISO(max) : max);
|
|
14888
|
+
|
|
14889
|
+
var onDateChange = function onDateChange(name, value) {
|
|
14890
|
+
props.onChange(name, dateFns.parseISO(value));
|
|
14891
|
+
};
|
|
14885
14892
|
|
|
14886
14893
|
return jsxRuntime.jsx(GoAInput, __assign({}, props, {
|
|
14894
|
+
onChange: onDateChange,
|
|
14887
14895
|
min: _min,
|
|
14888
14896
|
max: _max,
|
|
14889
|
-
value:
|
|
14897
|
+
value: _value,
|
|
14890
14898
|
type: "date"
|
|
14891
14899
|
}), void 0);
|
|
14892
14900
|
};
|
|
14893
14901
|
var GoAInputTime = function GoAInputTime(_a) {
|
|
14894
|
-
var value = _a.value
|
|
14895
|
-
|
|
14902
|
+
var value = _a.value;
|
|
14903
|
+
_a.min;
|
|
14904
|
+
_a.max;
|
|
14905
|
+
var props = __rest(_a, ["value", "min", "max"]);
|
|
14906
|
+
|
|
14907
|
+
var onDateChange = function onDateChange(name, value) {
|
|
14908
|
+
props.onChange(name, dateFns.parseISO(value));
|
|
14909
|
+
};
|
|
14896
14910
|
|
|
14897
14911
|
try {
|
|
14898
|
-
var d = typeof value === "string" ?
|
|
14912
|
+
var d = typeof value === "string" ? dateFns.parseISO(value) : value;
|
|
14899
14913
|
return jsxRuntime.jsx(GoAInput, __assign({}, props, {
|
|
14914
|
+
onChange: onDateChange,
|
|
14900
14915
|
value: dateFns.format(d, "hh:mm"),
|
|
14901
14916
|
type: "time"
|
|
14902
14917
|
}), void 0);
|
|
14903
14918
|
} catch (e) {
|
|
14904
14919
|
return jsxRuntime.jsx(GoAInput, __assign({}, props, {
|
|
14920
|
+
onChange: onDateChange,
|
|
14905
14921
|
value: value,
|
|
14906
14922
|
type: "time"
|
|
14907
14923
|
}), void 0);
|
|
14908
14924
|
}
|
|
14909
14925
|
};
|
|
14910
14926
|
var GoAInputDateTime = function GoAInputDateTime(_a) {
|
|
14911
|
-
var value = _a.value
|
|
14912
|
-
|
|
14927
|
+
var value = _a.value;
|
|
14928
|
+
_a.min;
|
|
14929
|
+
_a.max;
|
|
14930
|
+
var props = __rest(_a, ["value", "min", "max"]);
|
|
14931
|
+
|
|
14932
|
+
var d = typeof value === "string" ? dateFns.parseISO(value) : value;
|
|
14933
|
+
|
|
14934
|
+
var onDateChange = function onDateChange(name, value) {
|
|
14935
|
+
props.onChange(name, dateFns.parseISO(value));
|
|
14936
|
+
};
|
|
14913
14937
|
|
|
14914
|
-
var d = typeof value === "string" ? new Date(value) : value;
|
|
14915
14938
|
return jsxRuntime.jsx(GoAInput, __assign({}, props, {
|
|
14939
|
+
onChange: onDateChange,
|
|
14916
14940
|
value: dateFns.format(d, "yyyy-MM-dd'T'hh:mm"),
|
|
14917
14941
|
type: "datetime-local"
|
|
14918
14942
|
}), void 0);
|
|
@@ -14957,12 +14981,19 @@
|
|
|
14957
14981
|
}), void 0);
|
|
14958
14982
|
};
|
|
14959
14983
|
var GoAInputNumber = function GoAInputNumber(_a) {
|
|
14960
|
-
var
|
|
14961
|
-
|
|
14984
|
+
var _b = _a.min,
|
|
14985
|
+
min = _b === void 0 ? Number.MIN_VALUE : _b,
|
|
14986
|
+
_c = _a.max,
|
|
14987
|
+
max = _c === void 0 ? Number.MAX_VALUE : _c,
|
|
14962
14988
|
value = _a.value,
|
|
14963
14989
|
props = __rest(_a, ["min", "max", "value"]);
|
|
14964
14990
|
|
|
14991
|
+
var onNumberChange = function onNumberChange(name, value) {
|
|
14992
|
+
props.onChange(name, parseInt(value));
|
|
14993
|
+
};
|
|
14994
|
+
|
|
14965
14995
|
return jsxRuntime.jsx(GoAInput, __assign({}, props, {
|
|
14996
|
+
onChange: onNumberChange,
|
|
14966
14997
|
min: min === null || min === void 0 ? void 0 : min.toString(),
|
|
14967
14998
|
max: max === null || max === void 0 ? void 0 : max.toString(),
|
|
14968
14999
|
value: value.toString(),
|