@operato/form 8.0.0-alpha.6 → 8.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +156 -0
- package/dist/src/filters/ox-filters-form-base.js +2 -1
- package/dist/src/filters/ox-filters-form-base.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -15
- package/themes/calendar-theme.css +3 -1
- package/.editorconfig +0 -29
- package/.storybook/main.js +0 -3
- package/.storybook/preview.js +0 -52
- package/.storybook/server.mjs +0 -8
- package/src/components/ox-custom-input.ts +0 -102
- package/src/components/ox-custom-select.ts +0 -91
- package/src/components/ox-file-uploader.ts +0 -164
- package/src/components/ox-form-master.ts +0 -246
- package/src/components/ox-form-paginator.ts +0 -60
- package/src/components/ox-search-form-paginator.ts +0 -46
- package/src/components/ox-search-form.ts +0 -467
- package/src/filters/filter-checkbox.ts +0 -34
- package/src/filters/filter-input-barcode.ts +0 -35
- package/src/filters/filter-input.ts +0 -30
- package/src/filters/filter-range-date.ts +0 -81
- package/src/filters/filter-range-number.ts +0 -64
- package/src/filters/filter-select.ts +0 -56
- package/src/filters/filter-styles.ts +0 -127
- package/src/filters/index.ts +0 -10
- package/src/filters/ox-filter-personalizer.ts +0 -188
- package/src/filters/ox-filters-form-base.ts +0 -436
- package/src/filters/registry.ts +0 -54
- package/src/index.ts +0 -4
- package/src/styles/index.ts +0 -3
- package/src/styles/multi-column-form-styles.ts +0 -192
- package/src/styles/search-form-styles.ts +0 -160
- package/src/styles/single-column-form-styles.ts +0 -114
- package/src/types.ts +0 -106
- package/stories/ox-filters-form-barcode.stories.ts +0 -140
- package/stories/ox-filters-form-base-bounded.stories.ts +0 -208
- package/stories/ox-filters-form-base-change-handler.stories.ts +0 -220
- package/stories/ox-filters-form-base-page-preference.stories.ts +0 -177
- package/stories/ox-filters-form-base.stories.ts +0 -179
- package/stories/ox-search-form-change-handler.stories.ts +0 -253
- package/stories/ox-search-form.stories.ts +0 -258
- package/tsconfig.json +0 -24
- package/web-dev-server.config.mjs +0 -27
- package/web-test-runner.config.mjs +0 -41
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit'
|
|
2
|
-
|
|
3
|
-
export const SearchFormStyles = css`
|
|
4
|
-
:host {
|
|
5
|
-
overflow: auto;
|
|
6
|
-
background-color: var(--search-form-background-color, var(--md-sys-color-surface));
|
|
7
|
-
padding: var(--spacing-medium);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.search-form {
|
|
11
|
-
position: relative;
|
|
12
|
-
display: grid;
|
|
13
|
-
grid-template-columns: repeat(24, 1fr);
|
|
14
|
-
grid-gap: var(--form-grid-gap, var(--spacing-medium));
|
|
15
|
-
grid-auto-rows: minmax(24px, auto);
|
|
16
|
-
}
|
|
17
|
-
.search-form label {
|
|
18
|
-
grid-column: span 3;
|
|
19
|
-
text-align: right;
|
|
20
|
-
align-self: center;
|
|
21
|
-
text-transform: capitalize;
|
|
22
|
-
|
|
23
|
-
font-size: var(--md-sys-typescale-label-large-size, 0.875rem);
|
|
24
|
-
color: var(--md-sys-color-on-primary-container);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.search-form input,
|
|
28
|
-
.search-form select {
|
|
29
|
-
grid-column: span 9;
|
|
30
|
-
|
|
31
|
-
border: var(--input-field-border);
|
|
32
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
|
|
33
|
-
border-radius: var(--input-field-border-radius);
|
|
34
|
-
padding: var(--input-field-padding, var(--spacing-tiny));
|
|
35
|
-
font: var(--input-field-font);
|
|
36
|
-
max-width: 85%;
|
|
37
|
-
color: var(--input-field-color, var(--md-sys-color-on-surface-variant));
|
|
38
|
-
background-color: var(--md-sys-color-surface-container-lowest);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.search-form select {
|
|
42
|
-
min-height: 25px;
|
|
43
|
-
max-width: calc(85% + 18px);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.search-form input[type='checkbox'],
|
|
47
|
-
.search-form input[type='radio'] {
|
|
48
|
-
justify-self: end;
|
|
49
|
-
align-self: center;
|
|
50
|
-
grid-column: span 3 / auto;
|
|
51
|
-
position: relative;
|
|
52
|
-
left: 17px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.search-form input[type='checkbox'] + label,
|
|
56
|
-
.search-form input[type='radio'] + label {
|
|
57
|
-
padding-left: 17px;
|
|
58
|
-
text-align: left;
|
|
59
|
-
align-self: center;
|
|
60
|
-
grid-column: span 9 / auto;
|
|
61
|
-
|
|
62
|
-
font: var(--form-sublabel-font);
|
|
63
|
-
color: var(--form-sublabel-color, var(--md-sys-color-secondary));
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
input:focus {
|
|
67
|
-
outline: none;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
input[type='checkbox'] {
|
|
71
|
-
margin: 0;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
[search] {
|
|
75
|
-
position: absolute;
|
|
76
|
-
right: var(--spacing-small);
|
|
77
|
-
bottom: var(--spacing-none);
|
|
78
|
-
color: var(--search-form-icon-color, var(--md-sys-color-primary));
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
input[readonly],
|
|
82
|
-
select[readonly] {
|
|
83
|
-
background-color: #f0f0f0;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
@media screen and (max-width: 460px) {
|
|
87
|
-
.search-form {
|
|
88
|
-
grid-template-columns: repeat(12, 1fr);
|
|
89
|
-
grid-gap: var(--spacing-medium) var(--spacing-medium);
|
|
90
|
-
|
|
91
|
-
max-height: 100%;
|
|
92
|
-
overflow-y: auto;
|
|
93
|
-
}
|
|
94
|
-
.search-form label {
|
|
95
|
-
grid-column: span 3;
|
|
96
|
-
padding-right: 5px;
|
|
97
|
-
align-self: center;
|
|
98
|
-
color: var(--md-sys-color-on-surface);
|
|
99
|
-
}
|
|
100
|
-
.search-form input,
|
|
101
|
-
.search-form select {
|
|
102
|
-
grid-column: span 8;
|
|
103
|
-
max-width: 100%;
|
|
104
|
-
color: var(--md-sys-color-on-surface);
|
|
105
|
-
}
|
|
106
|
-
.search-form input[type='checkbox'],
|
|
107
|
-
.search-form input[type='radio'] {
|
|
108
|
-
justify-self: end;
|
|
109
|
-
align-self: center;
|
|
110
|
-
grid-column: span 3 / auto;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.search-form input[type='checkbox'] + label,
|
|
114
|
-
.search-form input[type='radio'] + label {
|
|
115
|
-
grid-column: span 8 / auto;
|
|
116
|
-
align-self: center;
|
|
117
|
-
position: relative;
|
|
118
|
-
left: 5px;
|
|
119
|
-
color: var(--md-sys-color-on-surface);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
[search] {
|
|
123
|
-
right: var(--spacing-tiny);
|
|
124
|
-
color: var(--md-sys-color-on-surface);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
@media (min-width: 461px) and (max-width: 1024px) {
|
|
128
|
-
.search-form select {
|
|
129
|
-
max-width: calc(85% + 10px);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
@media screen and (min-width: 1201px) and (max-width: 2000px) {
|
|
133
|
-
.search-form {
|
|
134
|
-
grid-template-columns: repeat(36, 1fr);
|
|
135
|
-
}
|
|
136
|
-
.search-form input,
|
|
137
|
-
.search-form select {
|
|
138
|
-
max-width: 90%;
|
|
139
|
-
}
|
|
140
|
-
.search-form select {
|
|
141
|
-
max-width: calc(90% + 18px);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
@media screen and (min-width: 2001px) {
|
|
146
|
-
.search-form {
|
|
147
|
-
grid-template-columns: repeat(48, 1fr);
|
|
148
|
-
}
|
|
149
|
-
.search-form input,
|
|
150
|
-
.search-form select {
|
|
151
|
-
max-width: 90%;
|
|
152
|
-
}
|
|
153
|
-
.search-form select {
|
|
154
|
-
max-width: calc(90% + 18px);
|
|
155
|
-
}
|
|
156
|
-
[search] {
|
|
157
|
-
right: 0.8%;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
`
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit'
|
|
2
|
-
|
|
3
|
-
export const SingleColumnFormStyles = css`
|
|
4
|
-
:host {
|
|
5
|
-
overflow: auto;
|
|
6
|
-
padding: var(--form-container-padding);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.single-column-form {
|
|
10
|
-
width: 100%;
|
|
11
|
-
display: grid;
|
|
12
|
-
grid-template-columns: repeat(12, 1fr);
|
|
13
|
-
grid-gap: var(--form-grid-gap);
|
|
14
|
-
grid-auto-rows: minmax(24px, auto);
|
|
15
|
-
max-width: var(--form-max-width);
|
|
16
|
-
margin: var(--form-margin);
|
|
17
|
-
}
|
|
18
|
-
.single-column-form fieldset {
|
|
19
|
-
display: contents;
|
|
20
|
-
}
|
|
21
|
-
.single-column-form legend {
|
|
22
|
-
grid-column: span 12;
|
|
23
|
-
text-transform: capitalize;
|
|
24
|
-
|
|
25
|
-
padding: var(--legend-padding);
|
|
26
|
-
font: var(--legend-font);
|
|
27
|
-
color: var(--legend-text-color, var(--md-sys-color-on-surface-variant));
|
|
28
|
-
border-bottom: var(--legend-border-bottom);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.single-column-form label {
|
|
32
|
-
grid-column: span 3;
|
|
33
|
-
text-align: right;
|
|
34
|
-
text-transform: capitalize;
|
|
35
|
-
|
|
36
|
-
color: var(--label-color, var(--md-sys-color-on-surface));
|
|
37
|
-
font: var(--label-font);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.single-column-form input,
|
|
41
|
-
.single-column-form table,
|
|
42
|
-
.single-column-form select,
|
|
43
|
-
.single-column-form textarea,
|
|
44
|
-
.single-column-form [custom-input] {
|
|
45
|
-
grid-column: span 8;
|
|
46
|
-
|
|
47
|
-
border: var(--input-field-border);
|
|
48
|
-
border-radius: var(--input-field-border-radius);
|
|
49
|
-
padding: var(--input-field-padding);
|
|
50
|
-
font: var(--input-field-font);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.single-column-form input[type='checkbox'],
|
|
54
|
-
.single-column-form input[type='radio'] {
|
|
55
|
-
justify-self: end;
|
|
56
|
-
align-self: start;
|
|
57
|
-
grid-column: span 3 / auto;
|
|
58
|
-
position: relative;
|
|
59
|
-
left: 17px;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.single-column-form input[type='checkbox'] + label,
|
|
63
|
-
.single-column-form input[type='radio'] + label {
|
|
64
|
-
padding-left: 17px;
|
|
65
|
-
text-align: left;
|
|
66
|
-
grid-column: span 9 / auto;
|
|
67
|
-
|
|
68
|
-
font: var(--form-sublabel-font);
|
|
69
|
-
color: var(--form-sublabel-color, var(--md-sys-color-secondary));
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
input:focus {
|
|
73
|
-
outline: none;
|
|
74
|
-
border: 1px solid var(--focus-background-color, var(--md-sys-color-surface-variant));
|
|
75
|
-
}
|
|
76
|
-
input[type='checkbox'] {
|
|
77
|
-
margin: 0;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
@media screen and (max-width: 460px) {
|
|
81
|
-
.single-column-form {
|
|
82
|
-
max-width: 90%;
|
|
83
|
-
grid-gap: 5px;
|
|
84
|
-
}
|
|
85
|
-
.single-column-form label {
|
|
86
|
-
grid-column: span 12;
|
|
87
|
-
text-align: left;
|
|
88
|
-
align-self: end;
|
|
89
|
-
}
|
|
90
|
-
.single-column-form input,
|
|
91
|
-
.single-column-form table,
|
|
92
|
-
.single-column-form select,
|
|
93
|
-
.single-column-form textarea,
|
|
94
|
-
.single-column-form [custom-input] {
|
|
95
|
-
grid-column: span 12;
|
|
96
|
-
|
|
97
|
-
padding: var(--padding-default, var(--spacing-medium));
|
|
98
|
-
font: normal 15px var(--theme-font);
|
|
99
|
-
}
|
|
100
|
-
.single-column-form input[type='checkbox'],
|
|
101
|
-
.single-column-form input[type='radio'] {
|
|
102
|
-
justify-self: start;
|
|
103
|
-
align-self: center;
|
|
104
|
-
grid-column: span 1 / auto;
|
|
105
|
-
zoom: 1.4;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.single-column-form input[type='checkbox'] + label,
|
|
109
|
-
.single-column-form input[type='radio'] + label {
|
|
110
|
-
grid-column: span 11 / auto;
|
|
111
|
-
align-self: center;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
`
|
package/src/types.ts
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { TemplateResult } from 'lit-html'
|
|
2
|
-
import { OxFiltersFormBase } from './filters/ox-filters-form-base'
|
|
3
|
-
import { OxSearchForm } from './components/ox-search-form'
|
|
4
|
-
|
|
5
|
-
export type FilterOperator =
|
|
6
|
-
| 'search'
|
|
7
|
-
| 'eq'
|
|
8
|
-
| 'between'
|
|
9
|
-
| 'gte'
|
|
10
|
-
| 'lte'
|
|
11
|
-
| 'is_not_true'
|
|
12
|
-
| 'in'
|
|
13
|
-
| 'like'
|
|
14
|
-
| 'i_like'
|
|
15
|
-
| 'noteq'
|
|
16
|
-
| 'is_empty_num_id'
|
|
17
|
-
| 'is_blank'
|
|
18
|
-
| 'is_present'
|
|
19
|
-
| 'is_not_false'
|
|
20
|
-
| 'is_true'
|
|
21
|
-
| 'is_false'
|
|
22
|
-
| 'is_not_null'
|
|
23
|
-
| 'is_null'
|
|
24
|
-
| 'notin_with_null'
|
|
25
|
-
| 'notin'
|
|
26
|
-
| 'gt'
|
|
27
|
-
| 'lt'
|
|
28
|
-
| 'i_nlike'
|
|
29
|
-
| 'nlike'
|
|
30
|
-
|
|
31
|
-
export type SelectOptionObject =
|
|
32
|
-
| {
|
|
33
|
-
name: string
|
|
34
|
-
display?: never
|
|
35
|
-
value: string
|
|
36
|
-
}
|
|
37
|
-
| {
|
|
38
|
-
display: string
|
|
39
|
-
name?: never
|
|
40
|
-
value: string
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export type SelectOption = SelectOptionObject | string
|
|
44
|
-
|
|
45
|
-
export type FilterChangedCallback = (value: any, form: OxFiltersFormBase) => boolean | Promise<boolean>
|
|
46
|
-
|
|
47
|
-
export type FilterConfig = {
|
|
48
|
-
name: string
|
|
49
|
-
label: string
|
|
50
|
-
type: string
|
|
51
|
-
operator?: FilterOperator
|
|
52
|
-
options?:
|
|
53
|
-
| { [key: string]: any }
|
|
54
|
-
| SelectOption[]
|
|
55
|
-
| ((form: OxFiltersFormBase) => SelectOption[] | Promise<SelectOption[]>)
|
|
56
|
-
value?:
|
|
57
|
-
| string
|
|
58
|
-
| number
|
|
59
|
-
| boolean
|
|
60
|
-
| { name: string; [params: string]: any }
|
|
61
|
-
| string[]
|
|
62
|
-
| number[]
|
|
63
|
-
| { name: string; [params: string]: any }[]
|
|
64
|
-
| undefined
|
|
65
|
-
boundTo?: string[]
|
|
66
|
-
hidden?: boolean
|
|
67
|
-
readonly?: boolean
|
|
68
|
-
onchange?: FilterChangedCallback
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export type FilterValue = {
|
|
72
|
-
name: string
|
|
73
|
-
operator: FilterOperator
|
|
74
|
-
value: string | number | boolean | string[] | number[] | undefined
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export type FilterSelectRenderer = (
|
|
78
|
-
filter: FilterConfig,
|
|
79
|
-
value: string | number | boolean | string[] | number[] | any | undefined,
|
|
80
|
-
owner: Element
|
|
81
|
-
) => TemplateResult | string | void
|
|
82
|
-
|
|
83
|
-
export type SearchFilterChangedCallback = (value: any, form: OxSearchForm) => boolean | Promise<boolean>
|
|
84
|
-
|
|
85
|
-
export type SearchFormField = {
|
|
86
|
-
type: string
|
|
87
|
-
hidden?: boolean
|
|
88
|
-
name?: string
|
|
89
|
-
id?: string
|
|
90
|
-
label?: string
|
|
91
|
-
placeholder?: string
|
|
92
|
-
value?: any
|
|
93
|
-
field?: string
|
|
94
|
-
queryName?: string
|
|
95
|
-
props?: { [prop: string]: string }
|
|
96
|
-
attrs?: string[]
|
|
97
|
-
options?: SelectOption[] | ((form: OxSearchForm) => SelectOption[] | Promise<SelectOption[]>)
|
|
98
|
-
boundTo?: string[]
|
|
99
|
-
readonly?: boolean
|
|
100
|
-
handlers?: { [event: string]: EventListener }
|
|
101
|
-
onchange?: SearchFilterChangedCallback
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export type PersonalFilterPreference = {
|
|
105
|
-
filters?: Partial<FilterConfig>[]
|
|
106
|
-
}
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { CommonHeaderStyles } from '@operato/styles'
|
|
2
|
-
import '../src/filters/ox-filters-form-base.js'
|
|
3
|
-
|
|
4
|
-
import { html, TemplateResult } from 'lit'
|
|
5
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'ox-filters-form-barcode',
|
|
9
|
-
component: 'ox-filters-form-base',
|
|
10
|
-
argTypes: {
|
|
11
|
-
value: { control: 'object' },
|
|
12
|
-
filters: { control: 'object' },
|
|
13
|
-
urlParamsSensitive: { control: 'boolean' }
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
interface Story<T> {
|
|
18
|
-
(args: T): TemplateResult
|
|
19
|
-
args?: Partial<T>
|
|
20
|
-
argTypes?: Record<string, unknown>
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
interface ArgTypes {
|
|
24
|
-
value?: object
|
|
25
|
-
filters?: object
|
|
26
|
-
urlParamsSensitive: boolean
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const Template: Story<ArgTypes> = ({ value, filters, urlParamsSensitive }: ArgTypes) => html`
|
|
30
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
31
|
-
|
|
32
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
|
33
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
|
34
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
35
|
-
<link href="/themes/form-theme.css" rel="stylesheet" />
|
|
36
|
-
|
|
37
|
-
<link
|
|
38
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
39
|
-
rel="stylesheet"
|
|
40
|
-
/>
|
|
41
|
-
<link
|
|
42
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
43
|
-
rel="stylesheet"
|
|
44
|
-
/>
|
|
45
|
-
<link
|
|
46
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
47
|
-
rel="stylesheet"
|
|
48
|
-
/>
|
|
49
|
-
|
|
50
|
-
<style>
|
|
51
|
-
${MDTypeScaleStyles.cssText}
|
|
52
|
-
</style>
|
|
53
|
-
|
|
54
|
-
<style>
|
|
55
|
-
${CommonHeaderStyles.cssText}
|
|
56
|
-
</style>
|
|
57
|
-
|
|
58
|
-
<style>
|
|
59
|
-
body {
|
|
60
|
-
width: 100%;
|
|
61
|
-
height: 500px;
|
|
62
|
-
text-align: center;
|
|
63
|
-
|
|
64
|
-
background-color: var(--md-sys-color-background);
|
|
65
|
-
color: var(--md-sys-color-on-background);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.header {
|
|
69
|
-
padding: var(--spacing-small) var(--spacing-medium);
|
|
70
|
-
background-color: var(--md-sys-color-primary-container);
|
|
71
|
-
color: var(--md-sys-color-on-primary-container);
|
|
72
|
-
}
|
|
73
|
-
</style>
|
|
74
|
-
|
|
75
|
-
<div class="header">
|
|
76
|
-
<div class="filters">
|
|
77
|
-
<ox-filters-form-base
|
|
78
|
-
.value=${value}
|
|
79
|
-
.filters=${filters}
|
|
80
|
-
?url-params-sensitive=${urlParamsSensitive}
|
|
81
|
-
@filters-change=${(e: CustomEvent) => {
|
|
82
|
-
console.log('filters changed', e.detail)
|
|
83
|
-
}}
|
|
84
|
-
>
|
|
85
|
-
</ox-filters-form-base>
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
88
|
-
`
|
|
89
|
-
|
|
90
|
-
export const Regular = Template.bind({})
|
|
91
|
-
Regular.args = {
|
|
92
|
-
filters: [
|
|
93
|
-
{
|
|
94
|
-
name: 'test',
|
|
95
|
-
type: 'barcode',
|
|
96
|
-
label: 'name',
|
|
97
|
-
operator: 'eq'
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
name: 'active',
|
|
101
|
-
type: 'boolean',
|
|
102
|
-
label: 'active',
|
|
103
|
-
operator: 'eq'
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
name: 'sss',
|
|
107
|
-
type: 'select',
|
|
108
|
-
label: 'sss',
|
|
109
|
-
operator: 'eq',
|
|
110
|
-
options: () => {
|
|
111
|
-
return [
|
|
112
|
-
{
|
|
113
|
-
display: '',
|
|
114
|
-
value: ''
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
display: 'ABC',
|
|
118
|
-
value: 'ABC'
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
display: 'DEF',
|
|
122
|
-
value: 'DEF'
|
|
123
|
-
}
|
|
124
|
-
]
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
name: 'range',
|
|
129
|
-
type: 'number',
|
|
130
|
-
label: 'range',
|
|
131
|
-
operator: 'between'
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
name: 'date-range',
|
|
135
|
-
type: 'datetime',
|
|
136
|
-
label: 'date',
|
|
137
|
-
operator: 'between'
|
|
138
|
-
}
|
|
139
|
-
]
|
|
140
|
-
}
|