@operato/form 2.0.0-alpha.0 → 2.0.0-alpha.103
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/CHANGELOG.md +164 -0
- package/demo/index.html +14 -3
- package/dist/src/components/ox-custom-input.d.ts +1 -1
- package/dist/src/components/ox-custom-select.d.ts +1 -1
- package/dist/src/components/ox-file-uploader.d.ts +1 -1
- package/dist/src/components/ox-file-uploader.js +7 -7
- package/dist/src/components/ox-file-uploader.js.map +1 -1
- package/dist/src/components/ox-form-paginator.d.ts +1 -1
- package/dist/src/components/ox-search-form.d.ts +10 -25
- package/dist/src/components/ox-search-form.js +163 -89
- package/dist/src/components/ox-search-form.js.map +1 -1
- package/dist/src/filters/filter-checkbox.d.ts +1 -1
- package/dist/src/filters/filter-checkbox.js +4 -2
- package/dist/src/filters/filter-checkbox.js.map +1 -1
- package/dist/src/filters/filter-input-barcode.d.ts +1 -1
- package/dist/src/filters/filter-input-barcode.js +2 -2
- package/dist/src/filters/filter-input-barcode.js.map +1 -1
- package/dist/src/filters/filter-input.d.ts +1 -1
- package/dist/src/filters/filter-input.js.map +1 -1
- package/dist/src/filters/filter-range-date.d.ts +1 -1
- package/dist/src/filters/filter-range-date.js +14 -3
- package/dist/src/filters/filter-range-date.js.map +1 -1
- package/dist/src/filters/filter-range-number.d.ts +1 -1
- package/dist/src/filters/filter-range-number.js.map +1 -1
- package/dist/src/filters/filter-select.d.ts +1 -1
- package/dist/src/filters/filter-select.js +23 -11
- package/dist/src/filters/filter-select.js.map +1 -1
- package/dist/src/filters/filter-styles.js +38 -28
- package/dist/src/filters/filter-styles.js.map +1 -1
- package/dist/src/filters/index.d.ts +1 -1
- package/dist/src/filters/index.js +1 -1
- package/dist/src/filters/index.js.map +1 -1
- package/dist/src/filters/ox-filters-form-base.d.ts +8 -9
- package/dist/src/filters/ox-filters-form-base.js +126 -72
- package/dist/src/filters/ox-filters-form-base.js.map +1 -1
- package/dist/src/filters/registry.d.ts +1 -1
- package/dist/src/filters/registry.js.map +1 -1
- package/dist/src/styles/search-form-styles.js +1 -1
- package/dist/src/styles/search-form-styles.js.map +1 -1
- package/dist/src/types.d.ts +59 -0
- package/dist/src/types.js.map +1 -0
- package/dist/stories/{ox-filter-form-barcode.stories.js → ox-filters-form-barcode.stories.js} +29 -12
- package/dist/stories/ox-filters-form-barcode.stories.js.map +1 -0
- package/dist/stories/{ox-filter-form-base.stories.d.ts → ox-filters-form-base-bounded.stories.d.ts} +3 -2
- package/dist/stories/ox-filters-form-base-bounded.stories.js +182 -0
- package/dist/stories/ox-filters-form-base-bounded.stories.js.map +1 -0
- package/dist/stories/ox-filters-form-base-change-handler.stories.d.ts +30 -0
- package/dist/stories/ox-filters-form-base-change-handler.stories.js +194 -0
- package/dist/stories/ox-filters-form-base-change-handler.stories.js.map +1 -0
- package/dist/stories/ox-filters-form-base-dependencies.stories.d.ts +30 -0
- package/dist/stories/ox-filters-form-base-dependencies.stories.js +182 -0
- package/dist/stories/ox-filters-form-base-dependencies.stories.js.map +1 -0
- package/dist/stories/ox-filters-form-base.stories.d.ts +30 -0
- package/dist/stories/ox-filters-form-base.stories.js +142 -0
- package/dist/stories/ox-filters-form-base.stories.js.map +1 -0
- package/dist/stories/ox-search-form.stories.d.ts +34 -0
- package/dist/stories/ox-search-form.stories.js +219 -0
- package/dist/stories/ox-search-form.stories.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +17 -16
- package/src/components/ox-file-uploader.ts +7 -7
- package/src/components/ox-search-form.ts +195 -122
- package/src/filters/filter-checkbox.ts +5 -3
- package/src/filters/filter-input-barcode.ts +3 -3
- package/src/filters/filter-input.ts +1 -1
- package/src/filters/filter-range-date.ts +21 -6
- package/src/filters/filter-range-number.ts +1 -1
- package/src/filters/filter-select.ts +29 -20
- package/src/filters/filter-styles.ts +38 -28
- package/src/filters/index.ts +1 -1
- package/src/filters/ox-filters-form-base.ts +136 -72
- package/src/filters/registry.ts +1 -1
- package/src/styles/search-form-styles.ts +1 -1
- package/src/types.ts +96 -0
- package/stories/{ox-filter-form-barcode.stories.ts → ox-filters-form-barcode.stories.ts} +30 -13
- package/stories/ox-filters-form-base-bounded.stories.ts +206 -0
- package/stories/ox-filters-form-base-change-handler.stories.ts +218 -0
- package/stories/ox-filters-form-base.stories.ts +159 -0
- package/stories/ox-search-form.stories.ts +244 -0
- package/themes/app-theme.css +7 -7
- package/themes/form-theme.css +1 -1
- package/themes/input-theme.css +32 -0
- package/dist/src/filters/types.d.ts +0 -17
- package/dist/src/filters/types.js.map +0 -1
- package/dist/stories/ox-filter-form-barcode.stories.js.map +0 -1
- package/dist/stories/ox-filter-form-base.stories.js +0 -82
- package/dist/stories/ox-filter-form-base.stories.js.map +0 -1
- package/src/filters/types.ts +0 -47
- package/stories/ox-filter-form-base.stories.ts +0 -97
- /package/dist/src/{filters/types.js → types.js} +0 -0
- /package/dist/stories/{ox-filter-form-barcode.stories.d.ts → ox-filters-form-barcode.stories.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,170 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.0.0-alpha.103](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.102...v2.0.0-alpha.103) (2024-04-26)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### :bug: Bug Fix
|
|
10
|
+
|
|
11
|
+
* ox-filter-form과 ox-search-form에서 필터들간에 연관 기능 지원 ([bc081f8](https://github.com/hatiolab/operato/commit/bc081f8dfbb303f8aa219f0b776aa0cc4b18e9cd))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [2.0.0-alpha.94](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.93...v2.0.0-alpha.94) (2024-04-20)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### :bug: Bug Fix
|
|
19
|
+
|
|
20
|
+
* support 'checkbox' type in ox-filters-form-base ([1ffe0e5](https://github.com/hatiolab/operato/commit/1ffe0e5fc16480240c8c5accf57d247bb3299867))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## [2.0.0-alpha.92](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.91...v2.0.0-alpha.92) (2024-04-19)
|
|
25
|
+
|
|
26
|
+
**Note:** Version bump only for package @operato/form
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## [2.0.0-alpha.91](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.90...v2.0.0-alpha.91) (2024-04-19)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### :bug: Bug Fix
|
|
36
|
+
|
|
37
|
+
* style fix ([6d442cd](https://github.com/hatiolab/operato/commit/6d442cdc7a4c5da0803fe8e7fcc4c0ec1de45b3f))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## [2.0.0-alpha.86](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.85...v2.0.0-alpha.86) (2024-04-16)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### :bug: Bug Fix
|
|
45
|
+
|
|
46
|
+
* tweak filters-form style ([79e1f68](https://github.com/hatiolab/operato/commit/79e1f68f224770c8ad97d87e3f79327743a3d84d))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## [2.0.0-alpha.85](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.84...v2.0.0-alpha.85) (2024-04-16)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### :bug: Bug Fix
|
|
54
|
+
|
|
55
|
+
* tweak filters-form style ([6fb293d](https://github.com/hatiolab/operato/commit/6fb293d7d34ea7b01b3011264f554158beb62621))
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
## [2.0.0-alpha.68](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.67...v2.0.0-alpha.68) (2024-04-13)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### :bug: Bug Fix
|
|
63
|
+
|
|
64
|
+
* mwc=>md for context ([2bc13f2](https://github.com/hatiolab/operato/commit/2bc13f285f257782f73e5d7b5d1ddd197df85393))
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
## [2.0.0-alpha.57](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.56...v2.0.0-alpha.57) (2024-04-07)
|
|
69
|
+
|
|
70
|
+
**Note:** Version bump only for package @operato/form
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
## [2.0.0-alpha.51](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.50...v2.0.0-alpha.51) (2024-03-29)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### :bug: Bug Fix
|
|
80
|
+
|
|
81
|
+
* upgrade lit ([e661c33](https://github.com/hatiolab/operato/commit/e661c333d2bb97f784b5ac2c0e365714ee5e80ff))
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
## [2.0.0-alpha.47](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.46...v2.0.0-alpha.47) (2024-03-27)
|
|
86
|
+
|
|
87
|
+
**Note:** Version bump only for package @operato/form
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
## [2.0.0-alpha.44](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.43...v2.0.0-alpha.44) (2024-03-24)
|
|
94
|
+
|
|
95
|
+
**Note:** Version bump only for package @operato/form
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
## [2.0.0-alpha.43](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.42...v2.0.0-alpha.43) (2024-03-24)
|
|
102
|
+
|
|
103
|
+
**Note:** Version bump only for package @operato/form
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
## [2.0.0-alpha.35](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.34...v2.0.0-alpha.35) (2024-03-13)
|
|
110
|
+
|
|
111
|
+
**Note:** Version bump only for package @operato/form
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
## [2.0.0-alpha.28](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.27...v2.0.0-alpha.28) (2024-02-20)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
### :bug: Bug Fix
|
|
121
|
+
|
|
122
|
+
* upgrade devDependencies for webcomponents ([1489b8b](https://github.com/hatiolab/operato/commit/1489b8b790d9bcee779a070a630697f25c01728f))
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
## [2.0.0-alpha.25](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.24...v2.0.0-alpha.25) (2024-02-12)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
### :bug: Bug Fix
|
|
130
|
+
|
|
131
|
+
* ox-filters-form-base for @operato/form ([1d2026d](https://github.com/hatiolab/operato/commit/1d2026d238a3ecf6198bd9cad9a54629e5ddf9fb))
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
## [2.0.0-alpha.24](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.23...v2.0.0-alpha.24) (2024-02-11)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
### :bug: Bug Fix
|
|
139
|
+
|
|
140
|
+
* ox-filters-form-base for @operato/form ([fd0ec03](https://github.com/hatiolab/operato/commit/fd0ec033585ce0fe46f24276db91238abbbfdc05))
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
## [2.0.0-alpha.23](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.22...v2.0.0-alpha.23) (2024-02-10)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
### :bug: Bug Fix
|
|
148
|
+
|
|
149
|
+
* time-calculator relativeDate(s) => relativeDays ([1ad965e](https://github.com/hatiolab/operato/commit/1ad965e59232bdfe5d90938b95e1085a5e28a527))
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
## [2.0.0-alpha.22](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.21...v2.0.0-alpha.22) (2024-02-10)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
### :bug: Bug Fix
|
|
157
|
+
|
|
158
|
+
* add time-calculator module for data-grist and form ([4d26d22](https://github.com/hatiolab/operato/commit/4d26d22b89e2c34cffe15eb0cc8520962644e8a1))
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
## [2.0.0-alpha.8](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.7...v2.0.0-alpha.8) (2024-01-20)
|
|
163
|
+
|
|
164
|
+
**Note:** Version bump only for package @operato/form
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
6
170
|
## [2.0.0-alpha.0](https://github.com/hatiolab/operato/compare/v1.13.1...v2.0.0-alpha.0) (2024-01-05)
|
|
7
171
|
|
|
8
172
|
**Note:** Version bump only for package @operato/form
|
package/demo/index.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!
|
|
1
|
+
<!doctype html>
|
|
2
2
|
<html lang="en-GB">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
@@ -18,7 +18,18 @@
|
|
|
18
18
|
}
|
|
19
19
|
</style>
|
|
20
20
|
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet" />
|
|
21
|
-
<link
|
|
21
|
+
<link
|
|
22
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
23
|
+
rel="stylesheet"
|
|
24
|
+
/>
|
|
25
|
+
<link
|
|
26
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
27
|
+
rel="stylesheet"
|
|
28
|
+
/>
|
|
29
|
+
<link
|
|
30
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
31
|
+
rel="stylesheet"
|
|
32
|
+
/>
|
|
22
33
|
|
|
23
34
|
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
24
35
|
<link href="/themes/form-theme.css" rel="stylesheet" />
|
|
@@ -28,7 +39,7 @@
|
|
|
28
39
|
|
|
29
40
|
<script type="module">
|
|
30
41
|
import { html, render } from 'lit'
|
|
31
|
-
import '@material/
|
|
42
|
+
import '@material/web/icon/icon.js'
|
|
32
43
|
import '../dist/src/filters/ox-filters-form-base.js'
|
|
33
44
|
|
|
34
45
|
const form = document.querySelector('#demo')
|
|
@@ -10,7 +10,7 @@ export declare class CustomInput extends LitElement {
|
|
|
10
10
|
value: any;
|
|
11
11
|
autofocus: boolean;
|
|
12
12
|
input: HTMLInputElement;
|
|
13
|
-
render(): import("lit").TemplateResult<1>;
|
|
13
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
14
14
|
get checked(): boolean;
|
|
15
15
|
set checked(checked: boolean);
|
|
16
16
|
firstUpdated(): void;
|
|
@@ -11,7 +11,7 @@ export declare class CustomSelect extends LitElement {
|
|
|
11
11
|
value: any;
|
|
12
12
|
autofocus: boolean;
|
|
13
13
|
select: HTMLInputElement;
|
|
14
|
-
render(): import("lit").TemplateResult<1>;
|
|
14
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
15
15
|
firstUpdated(): void;
|
|
16
16
|
updated(changes: PropertyValues<this>): void;
|
|
17
17
|
_isObject(v: any): boolean;
|
|
@@ -6,7 +6,7 @@ export declare class FileUploader extends LitElement {
|
|
|
6
6
|
label?: string;
|
|
7
7
|
_files: File[];
|
|
8
8
|
fileInput: HTMLInputElement;
|
|
9
|
-
render(): import("lit").TemplateResult<1>;
|
|
9
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
10
10
|
firstUpdated(): void;
|
|
11
11
|
get files(): File[];
|
|
12
12
|
reset(): void;
|
|
@@ -12,7 +12,7 @@ let FileUploader = class FileUploader extends LitElement {
|
|
|
12
12
|
render() {
|
|
13
13
|
var _a;
|
|
14
14
|
return html `
|
|
15
|
-
<
|
|
15
|
+
<md-icon>post_add</md-icon>
|
|
16
16
|
<span>add file or drop files here!</span>
|
|
17
17
|
<input
|
|
18
18
|
id="input-file"
|
|
@@ -53,12 +53,12 @@ let FileUploader = class FileUploader extends LitElement {
|
|
|
53
53
|
${this._files.map(file => html `
|
|
54
54
|
<li>
|
|
55
55
|
- ${file.name}
|
|
56
|
-
<
|
|
56
|
+
<md-icon
|
|
57
57
|
@click=${(e) => {
|
|
58
58
|
this._files.splice(this._files.indexOf(file), 1);
|
|
59
59
|
this.requestUpdate();
|
|
60
60
|
}}
|
|
61
|
-
>delete_outline</
|
|
61
|
+
>delete_outline</md-icon
|
|
62
62
|
>
|
|
63
63
|
</li>
|
|
64
64
|
`)}
|
|
@@ -96,7 +96,7 @@ FileUploader.styles = [
|
|
|
96
96
|
font: var(--file-uploader-font) !important;
|
|
97
97
|
color: var(--file-uploader-color);
|
|
98
98
|
}
|
|
99
|
-
:host >
|
|
99
|
+
:host > md-icon {
|
|
100
100
|
color: var(--file-uploader-icon-color);
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -132,14 +132,14 @@ FileUploader.styles = [
|
|
|
132
132
|
padding: var(--file-uploader-li-padding);
|
|
133
133
|
border-bottom: var(--file-uploader-li-border-bottom);
|
|
134
134
|
}
|
|
135
|
-
li
|
|
135
|
+
li md-icon {
|
|
136
136
|
float: right;
|
|
137
137
|
cursor: pointer;
|
|
138
138
|
font: var(--file-uploader-li-icon-font);
|
|
139
139
|
margin: var(--file-uploader-li-icon-margin);
|
|
140
140
|
}
|
|
141
|
-
li
|
|
142
|
-
li
|
|
141
|
+
li md-icon:hover,
|
|
142
|
+
li md-icon:active {
|
|
143
143
|
color: var(--file-uploader-li-icon-focus-color);
|
|
144
144
|
}
|
|
145
145
|
`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-file-uploader.js","sourceRoot":"","sources":["../../../src/components/ox-file-uploader.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAGxC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU;IAArC;;QAiEwB,aAAQ,GAAY,KAAK,CAAA;QAC1B,WAAM,GAAW,KAAK,CAAA;QAGvB,WAAM,GAAW,EAAE,CAAA;IAuFhD,CAAC;IAnFC,MAAM;;QACJ,OAAO,IAAI,CAAA;;;;;;iBAME,IAAI,CAAC,MAAM;oBACR,IAAI,CAAC,QAAQ;;kBAEf,CAAC,CAAQ,EAAE,EAAE;YACrB,MAAM,SAAS,GAAG,CAAC,CAAC,aAAiC,CAAA;YACrD,MAAM,KAAK,GAAG,SAAS,CAAC,KAAiB,CAAA;YACzC,4EAA4E;YAC5E,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;gBAClD,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,OAAO,EAAE,CAAC;oBAChC,QAAQ,CAAC,aAAa,CACpB,IAAI,WAAW,CAAC,QAAQ,EAAE;wBACxB,MAAM,EAAE;4BACN,IAAI,EAAE,OAAO;4BACb,OAAO,EAAE,oCAAoC;yBAC9C;qBACF,CAAC,CACH,CAAA;oBACD,MAAM,IAAI,KAA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CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;QAC9E,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;IAED,KAAK;QACH,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,EAAE,CAAA;QACzB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAA;IAClB,CAAC;;AA1JM,mBAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4DF;CACF,AA9DY,CA8DZ;AAE4B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;8CAA0B;AAC1B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAuB;AACtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAe;AAEf;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;4CAAoB;AAExB;IAArB,KAAK,CAAC,aAAa,CAAC;+CAA6B;AAvEvC,YAAY;IADxB,aAAa,CAAC,kBAAkB,CAAC;GACrB,YAAY,CA4JxB","sourcesContent":["import { LitElement, css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { FileDropHelper } from '@operato/utils'\n\n@customElement('ox-file-uploader')\nexport class FileUploader extends LitElement {\n static styles = [\n css`\n :host {\n display: flex;\n flex-direction: column;\n border-radius: var(--border-radius);\n text-align: center;\n padding-bottom: 5px !important;\n text-transform: capitalize;\n\n border: var(--file-uploader-border);\n background-color: var(--main-section-background-color);\n font: var(--file-uploader-font) !important;\n color: var(--file-uploader-color);\n }\n :host >
|
|
1
|
+
{"version":3,"file":"ox-file-uploader.js","sourceRoot":"","sources":["../../../src/components/ox-file-uploader.ts"],"names":[],"mappings":";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G,EAAE,CAAA;IAClB,CAAC;;AA1JM,mBAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4DF;CACF,AA9DY,CA8DZ;AAE4B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;8CAA0B;AAC1B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAuB;AACtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAe;AAEf;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;4CAAoB;AAExB;IAArB,KAAK,CAAC,aAAa,CAAC;+CAA6B;AAvEvC,YAAY;IADxB,aAAa,CAAC,kBAAkB,CAAC;GACrB,YAAY,CA4JxB","sourcesContent":["import { LitElement, css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { FileDropHelper } from '@operato/utils'\n\n@customElement('ox-file-uploader')\nexport class FileUploader extends LitElement {\n static styles = [\n css`\n :host {\n display: flex;\n flex-direction: column;\n border-radius: var(--border-radius);\n text-align: center;\n padding-bottom: 5px !important;\n text-transform: capitalize;\n\n border: var(--file-uploader-border);\n background-color: var(--main-section-background-color);\n font: var(--file-uploader-font) !important;\n color: var(--file-uploader-color);\n }\n :host > md-icon {\n color: var(--file-uploader-icon-color);\n }\n\n :host(.candrop) {\n background-color: var(--file-uploader-candrop-background-color);\n }\n\n #input-file {\n display: none;\n }\n\n label {\n position: relative;\n width: auto;\n border: none;\n text-transform: capitalize;\n\n padding: var(--file-uploader-label-padding);\n border-radius: var(--file-uploader-label-border-radius);\n background-color: var(--file-uploader-label-background-color);\n color: var(--file-uploader-label-color);\n font: var(--file-uploader-label-font) !important;\n }\n\n ul {\n max-width: 500px;\n list-style: none;\n padding: 0;\n }\n li {\n text-align: left;\n\n padding: var(--file-uploader-li-padding);\n border-bottom: var(--file-uploader-li-border-bottom);\n }\n li md-icon {\n float: right;\n cursor: pointer;\n font: var(--file-uploader-li-icon-font);\n margin: var(--file-uploader-li-icon-margin);\n }\n li md-icon:hover,\n li md-icon:active {\n color: var(--file-uploader-li-icon-focus-color);\n }\n `\n ]\n\n @property({ type: Boolean }) multiple: boolean = false\n @property({ type: String }) accept: string = '*/*'\n @property({ type: String }) label?: string\n\n @property({ type: Array }) _files: File[] = []\n\n @query('#input-file') fileInput!: HTMLInputElement\n\n render() {\n return html`\n <md-icon>post_add</md-icon>\n <span>add file or drop files here!</span>\n <input\n id=\"input-file\"\n type=\"file\"\n accept=${this.accept}\n ?multiple=${this.multiple}\n hidden\n @change=${(e: Event) => {\n const fileInput = e.currentTarget as HTMLInputElement\n const files = fileInput.files as FileList\n //// Temporary Validation preventing file size more than 10mb to be uploaded\n for (let index = 0; index < files.length; index++) {\n if (files[index].size > 9999999) {\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n type: 'error',\n message: 'File size must be less than 10 MB.'\n }\n })\n )\n throw new Error('File size must be less than 10 MB.')\n }\n }\n\n this._files = [...this._files, ...Array.from(files)]\n\n this.dispatchEvent(\n new CustomEvent('files-change', {\n bubbles: true,\n composed: true,\n detail: {\n files: files\n }\n })\n )\n\n fileInput.value = ''\n }}\n />\n <label for=\"input-file\">${this.label || 'select file'}</label>\n\n ${this._files?.length\n ? html` <ul>\n ${this._files.map(\n file => html`\n <li>\n - ${file.name}\n <md-icon\n @click=${(e: Event) => {\n this._files.splice(this._files.indexOf(file), 1)\n this.requestUpdate()\n }}\n >delete_outline</md-icon\n >\n </li>\n `\n )}\n </ul>`\n : ''}\n `\n }\n\n firstUpdated() {\n FileDropHelper.set(this)\n\n this.addEventListener('file-drop', (e: Event) => {\n const de = e as any\n this._files = this.multiple ? de.detail : de.detail[0] ? [de.detail[0]] : []\n })\n }\n\n get files() {\n return this._files\n }\n\n reset() {\n this.fileInput.value = ''\n this._files = []\n }\n}\n"]}
|
|
@@ -1,31 +1,11 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
2
|
import './ox-custom-input.js';
|
|
3
3
|
import './ox-custom-select.js';
|
|
4
4
|
import { LitElement, PropertyValues } from 'lit';
|
|
5
|
-
|
|
5
|
+
import { SearchFormField } from '../types.js';
|
|
6
|
+
export declare class OxSearchForm extends LitElement {
|
|
6
7
|
static styles: import("lit").CSSResult[];
|
|
7
|
-
fields?:
|
|
8
|
-
type: string;
|
|
9
|
-
hidden: boolean;
|
|
10
|
-
name: string;
|
|
11
|
-
id: string;
|
|
12
|
-
label: string;
|
|
13
|
-
placeholder: string;
|
|
14
|
-
value: any;
|
|
15
|
-
field: string;
|
|
16
|
-
queryName: string;
|
|
17
|
-
props: {
|
|
18
|
-
[prop: string]: string;
|
|
19
|
-
};
|
|
20
|
-
attrs: string[];
|
|
21
|
-
options: {
|
|
22
|
-
name: string;
|
|
23
|
-
value: string;
|
|
24
|
-
}[];
|
|
25
|
-
handlers: {
|
|
26
|
-
[event: string]: EventListener;
|
|
27
|
-
};
|
|
28
|
-
}[];
|
|
8
|
+
fields?: SearchFormField[];
|
|
29
9
|
hideSearchButton: boolean;
|
|
30
10
|
autofocus: boolean;
|
|
31
11
|
form: HTMLFormElement;
|
|
@@ -34,7 +14,12 @@ export declare class SearchForm extends LitElement {
|
|
|
34
14
|
field: string;
|
|
35
15
|
_value: any;
|
|
36
16
|
})[];
|
|
37
|
-
|
|
17
|
+
private autoUpdateTargetsOnChange;
|
|
18
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
19
|
+
renderSelect(field: SearchFormField): import("lit-html").TemplateResult<1>;
|
|
20
|
+
renderCheckbox(field: SearchFormField): import("lit-html").TemplateResult<1>;
|
|
21
|
+
renderObject(field: SearchFormField, autofocusConsumed: number): import("lit-html").TemplateResult<1>;
|
|
22
|
+
renderElse(field: SearchFormField, autofocusConsumed: number): import("lit-html").TemplateResult<1>;
|
|
38
23
|
updated(changes: PropertyValues<this>): Promise<void>;
|
|
39
24
|
_checkInputValidity(): void;
|
|
40
25
|
get searchParams(): string;
|