@htmlbricks/hb-input-datetime 0.20.17 → 0.50.0-alpha.0
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/main.iife.js +76 -0
- package/{release/manifest.json → manifest.json} +47 -144
- package/package.json +14 -82
- package/types/webcomponent.type.d.json +83 -0
- package/types/webcomponent_events.type.d.json +66 -0
- package/LICENSE.md +0 -68
- package/README.md +0 -1
- package/extra/docs.ts +0 -137
- package/release/docs.js +0 -132
- package/release/docs.js.map +0 -1
- package/release/docs.ts +0 -137
- package/release/release.js +0 -2
- package/release/release.js.map +0 -1
- package/release/webcomponent.type.d.ts +0 -48
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/Events",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"Events": {
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"clickEnter": {
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"properties": {
|
|
11
|
+
"id": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"valid": {
|
|
15
|
+
"type": "boolean"
|
|
16
|
+
},
|
|
17
|
+
"value": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": [
|
|
22
|
+
"value",
|
|
23
|
+
"valid"
|
|
24
|
+
],
|
|
25
|
+
"type": "object"
|
|
26
|
+
},
|
|
27
|
+
"setValid": {
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"properties": {
|
|
30
|
+
"id": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"valid": {
|
|
34
|
+
"type": "boolean"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"required": [
|
|
38
|
+
"valid"
|
|
39
|
+
],
|
|
40
|
+
"type": "object"
|
|
41
|
+
},
|
|
42
|
+
"setValue": {
|
|
43
|
+
"additionalProperties": false,
|
|
44
|
+
"properties": {
|
|
45
|
+
"id": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
},
|
|
48
|
+
"value": {
|
|
49
|
+
"type": "string"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"required": [
|
|
53
|
+
"value"
|
|
54
|
+
],
|
|
55
|
+
"type": "object"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"required": [
|
|
59
|
+
"setValue",
|
|
60
|
+
"setValid",
|
|
61
|
+
"clickEnter"
|
|
62
|
+
],
|
|
63
|
+
"type": "object"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
package/LICENSE.md
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
## MIT License
|
|
2
|
-
|
|
3
|
-
> Code and Contributions
|
|
4
|
-
|
|
5
|
-
Copyright (c) 2021 Dario Caruso (dottgonzo)
|
|
6
|
-
|
|
7
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
in the Software without restriction, including without limitation the rights
|
|
10
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
furnished to do so, subject to the following conditions:
|
|
13
|
-
|
|
14
|
-
The above copyright notice and this permission notice shall be included in all
|
|
15
|
-
copies or substantial portions of the Software.
|
|
16
|
-
|
|
17
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
-
SOFTWARE.
|
|
24
|
-
|
|
25
|
-
##### https://choosealicense.com/licenses/mit/
|
|
26
|
-
|
|
27
|
-
## Creative Commons BY-NC 4.0 License
|
|
28
|
-
|
|
29
|
-
> Images, assets and logos
|
|
30
|
-
|
|
31
|
-
Copyleft (c) 2021 Dario Caruso (dottgonzo)
|
|
32
|
-
|
|
33
|
-
#### You are free to:
|
|
34
|
-
|
|
35
|
-
- Share — copy and redistribute the material in any medium or format
|
|
36
|
-
- Adapt — remix, transform, and build upon the material
|
|
37
|
-
|
|
38
|
-
The licensor cannot revoke these freedoms as long as you follow the license terms.
|
|
39
|
-
|
|
40
|
-
#### Under the following terms:
|
|
41
|
-
|
|
42
|
-
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that - suggests the licensor endorses you or your use.
|
|
43
|
-
- NonCommercial — You may not use the material for commercial purposes.
|
|
44
|
-
|
|
45
|
-
No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
|
|
46
|
-
|
|
47
|
-
##### https://creativecommons.org/licenses/by-nc/4.0/
|
|
48
|
-
|
|
49
|
-
## Creative Commons BY 4.0 License
|
|
50
|
-
|
|
51
|
-
> Documentation and Translations
|
|
52
|
-
|
|
53
|
-
Copyleft (c) 2021 Dario Caruso (dottgonzo)
|
|
54
|
-
|
|
55
|
-
#### You are free to:
|
|
56
|
-
|
|
57
|
-
- Share — copy and redistribute the material in any medium or format
|
|
58
|
-
- Adapt — remix, transform, and build upon the material for any purpose, even commercially.
|
|
59
|
-
|
|
60
|
-
The licensor cannot revoke these freedoms as long as you follow the license terms.
|
|
61
|
-
|
|
62
|
-
#### Under the following terms:
|
|
63
|
-
|
|
64
|
-
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
|
|
65
|
-
|
|
66
|
-
No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
|
|
67
|
-
|
|
68
|
-
##### https://creativecommons.org/licenses/by/4.0/
|
package/README.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# input-datetime web component
|
package/extra/docs.ts
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import type { CssPart, CssVar, HtmlSlot, i18nLang, StyleSetup, ComponentSetup } from "wc-js-utils/main";
|
|
2
|
-
import type { Component } from "../app/types/webcomponent.type";
|
|
3
|
-
|
|
4
|
-
export const storybookArgs = {
|
|
5
|
-
schemaentry: { control: { type: "object" } },
|
|
6
|
-
show_validation: { control: { type: "boolean" } },
|
|
7
|
-
set_valid: { control: { type: "boolean" } },
|
|
8
|
-
set_value: { control: { type: "boolean" } },
|
|
9
|
-
setValid: { action: "setValid" },
|
|
10
|
-
setValue: { action: "setValue" },
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const cssVars: CssVar[] = [
|
|
14
|
-
{ name: "--bs-primary", valueType: "color", theme: "bootstrap", defaultValue: "#07689f" },
|
|
15
|
-
{ name: "--bs-secondary", valueType: "color", theme: "bootstrap", defaultValue: "#c9d6df" },
|
|
16
|
-
{ name: "--bs-success", valueType: "color", theme: "bootstrap", defaultValue: "#11d3bc" },
|
|
17
|
-
{ name: "--bs-info", valueType: "color", theme: "bootstrap", defaultValue: "#a2d5f2" },
|
|
18
|
-
{ name: "--bs-warning", valueType: "color", theme: "bootstrap", defaultValue: "#ffc107" },
|
|
19
|
-
{ name: "--bs-danger", valueType: "color", theme: "bootstrap", defaultValue: "#f67280" },
|
|
20
|
-
];
|
|
21
|
-
export const cssParts: CssPart[] = [{ name: "invalid-feedback", description: "" }];
|
|
22
|
-
export const htmlSlots: HtmlSlot[] = [];
|
|
23
|
-
export const i18nLanguages: i18nLang[] = [];
|
|
24
|
-
|
|
25
|
-
export const styleSetup: StyleSetup = {
|
|
26
|
-
vars: cssVars,
|
|
27
|
-
parts: cssParts,
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const examples: { name: string; description?: string; data: Component }[] = [
|
|
31
|
-
{
|
|
32
|
-
name: "empty",
|
|
33
|
-
data: {
|
|
34
|
-
schemaentry: {
|
|
35
|
-
placeholder: "Insert your last name here...",
|
|
36
|
-
id: "lastName",
|
|
37
|
-
label: "Last Name",
|
|
38
|
-
validationTip: "This field cannot be empty.",
|
|
39
|
-
params: {
|
|
40
|
-
removeSeconds: true,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: "emptyRequired",
|
|
47
|
-
data: {
|
|
48
|
-
schemaentry: {
|
|
49
|
-
placeholder: "Insert your last name here...",
|
|
50
|
-
id: "lastName",
|
|
51
|
-
required: true,
|
|
52
|
-
label: "Last Name",
|
|
53
|
-
validationTip: "This field cannot be empty.",
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
name: "withValue",
|
|
59
|
-
data: {
|
|
60
|
-
schemaentry: {
|
|
61
|
-
placeholder: "Insert your last name here...",
|
|
62
|
-
id: "lastName",
|
|
63
|
-
required: true,
|
|
64
|
-
label: "Last Name",
|
|
65
|
-
validationTip: "This field cannot be empty.",
|
|
66
|
-
value: "2022-06-23T05:09:08.107Z",
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
name: "maxDate27Feb2023",
|
|
72
|
-
data: {
|
|
73
|
-
schemaentry: {
|
|
74
|
-
placeholder: "Insert your last name here...",
|
|
75
|
-
id: "lastName",
|
|
76
|
-
required: true,
|
|
77
|
-
label: "Last Name",
|
|
78
|
-
validationTip: "This field cannot be empty.",
|
|
79
|
-
params: {
|
|
80
|
-
max: "2023-02-27T00:00:00.000Z",
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
name: "minDate27Feb2023",
|
|
87
|
-
data: {
|
|
88
|
-
schemaentry: {
|
|
89
|
-
placeholder: "Insert your last name here...",
|
|
90
|
-
id: "lastName",
|
|
91
|
-
required: true,
|
|
92
|
-
label: "Last Name",
|
|
93
|
-
validationTip: "This field cannot be empty.",
|
|
94
|
-
params: {
|
|
95
|
-
min: "2023-02-27T00:00:00.000Z",
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
name: "rangeDate27Feb2023",
|
|
102
|
-
data: {
|
|
103
|
-
schemaentry: {
|
|
104
|
-
placeholder: "Insert your last name here...",
|
|
105
|
-
id: "lastName",
|
|
106
|
-
required: true,
|
|
107
|
-
label: "Last Name",
|
|
108
|
-
validationTip: "This field cannot be empty.",
|
|
109
|
-
params: {
|
|
110
|
-
min: "2023-02-27T00:00:00.000Z",
|
|
111
|
-
max: "2023-02-27T23:59:59.999Z",
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
];
|
|
117
|
-
export const componentSetup: ComponentSetup & { examples: { name: string; description?: string; data: Component }[] } = {
|
|
118
|
-
definitions: null as any,
|
|
119
|
-
storybookArgs,
|
|
120
|
-
styleSetup,
|
|
121
|
-
author: null as any,
|
|
122
|
-
contributors: [],
|
|
123
|
-
owner: null as any,
|
|
124
|
-
htmlSlots,
|
|
125
|
-
i18n: i18nLanguages,
|
|
126
|
-
examples,
|
|
127
|
-
screenshots: [],
|
|
128
|
-
licenses: [{ type: "Apache-2.0", path: "LICENSE.md", cost: 0, currency: "EUR" }],
|
|
129
|
-
readmePath: "README.md",
|
|
130
|
-
name: "hb-input-datetime",
|
|
131
|
-
category: "input",
|
|
132
|
-
tags: ["input"],
|
|
133
|
-
size: {},
|
|
134
|
-
iifePath: "release/release.js",
|
|
135
|
-
repoName: "@htmlbricks/hb-input-datetime",
|
|
136
|
-
version: null as any,
|
|
137
|
-
};
|
package/release/docs.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
export var storybookArgs = {
|
|
2
|
-
schemaentry: { control: { type: "object" } },
|
|
3
|
-
show_validation: { control: { type: "boolean" } },
|
|
4
|
-
set_valid: { control: { type: "boolean" } },
|
|
5
|
-
set_value: { control: { type: "boolean" } },
|
|
6
|
-
setValid: { action: "setValid" },
|
|
7
|
-
setValue: { action: "setValue" }
|
|
8
|
-
};
|
|
9
|
-
var cssVars = [
|
|
10
|
-
{ name: "--bs-primary", valueType: "color", theme: "bootstrap", defaultValue: "#07689f" },
|
|
11
|
-
{ name: "--bs-secondary", valueType: "color", theme: "bootstrap", defaultValue: "#c9d6df" },
|
|
12
|
-
{ name: "--bs-success", valueType: "color", theme: "bootstrap", defaultValue: "#11d3bc" },
|
|
13
|
-
{ name: "--bs-info", valueType: "color", theme: "bootstrap", defaultValue: "#a2d5f2" },
|
|
14
|
-
{ name: "--bs-warning", valueType: "color", theme: "bootstrap", defaultValue: "#ffc107" },
|
|
15
|
-
{ name: "--bs-danger", valueType: "color", theme: "bootstrap", defaultValue: "#f67280" },
|
|
16
|
-
];
|
|
17
|
-
export var cssParts = [{ name: "invalid-feedback", description: "" }];
|
|
18
|
-
export var htmlSlots = [];
|
|
19
|
-
export var i18nLanguages = [];
|
|
20
|
-
export var styleSetup = {
|
|
21
|
-
vars: cssVars,
|
|
22
|
-
parts: cssParts
|
|
23
|
-
};
|
|
24
|
-
var examples = [
|
|
25
|
-
{
|
|
26
|
-
name: "empty",
|
|
27
|
-
data: {
|
|
28
|
-
schemaentry: {
|
|
29
|
-
placeholder: "Insert your last name here...",
|
|
30
|
-
id: "lastName",
|
|
31
|
-
label: "Last Name",
|
|
32
|
-
validationTip: "This field cannot be empty.",
|
|
33
|
-
params: {
|
|
34
|
-
removeSeconds: true
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
name: "emptyRequired",
|
|
41
|
-
data: {
|
|
42
|
-
schemaentry: {
|
|
43
|
-
placeholder: "Insert your last name here...",
|
|
44
|
-
id: "lastName",
|
|
45
|
-
required: true,
|
|
46
|
-
label: "Last Name",
|
|
47
|
-
validationTip: "This field cannot be empty."
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
name: "withValue",
|
|
53
|
-
data: {
|
|
54
|
-
schemaentry: {
|
|
55
|
-
placeholder: "Insert your last name here...",
|
|
56
|
-
id: "lastName",
|
|
57
|
-
required: true,
|
|
58
|
-
label: "Last Name",
|
|
59
|
-
validationTip: "This field cannot be empty.",
|
|
60
|
-
value: "2022-06-23T05:09:08.107Z"
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
name: "maxDate27Feb2023",
|
|
66
|
-
data: {
|
|
67
|
-
schemaentry: {
|
|
68
|
-
placeholder: "Insert your last name here...",
|
|
69
|
-
id: "lastName",
|
|
70
|
-
required: true,
|
|
71
|
-
label: "Last Name",
|
|
72
|
-
validationTip: "This field cannot be empty.",
|
|
73
|
-
params: {
|
|
74
|
-
max: "2023-02-27T00:00:00.000Z"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
name: "minDate27Feb2023",
|
|
81
|
-
data: {
|
|
82
|
-
schemaentry: {
|
|
83
|
-
placeholder: "Insert your last name here...",
|
|
84
|
-
id: "lastName",
|
|
85
|
-
required: true,
|
|
86
|
-
label: "Last Name",
|
|
87
|
-
validationTip: "This field cannot be empty.",
|
|
88
|
-
params: {
|
|
89
|
-
min: "2023-02-27T00:00:00.000Z"
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
name: "rangeDate27Feb2023",
|
|
96
|
-
data: {
|
|
97
|
-
schemaentry: {
|
|
98
|
-
placeholder: "Insert your last name here...",
|
|
99
|
-
id: "lastName",
|
|
100
|
-
required: true,
|
|
101
|
-
label: "Last Name",
|
|
102
|
-
validationTip: "This field cannot be empty.",
|
|
103
|
-
params: {
|
|
104
|
-
min: "2023-02-27T00:00:00.000Z",
|
|
105
|
-
max: "2023-02-27T23:59:59.999Z"
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
];
|
|
111
|
-
export var componentSetup = {
|
|
112
|
-
definitions: null,
|
|
113
|
-
storybookArgs: storybookArgs,
|
|
114
|
-
styleSetup: styleSetup,
|
|
115
|
-
author: null,
|
|
116
|
-
contributors: [],
|
|
117
|
-
owner: null,
|
|
118
|
-
htmlSlots: htmlSlots,
|
|
119
|
-
i18n: i18nLanguages,
|
|
120
|
-
examples: examples,
|
|
121
|
-
screenshots: [],
|
|
122
|
-
licenses: [{ type: "Apache-2.0", path: "LICENSE.md", cost: 0, currency: "EUR" }],
|
|
123
|
-
readmePath: "README.md",
|
|
124
|
-
name: "hb-input-datetime",
|
|
125
|
-
category: "input",
|
|
126
|
-
tags: ["input"],
|
|
127
|
-
size: {},
|
|
128
|
-
iifePath: "release/release.js",
|
|
129
|
-
repoName: "@htmlbricks/hb-input-datetime",
|
|
130
|
-
version: null
|
|
131
|
-
};
|
|
132
|
-
//# sourceMappingURL=docs.js.map
|
package/release/docs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"docs.js","sourceRoot":"","sources":["../extra/docs.ts"],"names":[],"mappings":"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"}
|
package/release/docs.ts
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import type { CssPart, CssVar, HtmlSlot, i18nLang, StyleSetup, ComponentSetup } from "wc-js-utils/main";
|
|
2
|
-
import type { Component } from "../app/types/webcomponent.type";
|
|
3
|
-
|
|
4
|
-
export const storybookArgs = {
|
|
5
|
-
schemaentry: { control: { type: "object" } },
|
|
6
|
-
show_validation: { control: { type: "boolean" } },
|
|
7
|
-
set_valid: { control: { type: "boolean" } },
|
|
8
|
-
set_value: { control: { type: "boolean" } },
|
|
9
|
-
setValid: { action: "setValid" },
|
|
10
|
-
setValue: { action: "setValue" },
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const cssVars: CssVar[] = [
|
|
14
|
-
{ name: "--bs-primary", valueType: "color", theme: "bootstrap", defaultValue: "#07689f" },
|
|
15
|
-
{ name: "--bs-secondary", valueType: "color", theme: "bootstrap", defaultValue: "#c9d6df" },
|
|
16
|
-
{ name: "--bs-success", valueType: "color", theme: "bootstrap", defaultValue: "#11d3bc" },
|
|
17
|
-
{ name: "--bs-info", valueType: "color", theme: "bootstrap", defaultValue: "#a2d5f2" },
|
|
18
|
-
{ name: "--bs-warning", valueType: "color", theme: "bootstrap", defaultValue: "#ffc107" },
|
|
19
|
-
{ name: "--bs-danger", valueType: "color", theme: "bootstrap", defaultValue: "#f67280" },
|
|
20
|
-
];
|
|
21
|
-
export const cssParts: CssPart[] = [{ name: "invalid-feedback", description: "" }];
|
|
22
|
-
export const htmlSlots: HtmlSlot[] = [];
|
|
23
|
-
export const i18nLanguages: i18nLang[] = [];
|
|
24
|
-
|
|
25
|
-
export const styleSetup: StyleSetup = {
|
|
26
|
-
vars: cssVars,
|
|
27
|
-
parts: cssParts,
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const examples: { name: string; description?: string; data: Component }[] = [
|
|
31
|
-
{
|
|
32
|
-
name: "empty",
|
|
33
|
-
data: {
|
|
34
|
-
schemaentry: {
|
|
35
|
-
placeholder: "Insert your last name here...",
|
|
36
|
-
id: "lastName",
|
|
37
|
-
label: "Last Name",
|
|
38
|
-
validationTip: "This field cannot be empty.",
|
|
39
|
-
params: {
|
|
40
|
-
removeSeconds: true,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: "emptyRequired",
|
|
47
|
-
data: {
|
|
48
|
-
schemaentry: {
|
|
49
|
-
placeholder: "Insert your last name here...",
|
|
50
|
-
id: "lastName",
|
|
51
|
-
required: true,
|
|
52
|
-
label: "Last Name",
|
|
53
|
-
validationTip: "This field cannot be empty.",
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
name: "withValue",
|
|
59
|
-
data: {
|
|
60
|
-
schemaentry: {
|
|
61
|
-
placeholder: "Insert your last name here...",
|
|
62
|
-
id: "lastName",
|
|
63
|
-
required: true,
|
|
64
|
-
label: "Last Name",
|
|
65
|
-
validationTip: "This field cannot be empty.",
|
|
66
|
-
value: "2022-06-23T05:09:08.107Z",
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
name: "maxDate27Feb2023",
|
|
72
|
-
data: {
|
|
73
|
-
schemaentry: {
|
|
74
|
-
placeholder: "Insert your last name here...",
|
|
75
|
-
id: "lastName",
|
|
76
|
-
required: true,
|
|
77
|
-
label: "Last Name",
|
|
78
|
-
validationTip: "This field cannot be empty.",
|
|
79
|
-
params: {
|
|
80
|
-
max: "2023-02-27T00:00:00.000Z",
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
name: "minDate27Feb2023",
|
|
87
|
-
data: {
|
|
88
|
-
schemaentry: {
|
|
89
|
-
placeholder: "Insert your last name here...",
|
|
90
|
-
id: "lastName",
|
|
91
|
-
required: true,
|
|
92
|
-
label: "Last Name",
|
|
93
|
-
validationTip: "This field cannot be empty.",
|
|
94
|
-
params: {
|
|
95
|
-
min: "2023-02-27T00:00:00.000Z",
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
name: "rangeDate27Feb2023",
|
|
102
|
-
data: {
|
|
103
|
-
schemaentry: {
|
|
104
|
-
placeholder: "Insert your last name here...",
|
|
105
|
-
id: "lastName",
|
|
106
|
-
required: true,
|
|
107
|
-
label: "Last Name",
|
|
108
|
-
validationTip: "This field cannot be empty.",
|
|
109
|
-
params: {
|
|
110
|
-
min: "2023-02-27T00:00:00.000Z",
|
|
111
|
-
max: "2023-02-27T23:59:59.999Z",
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
];
|
|
117
|
-
export const componentSetup: ComponentSetup & { examples: { name: string; description?: string; data: Component }[] } = {
|
|
118
|
-
definitions: null as any,
|
|
119
|
-
storybookArgs,
|
|
120
|
-
styleSetup,
|
|
121
|
-
author: null as any,
|
|
122
|
-
contributors: [],
|
|
123
|
-
owner: null as any,
|
|
124
|
-
htmlSlots,
|
|
125
|
-
i18n: i18nLanguages,
|
|
126
|
-
examples,
|
|
127
|
-
screenshots: [],
|
|
128
|
-
licenses: [{ type: "Apache-2.0", path: "LICENSE.md", cost: 0, currency: "EUR" }],
|
|
129
|
-
readmePath: "README.md",
|
|
130
|
-
name: "hb-input-datetime",
|
|
131
|
-
category: "input",
|
|
132
|
-
tags: ["input"],
|
|
133
|
-
size: {},
|
|
134
|
-
iifePath: "release/release.js",
|
|
135
|
-
repoName: "@htmlbricks/hb-input-datetime",
|
|
136
|
-
version: null as any,
|
|
137
|
-
};
|
package/release/release.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var release=function(){"use strict";function e(){}function t(e){return e()}function n(){return Object.create(null)}function o(e){e.forEach(t)}function r(e){return"function"==typeof e}function a(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function i(e,t){e.appendChild(t)}function s(e,t,n){e.insertBefore(t,n||null)}function l(e){e.parentNode&&e.parentNode.removeChild(e)}function d(e){return document.createElement(e)}function c(e){return document.createTextNode(e)}function u(){return c(" ")}function f(){return c("")}function m(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function p(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function b(e,t,n){t in e?e[t]="boolean"==typeof e[t]&&""===n||n:p(e,t,n)}function h(e){const t={};for(const n of e)t[n.name]=n.value;return t}let v;function g(e){v=e}function y(){if(!v)throw new Error("Function called outside component initialization");return v}function w(){const e=y();return(t,n,{cancelable:o=!1}={})=>{const r=e.$$.callbacks[t];if(r){const a=function(e,t,{bubbles:n=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(e,n,o,t),r}(t,n,{cancelable:o});return r.slice().forEach((t=>{t.call(e,a)})),!a.defaultPrevented}return!0}}const $=[],k=[];let x=[];const _=[],S=Promise.resolve();let E=!1;function T(e){x.push(e)}const C=new Set;let N=0;function O(){if(0!==N)return;const e=v;do{try{for(;N<$.length;){const e=$[N];N++,g(e),V(e.$$)}}catch(e){throw $.length=0,N=0,e}for(g(null),$.length=0,N=0;k.length;)k.pop()();for(let e=0;e<x.length;e+=1){const t=x[e];C.has(t)||(C.add(t),t())}x.length=0}while($.length);for(;_.length;)_.pop()();E=!1,C.clear(),g(e)}function V(e){if(null!==e.fragment){e.update(),o(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(T)}}const L=new Set;function D(e,t){const n=e.$$;null!==n.fragment&&(!function(e){const t=[],n=[];x.forEach((o=>-1===e.indexOf(o)?t.push(o):n.push(o))),n.forEach((e=>e())),x=t}(n.after_update),o(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function M(e,t){-1===e.$$.dirty[0]&&($.push(e),E||(E=!0,S.then(O)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function A(a,i,s,d,c,u,f,m=[-1]){const p=v;g(a);const b=a.$$={fragment:null,ctx:[],props:u,update:e,not_equal:c,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i.context||(p?p.$$.context:[])),callbacks:n(),dirty:m,skip_bound:!1,root:i.target||p.$$.root};f&&f(b.root);let h=!1;if(b.ctx=s?s(a,i.props||{},((e,t,...n)=>{const o=n.length?n[0]:t;return b.ctx&&c(b.ctx[e],b.ctx[e]=o)&&(!b.skip_bound&&b.bound[e]&&b.bound[e](o),h&&M(a,e)),t})):[],b.update(),h=!0,o(b.before_update),b.fragment=!!d&&d(b.ctx),i.target){if(i.hydrate){const e=function(e){return Array.from(e.childNodes)}(i.target);b.fragment&&b.fragment.l(e),e.forEach(l)}else b.fragment&&b.fragment.c();i.intro&&((y=a.$$.fragment)&&y.i&&(L.delete(y),y.i(w))),function(e,n,a,i){const{fragment:s,after_update:l}=e.$$;s&&s.m(n,a),i||T((()=>{const n=e.$$.on_mount.map(t).filter(r);e.$$.on_destroy?e.$$.on_destroy.push(...n):o(n),e.$$.on_mount=[]})),l.forEach(T)}(a,i.target,i.anchor,i.customElement),O()}var y,w;g(p)}let j;"function"==typeof HTMLElement&&(j=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(t).filter(r);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){D(this,1),this.$destroy=e}$on(t,n){if(!r(n))return e;const o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(n),()=>{const e=o.indexOf(n);-1!==e&&o.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});var q,z=(function(e,t){t.__esModule=!0,t.LanguageTranslator=t.addComponent=t.getChildStyleToPass=void 0,t.getChildStyleToPass=function(e,t){var n,o,r="";if(e&&(null==t?void 0:t.length)&&(null===(n=Object.keys(e))||void 0===n?void 0:n.length)&&(null===(o=null==t?void 0:t.filter((function(t){return Object.keys(e).includes(t.name)})))||void 0===o?void 0:o.length))for(var a=function(n){(null==t?void 0:t.filter((function(t){return t.name===n&&t.defaultValue!==e[n]})))&&(r+="".concat(n,":").concat(e[n],";"))},i=0,s=Object.keys(e);i<s.length;i++)a(s[i]);return r},t.addComponent=function(e){var t,n=(null===(t=null==e?void 0:e.repoName.split("/"))||void 0===t?void 0:t[1])||(null==e?void 0:e.repoName);if(!n)throw new Error("wrong componentPath "+(null==e?void 0:e.repoName));if(!(null==e?void 0:e.version))throw new Error("wrong version "+(null==e?void 0:e.version));var o=(null==e?void 0:e.iifePath)||"release/release.js";if(!document.getElementById(n+"-script"))try{var r=document.createElement("script");r.id=n+"-script",r.src="https://cdn.jsdelivr.net/npm/".concat(e.repoName,"@").concat(e.version,"/").concat(o),(null==e?void 0:e.local)&&location.href.includes("localhost")&&(r.src="".concat(e.local)),document.head.appendChild(r)}catch(e){console.warn(e)}};var n=function(){function e(e){if(!(null==e?void 0:e.dictionary))throw new Error("no dictionary provided");this.dictionary=e.dictionary,this.setLang(null==e?void 0:e.lang)}return e.prototype.setLang=function(t){t||(t=e.getDefaultLang()),this.lang=t},e.prototype.translateWord=function(t,n){return e.getDictionaryWord(t,this.dictionary,n||this.lang)},e.prototype.translateDate=function(t,n,o){return e.formatDate(t,n,o||this.lang)},e.getDefaultLang=function(){var e,t,n,o,r,a="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(n=null===(t=null===(e=navigator.languages[0])||void 0===e?void 0:e.split("-")[0])||void 0===t?void 0:t.toLowerCase())||void 0===n?void 0:n.length)&&(a=null===(r=null===(o=navigator.languages[0])||void 0===o?void 0:o.split("-")[0])||void 0===r?void 0:r.toLowerCase()),a},e.getDictionaryWord=function(t,n,o){var r;if(!t)throw new Error("no wordKey provided");if(!n)throw new Error("no dictionary provided");if(o&&(null===(r=n[o])||void 0===r?void 0:r[t]))return n[o][t];var a="",i=e.getDefaultLang();if(!o||i!==o){var s=null==n?void 0:n[i];(null==s?void 0:s[t])&&(a=s[t])}return a},e.formatDate=function(t,n,o){if(!t)throw new Error("no date provided");if("function"!=typeof t.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(o||e.getDefaultLang(),n).format(t)},e}();t.LanguageTranslator=n}(q={exports:{}},q.exports),q.exports),P={vars:[{name:"--bs-primary",valueType:"color",theme:"bootstrap",defaultValue:"#07689f"},{name:"--bs-secondary",valueType:"color",theme:"bootstrap",defaultValue:"#c9d6df"},{name:"--bs-success",valueType:"color",theme:"bootstrap",defaultValue:"#11d3bc"},{name:"--bs-info",valueType:"color",theme:"bootstrap",defaultValue:"#a2d5f2"},{name:"--bs-warning",valueType:"color",theme:"bootstrap",defaultValue:"#ffc107"},{name:"--bs-danger",valueType:"color",theme:"bootstrap",defaultValue:"#f67280"}],parts:[{name:"invalid-feedback",description:""}]},J={vars:[{name:"--bs-primary",valueType:"color",theme:"bootstrap",defaultValue:"#07689f"},{name:"--bs-secondary",valueType:"color",theme:"bootstrap",defaultValue:"#c9d6df"},{name:"--bs-success",valueType:"color",theme:"bootstrap",defaultValue:"#11d3bc"},{name:"--bs-info",valueType:"color",theme:"bootstrap",defaultValue:"#a2d5f2"},{name:"--bs-warning",valueType:"color",theme:"bootstrap",defaultValue:"#ffc107"},{name:"--bs-danger",valueType:"color",theme:"bootstrap",defaultValue:"#f67280"}],parts:[{name:"invalid-feedback",description:""}]},I=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,R=/\n/g,F=/^\s*/,H=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,B=/^:\s*/,W=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,U=/^[;\s]*/,K=/^\s+|\s+$/g,Y="";function G(e){return e?e.replace(K,Y):Y}var Q=function(e,t){var n,o=null;if(!e||"string"!=typeof e)return o;for(var r,a,i=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,o=1;function r(e){var t=e.match(R);t&&(n+=t.length);var r=e.lastIndexOf("\n");o=~r?e.length-r:o+e.length}function a(){var e={line:n,column:o};return function(t){return t.position=new i(e),d(),t}}function i(e){this.start=e,this.end={line:n,column:o},this.source=t.source}function s(r){var a=new Error(t.source+":"+n+":"+o+": "+r);if(a.reason=r,a.filename=t.source,a.line=n,a.column=o,a.source=e,!t.silent)throw a}function l(t){var n=t.exec(e);if(n){var o=n[0];return r(o),e=e.slice(o.length),n}}function d(){l(F)}function c(e){var t;for(e=e||[];t=u();)!1!==t&&e.push(t);return e}function u(){var t=a();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;Y!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,Y===e.charAt(n-1))return s("End of comment missing");var i=e.slice(2,n-2);return o+=2,r(i),e=e.slice(n),o+=2,t({type:"comment",comment:i})}}function f(){var e=a(),t=l(H);if(t){if(u(),!l(B))return s("property missing ':'");var n=l(W),o=e({type:"declaration",property:G(t[0].replace(I,Y)),value:n?G(n[0].replace(I,Y)):Y});return l(U),o}}return i.prototype.content=e,d(),function(){var e,t=[];for(c(t);e=f();)!1!==e&&(t.push(e),c(t));return t}()}(e),s="function"==typeof t,l=0,d=i.length;l<d;l++)r=(n=i[l]).property,a=n.value,s?t(r,a,n):a&&(o||(o={}),o[r]=a);return o},X="0.20.17";function Z(e){let t,n,r,a,h,v,g,y,w,$,k,x,_,S,E,T=!e[1]?.params?.removeSeconds&&ee(e);return{c(){var o,i,s,l;t=d("div"),n=d("hb-input-date"),a=u(),h=d("div"),v=d("hb-input-number"),y=c("\n\t\t\n\t\t:\n\t\t"),w=d("div"),$=d("hb-input-number"),x=u(),T&&T.c(),_=f(),b(n,"schemaentry",r=JSON.stringify(e[3])),b(n,"style",e[7]),o=t,i="margin-right",null==(s="20px")?o.style.removeProperty(i):o.style.setProperty(i,s,l?"important":""),p(t,"class","input"),b(v,"schemaentry",g=JSON.stringify(e[4])),b(v,"style",e[8]),p(h,"class","input"),b($,"schemaentry",k=JSON.stringify(e[5])),b($,"style",e[8]),p(w,"class","input")},m(o,r){s(o,t,r),i(t,n),s(o,a,r),s(o,h,r),i(h,v),s(o,y,r),s(o,w,r),i(w,$),s(o,x,r),T&&T.m(o,r),s(o,_,r),S||(E=[m(n,"setValue",e[26]),m(v,"setValue",e[27]),m($,"setValue",e[28])],S=!0)},p(e,t){8&t[0]&&r!==(r=JSON.stringify(e[3]))&&b(n,"schemaentry",r),128&t[0]&&b(n,"style",e[7]),16&t[0]&&g!==(g=JSON.stringify(e[4]))&&b(v,"schemaentry",g),256&t[0]&&b(v,"style",e[8]),32&t[0]&&k!==(k=JSON.stringify(e[5]))&&b($,"schemaentry",k),256&t[0]&&b($,"style",e[8]),e[1]?.params?.removeSeconds?T&&(T.d(1),T=null):T?T.p(e,t):(T=ee(e),T.c(),T.m(_.parentNode,_))},d(e){e&&l(t),e&&l(a),e&&l(h),e&&l(y),e&&l(w),e&&l(x),T&&T.d(e),e&&l(_),S=!1,o(E)}}}function ee(e){let t,n,o,r,a,u;return{c(){t=c(":\n\t\t\t"),n=d("div"),o=d("hb-input-number"),b(o,"schemaentry",r=JSON.stringify(e[6])),b(o,"style",e[8]),p(n,"class","input")},m(r,l){s(r,t,l),s(r,n,l),i(n,o),a||(u=m(o,"setValue",e[29]),a=!0)},p(e,t){64&t[0]&&r!==(r=JSON.stringify(e[6]))&&b(o,"schemaentry",r),256&t[0]&&b(o,"style",e[8])},d(e){e&&l(t),e&&l(n),a=!1,u()}}}function te(e){let t,n,o=e[1].validationTip+"";return{c(){t=d("div"),n=c(o),p(t,"part","invalid-feedback"),p(t,"class","invalid-feedback mb-1")},m(e,o){s(e,t,o),i(t,n)},p(e,t){2&t[0]&&o!==(o=e[1].validationTip+"")&&function(e,t){t=""+t,e.data!==t&&(e.data=t)}(n,o)},d(e){e&&l(t)}}}function ne(t){let n,o,r,a,i=t[3]&&t[4]&&t[5]&&Z(t),c=t[1]?.validationTip&&"yes"===t[0]&&te(t);return{c(){n=d("div"),i&&i.c(),r=u(),c&&c.c(),a=f(),this.c=e,p(n,"class",o="form-control "+("yes"===t[0]&&t[1]?.required?t[2]?"is-valid":"is-invalid":""))},m(e,t){s(e,n,t),i&&i.m(n,null),s(e,r,t),c&&c.m(e,t),s(e,a,t)},p(e,t){e[3]&&e[4]&&e[5]?i?i.p(e,t):(i=Z(e),i.c(),i.m(n,null)):i&&(i.d(1),i=null),7&t[0]&&o!==(o="form-control "+("yes"===e[0]&&e[1]?.required?e[2]?"is-valid":"is-invalid":""))&&p(n,"class",o),e[1]?.validationTip&&"yes"===e[0]?c?c.p(e,t):(c=te(e),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},i:e,o:e,d(e){e&&l(n),i&&i.d(),e&&l(r),c&&c.d(e),e&&l(a)}}}function oe(e,t,n){var o,r;let a,i,s,l,d,c,u,f,m,p,{style:b}=t,{set_value:h}=t,{set_valid:v}=t,{show_validation:g}=t,{schemaentry:$}=t,k="",x="",_=!1;const S=y(),E=w();function T(e,t){E(e,t),S.dispatchEvent&&S.dispatchEvent(new CustomEvent(e,{detail:t}))}let C,N=!0;function O(e){console.log("changeDate",e),n(20,s=e)}function V(e){console.log("changeHour",e),n(21,l=e),d||n(5,m.value=0,m),c||n(6,p.value=0,p)}function L(e){console.log("changeMinutes",e),n(22,d=e),c||n(6,p.value=0,p)}function D(e){console.log("changeSeconds",e),n(23,c=e)}return e.$$set=e=>{"style"in e&&n(15,b=e.style),"set_value"in e&&n(13,h=e.set_value),"set_valid"in e&&n(14,v=e.set_valid),"show_validation"in e&&n(0,g=e.show_validation),"schemaentry"in e&&n(1,$=e.schemaentry)},e.$$.update=()=>{if(67100799&e.$$.dirty[0]){if(b&&(n(18,a=Q(b)),n(7,k=z.getChildStyleToPass(a,null==J?void 0:J.vars)),n(8,x=z.getChildStyleToPass(a,null==P?void 0:P.vars))),g||n(0,g="no"),$&&"string"==typeof $&&n(1,$=JSON.parse($)),n(13,h=!(!h&&"no"===h)),n(14,v=!(!v&&"no"===v)),(null==$?void 0:$.value)&&(C!==(null==$?void 0:$.value)||N)){let e;console.info("computing values",$.value),n(25,N=!1);try{e=new Date($.value)}catch(e){console.error("invalid input value on input-datetime",$.value,e)}console.info("now date is",e.valueOf()),e&&e.valueOf()>1e4&&e.valueOf()<1e13?(console.info("converting date"),n(20,s=`${e.getFullYear()}-${e.getMonth().toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}`),n(21,l=e.getHours()),n(22,d=e.getMinutes()),n(23,c=e.getSeconds()),n(3,u={id:"date",type:"date",value:s,required:!0}),n(4,f={id:"hours",type:"number",value:l,required:!0,params:{min:0,max:23}}),n(5,m={id:"minutes",type:"number",value:d,required:!0,params:{min:0,max:59}}),n(6,p={id:"seconds",type:"number",value:c,required:!0,params:{min:0,max:59}})):console.error("invalid data value on input-datetime",i)}if(!s||!l&&0!==l||!d&&0!==d)console.log("reset to 0 datetime"),n(19,i=null),u||n(3,u={id:"date",type:"date",required:!0}),f||n(4,f={id:"hours",type:"number",required:!0,params:{min:0,max:23},placeholder:"hours"}),m||n(5,m={id:"minutes",type:"number",required:!0,params:{min:0,max:59},placeholder:"minutes"}),p||n(6,p={id:"seconds",type:"number",required:!0,params:{min:0,max:59},placeholder:"seconds"});else{console.log("NOW",s,l,d);try{n(19,i=new Date(`${s} ${l.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")||"00"}`).toISOString())}catch(e){console.error("convert error",e)}}if(n(24,C=null==$?void 0:$.value),$)if($.required)if(i){let e,t;(null===n(16,o=null==$?void 0:$.params)||void 0===o?void 0:o.min)&&(e=new Date($.params.min)),(null===n(17,r=null==$?void 0:$.params)||void 0===r?void 0:r.max)&&(t=new Date($.params.max));const a=new Date(i);(!e||a.valueOf()>=e.valueOf())&&(!t||a.valueOf()<=t.valueOf())?n(2,_=!0):n(2,_=!1)}else n(2,_=!1);else n(2,_=!0);else n(2,_=!1);z.addComponent({repoName:"@htmlbricks/hb-input-number",version:X}),z.addComponent({repoName:"@htmlbricks/hb-input-date",version:X}),setTimeout((()=>{h&&T("setValue",{value:i,id:null==$?void 0:$.id}),v&&T("setValid",{valid:_,id:null==$?void 0:$.id})}),0)}},[g,$,_,u,f,m,p,k,x,O,V,L,D,h,v,b,o,r,a,i,s,l,d,c,C,N,e=>{e.detail?.value&&O(e.detail.value)},e=>{(e.detail?.value||0===e.detail.value)&&V(e.detail.value)},e=>{(e.detail?.value||0===e.detail.value)&&L(e.detail.value)},e=>{(e.detail?.value||0===e.detail.value)&&D(e.detail.value)}]}class re extends j{constructor(e){super();const t=document.createElement("style");t.textContent="@import url(\"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap\");:host{--bs-blue:var(--bs-primary,#07689f);--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:var(--bs-danger,#f67280);--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:var(--bs-warning,#ffc107);--bs-teal:#20c997;--bs-cyan:var(--bs-info,#a2d5f2);--bs-white:#fff;--bs-gray:var(--bs-secondary,#c9d6df);--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:var(--bs-secondary,#c9d6df);--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:var(--bs-primary,#07689f);--bs-secondary:var(--bs-secondary,#c9d6df);--bs-success:var(--bs-warning,#ffc107);--bs-info:var(--bs-info,#a2d5f2);--bs-warning:#ffc107;--bs-danger:var(--bs-danger,#f67280);--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13, 110, 253;--bs-secondary-rgb:108, 117, 125;--bs-success-rgb:25, 135, 84;--bs-info-rgb:13, 202, 240;--bs-warning-rgb:255, 193, 7;--bs-danger-rgb:220, 53, 69;--bs-light-rgb:248, 249, 250;--bs-dark-rgb:33, 37, 41;--bs-white-rgb:255, 255, 255;--bs-black-rgb:0, 0, 0;--bs-body-color-rgb:33, 37, 41;--bs-body-bg-rgb:255, 255, 255;--bs-font-sans-serif:system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", \"Liberation Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";--bs-font-monospace:SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff}*,*::before,*::after{box-sizing:border-box}@media(prefers-reduced-motion: no-preference){:host{scroll-behavior:smooth}}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}::-moz-focus-inner{padding:0;border-style:none}@media(min-width: 1200px){}::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-text,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}.form-control{display:block;width:100%;padding:0.375rem 0.75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;appearance:none;border-radius:0.25rem;transition:border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}@media(prefers-reduced-motion: reduce){.form-control{transition:none}}.form-control:focus{color:#212529;background-color:#fff;border-color:#86b7fe;outline:0;box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25)}.form-control::-webkit-date-and-time-value{height:1.5em}.form-control::placeholder{color:var(--bs-secondary,#c9d6df);opacity:1}.form-control:disabled{background-color:#e9ecef;opacity:1}.form-control::file-selector-button{padding:0.375rem 0.75rem;margin:-0.375rem -0.75rem;margin-inline-end:0.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}@media(prefers-reduced-motion: reduce){.form-control::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:#dde0e3}.form-control::-webkit-file-upload-button{padding:0.375rem 0.75rem;margin:-0.375rem -0.75rem;margin-inline-end:0.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}@media(prefers-reduced-motion: reduce){.form-control::-webkit-file-upload-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#dde0e3}@media(prefers-reduced-motion: reduce){}@media(prefers-reduced-motion: reduce){}@media(prefers-reduced-motion: reduce){}@media(prefers-reduced-motion: reduce){}@media(prefers-reduced-motion: reduce){}.form-control.is-valid{border-color:var(--bs-warning,#ffc107);padding-right:calc(1.5em + 0.75rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(0.375em + 0.1875rem) center;background-size:calc(0.75em + 0.375rem) calc(0.75em + 0.375rem)}.form-control.is-valid:focus{border-color:var(--bs-warning,#ffc107);box-shadow:0 0 0 0.25rem rgba(25, 135, 84, 0.25)}.invalid-feedback{display:none;width:100%;margin-top:0.25rem;font-size:0.875em;color:var(--bs-danger,#f67280)}.is-invalid~.invalid-feedback{display:block}.form-control.is-invalid{border-color:var(--bs-danger,#f67280);padding-right:calc(1.5em + 0.75rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(0.375em + 0.1875rem) center;background-size:calc(0.75em + 0.375rem) calc(0.75em + 0.375rem)}.form-control.is-invalid:focus{border-color:var(--bs-danger,#f67280);box-shadow:0 0 0 0.25rem rgba(220, 53, 69, 0.25)}@media(prefers-reduced-motion: reduce){}@keyframes placeholder-glow{50%{opacity:0.2}}@keyframes placeholder-wave{100%{mask-position:-200% 0%}}@media(min-width: 576px){}@media(min-width: 768px){}@media(min-width: 992px){}@media(min-width: 1200px){}@media(min-width: 1400px){}:host{font-family:\"Roboto\", sans-serif}.input{display:inline-block}hb-input-date{max-width:140px;display:inline-block}hb-input-number{width:100px;display:inline-block}",this.shadowRoot.appendChild(t),A(this,{target:this.shadowRoot,props:h(this.attributes),customElement:!0},oe,ne,a,{style:15,set_value:13,set_valid:14,show_validation:0,schemaentry:1},null,[-1,-1]),e&&(e.target&&s(e.target,this,e.anchor),e.props&&(this.$set(e.props),O()))}static get observedAttributes(){return["style","set_value","set_valid","show_validation","schemaentry"]}get style(){return this.$$.ctx[15]}set style(e){this.$$set({style:e}),O()}get set_value(){return this.$$.ctx[13]}set set_value(e){this.$$set({set_value:e}),O()}get set_valid(){return this.$$.ctx[14]}set set_valid(e){this.$$set({set_valid:e}),O()}get show_validation(){return this.$$.ctx[0]}set show_validation(e){this.$$set({show_validation:e}),O()}get schemaentry(){return this.$$.ctx[1]}set schemaentry(e){this.$$set({schemaentry:e}),O()}}return customElements.define("hb-input-datetime",re),re}();
|
|
2
|
-
//# sourceMappingURL=release.js.map
|