willba-component-library 0.3.27 → 0.4.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/README.md +75 -123
- package/lib/components/FilterBar/FilterBar.d.ts +1 -1
- package/lib/components/FilterCalendar/FilterCalendar.d.ts +1 -1
- package/lib/core/i18n/I18nProvider.d.ts +6 -0
- package/lib/core/i18n/index.d.ts +1 -0
- package/lib/embed.d.ts +21 -0
- package/lib/embed.esm.js +74 -0
- package/lib/embed.esm.js.map +1 -0
- package/lib/embed.umd.js +74 -0
- package/lib/embed.umd.js.map +1 -0
- package/lib/i18n.d.ts +2 -2
- package/lib/index.d.ts +2 -2
- package/lib/index.esm.js +1111 -930
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +1110 -929
- package/lib/index.js.map +1 -1
- package/package.json +9 -1
- package/.nvmrc +0 -1
- package/.storybook/main.ts +0 -17
- package/.storybook/preview.ts +0 -15
- package/lib/components/FilterBar/components/buttons/index.d.ts +0 -4
- package/lib/components/FilterBar/components/buttons/select-button/SelectButton.d.ts +0 -13
- package/lib/components/FilterBar/components/buttons/tab-button/TabButton.d.ts +0 -10
- package/lib/components/FilterBar/components/cards/image-card/ImageCard.d.ts +0 -11
- package/lib/components/FilterBar/components/cards/index.d.ts +0 -1
- package/lib/components/FilterBar/components/categories/Categories.d.ts +0 -8
- package/lib/components/FilterBar/components/common/FilterSectionHeader.d.ts +0 -8
- package/lib/components/FilterBar/components/dates/Dates.d.ts +0 -17
- package/lib/components/FilterBar/components/dates/index.d.ts +0 -1
- package/lib/components/FilterBar/components/guests/GuestCount/GuestCount.d.ts +0 -4
- package/lib/components/FilterBar/components/guests/Guests.d.ts +0 -12
- package/lib/components/FilterBar/components/locations/Locations.d.ts +0 -14
- package/lib/components/FilterBar/hooks/useFilterBar.d.ts +0 -32
- package/lib/components/FilterBar/hooks/useFilterUi.d.ts +0 -8
- package/lib/components/FilterBar/utils/calculateDropdownPosition.d.ts +0 -12
- package/lib/components/FilterBar/utils/getLocalizedContent.d.ts +0 -8
- package/lib/core/components/buttons/close-button/CloseButton.d.ts +0 -7
- package/lib/core/components/buttons/submit-button/SubmitButton.d.ts +0 -14
- package/lib/index.umd.js +0 -12489
- package/lib/index.umd.js.map +0 -1
- package/prettier.config.js +0 -6
- package/rollup.config.mjs +0 -63
- package/src/assets/IconsSvg.tsx +0 -69
- package/src/components/Button/Button.stories.tsx +0 -34
- package/src/components/Button/Button.tsx +0 -56
- package/src/components/Button/button.css +0 -30
- package/src/components/Button/index.ts +0 -1
- package/src/components/FilterBar/FilterBar.css +0 -35
- package/src/components/FilterBar/FilterBar.stories.tsx +0 -116
- package/src/components/FilterBar/FilterBar.tsx +0 -64
- package/src/components/FilterBar/FilterBarTypes.ts +0 -71
- package/src/components/FilterBar/components/Divider/Divider.css +0 -14
- package/src/components/FilterBar/components/Divider/Divider.tsx +0 -7
- package/src/components/FilterBar/components/FilterControls/FilterControls.css +0 -22
- package/src/components/FilterBar/components/FilterControls/FilterControls.tsx +0 -139
- package/src/components/FilterBar/components/FilterPanels/Categories/Categories.css +0 -21
- package/src/components/FilterBar/components/FilterPanels/Categories/Categories.tsx +0 -49
- package/src/components/FilterBar/components/FilterPanels/Dates/Dates.css +0 -9
- package/src/components/FilterBar/components/FilterPanels/Dates/Dates.tsx +0 -60
- package/src/components/FilterBar/components/FilterPanels/FilterPanels.css +0 -22
- package/src/components/FilterBar/components/FilterPanels/FilterPanels.tsx +0 -111
- package/src/components/FilterBar/components/FilterPanels/Guests/GuestCount/GuestCount.css +0 -58
- package/src/components/FilterBar/components/FilterPanels/Guests/GuestCount/GuestCount.tsx +0 -85
- package/src/components/FilterBar/components/FilterPanels/Guests/Guests.css +0 -24
- package/src/components/FilterBar/components/FilterPanels/Guests/Guests.tsx +0 -59
- package/src/components/FilterBar/components/FilterPanels/Locations/Locations.css +0 -16
- package/src/components/FilterBar/components/FilterPanels/Locations/Locations.tsx +0 -94
- package/src/components/FilterBar/components/FilterPanels/SectionHeader/SectionHeader.css +0 -34
- package/src/components/FilterBar/components/FilterPanels/SectionHeader/SectionHeader.tsx +0 -17
- package/src/components/FilterBar/components/FilterTabs/FilterTabs.css +0 -10
- package/src/components/FilterBar/components/FilterTabs/FilterTabs.tsx +0 -50
- package/src/components/FilterBar/components/ImageCard/ImageCard.css +0 -30
- package/src/components/FilterBar/components/ImageCard/ImageCard.tsx +0 -45
- package/src/components/FilterBar/components/SelectButton/SelectButton.css +0 -76
- package/src/components/FilterBar/components/SelectButton/SelectButton.tsx +0 -54
- package/src/components/FilterBar/components/TabButton/TabButton.css +0 -36
- package/src/components/FilterBar/components/TabButton/TabButton.tsx +0 -23
- package/src/components/FilterBar/components/index.ts +0 -6
- package/src/components/FilterBar/hooks/index.ts +0 -5
- package/src/components/FilterBar/hooks/useFilterActions.tsx +0 -126
- package/src/components/FilterBar/hooks/useFilterRefs.tsx +0 -21
- package/src/components/FilterBar/hooks/useFilterState.tsx +0 -86
- package/src/components/FilterBar/hooks/usePanelPosition.tsx +0 -52
- package/src/components/FilterBar/hooks/useScrollInToView.tsx +0 -29
- package/src/components/FilterBar/index.ts +0 -3
- package/src/components/FilterBar/providers/FilterBarProvider.tsx +0 -172
- package/src/components/FilterBar/providers/index.ts +0 -1
- package/src/components/FilterBar/utils/ageCategoriesRules.ts +0 -27
- package/src/components/FilterBar/utils/index.tsx +0 -3
- package/src/components/FilterBar/utils/parseGuests.tsx +0 -65
- package/src/components/FilterBar/utils/parseLocations.ts +0 -28
- package/src/components/FilterCalendar/FilterCalendar.css +0 -109
- package/src/components/FilterCalendar/FilterCalendar.stories.tsx +0 -554
- package/src/components/FilterCalendar/FilterCalendar.tsx +0 -115
- package/src/components/FilterCalendar/FilterCalendarTypes.ts +0 -11
- package/src/components/FilterCalendar/components/Footer.tsx +0 -96
- package/src/components/FilterCalendar/hooks/useFilterCalendar.ts +0 -163
- package/src/components/FilterCalendar/index.ts +0 -3
- package/src/core/components/buttons/CloseButton/CloseButton.css +0 -33
- package/src/core/components/buttons/CloseButton/CloseButton.tsx +0 -16
- package/src/core/components/buttons/SubmitButton/SubmitButton.css +0 -54
- package/src/core/components/buttons/SubmitButton/SubmitButton.tsx +0 -42
- package/src/core/components/calendar/Calendar.css +0 -280
- package/src/core/components/calendar/Calendar.tsx +0 -253
- package/src/core/components/calendar/CalendarTypes.ts +0 -48
- package/src/core/components/calendar/hooks/index.ts +0 -3
- package/src/core/components/calendar/hooks/useCalendarLoadingSpinner.tsx +0 -19
- package/src/core/components/calendar/hooks/useCalendarTooltips.tsx +0 -125
- package/src/core/components/calendar/hooks/useUpdateDisabledDates.tsx +0 -105
- package/src/core/components/calendar/utils/calendarSelectionRules.tsx +0 -180
- package/src/core/components/calendar/utils/checkForContinuousSelection.tsx +0 -86
- package/src/core/components/calendar/utils/disabledDatesByPage.tsx +0 -31
- package/src/core/components/calendar/utils/handleCalendarModifiers.tsx +0 -118
- package/src/core/components/calendar/utils/handleRangeContextDisabledDates.tsx +0 -75
- package/src/core/components/calendar/utils/index.ts +0 -8
- package/src/core/components/calendar/utils/nightsCount.tsx +0 -19
- package/src/core/components/calendar/utils/parseDate.tsx +0 -17
- package/src/core/components/calendar/utils/parseDates.tsx +0 -12
- package/src/core/components/index.ts +0 -7
- package/src/core/hooks/index.ts +0 -4
- package/src/core/hooks/useAutoFocus.tsx +0 -27
- package/src/core/hooks/useAwaitRender.tsx +0 -12
- package/src/core/hooks/useCloseFilterSection.tsx +0 -29
- package/src/core/hooks/useUpdateTranslations.tsx +0 -14
- package/src/i18n.ts +0 -27
- package/src/index.ts +0 -8
- package/src/locales/en/common.json +0 -18
- package/src/locales/en/filterBar.json +0 -33
- package/src/locales/fi/common.json +0 -19
- package/src/locales/fi/filterBar.json +0 -33
- package/src/themes/Default.css +0 -69
- package/src/themes/useTheme.tsx +0 -27
- package/stories/Button.stories.ts +0 -50
- package/stories/Button.tsx +0 -53
- package/stories/Configure.mdx +0 -364
- package/stories/Header.stories.ts +0 -27
- package/stories/Header.tsx +0 -70
- package/stories/Page.stories.ts +0 -29
- package/stories/Page.tsx +0 -91
- package/stories/assets/accessibility.png +0 -0
- package/stories/assets/accessibility.svg +0 -5
- package/stories/assets/addon-library.png +0 -0
- package/stories/assets/assets.png +0 -0
- package/stories/assets/context.png +0 -0
- package/stories/assets/discord.svg +0 -15
- package/stories/assets/docs.png +0 -0
- package/stories/assets/figma-plugin.png +0 -0
- package/stories/assets/github.svg +0 -3
- package/stories/assets/share.png +0 -0
- package/stories/assets/styling.png +0 -0
- package/stories/assets/testing.png +0 -0
- package/stories/assets/theming.png +0 -0
- package/stories/assets/tutorials.svg +0 -12
- package/stories/assets/youtube.svg +0 -4
- package/stories/button.css +0 -30
- package/stories/header.css +0 -32
- package/stories/page.css +0 -69
- package/tsconfig.json +0 -29
- /package/lib/components/FilterBar/components/{divider → Divider}/Divider.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,165 +1,117 @@
|
|
|
1
1
|
## Description
|
|
2
2
|
|
|
3
|
-
Willba Component Library is a custom UI component collection that can be
|
|
3
|
+
Willba Component Library is a custom UI component collection that can be used across multiple platforms — as an [npm package](https://www.npmjs.com/package/willba-component-library) inside a React app, or as a standalone `<script>` snippet on any website.
|
|
4
4
|
|
|
5
5
|
<div style="display: flex; gap: 20px;">
|
|
6
|
-
<img src="https://lh3.googleusercontent.com/
|
|
6
|
+
<img src="https://lh3.googleusercontent.com/d/1n5U0vBMseBci4xV5wH8vApeAcRjcyos_" alt="Filter Bar Calendar" style="width: auto; max-width: 50%;">
|
|
7
7
|
<img src="https://lh3.googleusercontent.com/d/1KCTqGgM2IZDY2nZ1ZTDf9WgX_zhmVB6D" alt="Filter Bar Guests" style="width: auto; max-width: 50%;">
|
|
8
8
|
</div>
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Components
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
| HTML tag | React component |
|
|
13
|
+
| --------------------- | --------------- |
|
|
14
|
+
| `<willba-filter-bar>` | `FilterBar` |
|
|
15
|
+
|
|
16
|
+
## Use in a React app
|
|
17
|
+
|
|
18
|
+
Install:
|
|
13
19
|
|
|
14
20
|
```sh
|
|
15
|
-
// with npm
|
|
16
21
|
npm install willba-component-library
|
|
17
|
-
|
|
18
|
-
// with yarn
|
|
22
|
+
# or
|
|
19
23
|
yarn add willba-component-library
|
|
20
24
|
```
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
Import and render:
|
|
23
27
|
|
|
24
28
|
```jsx
|
|
25
|
-
import React from 'react'
|
|
26
|
-
import ReactDOM from 'react-dom'
|
|
27
29
|
import { FilterBar } from 'willba-component-library'
|
|
28
30
|
|
|
29
|
-
function
|
|
31
|
+
export function MyPage() {
|
|
30
32
|
return (
|
|
31
33
|
<FilterBar
|
|
32
|
-
redirectUrl=
|
|
33
|
-
language=
|
|
34
|
-
|
|
35
|
-
disabledDatesByPage: [
|
|
36
|
-
{
|
|
37
|
-
offset: 7,
|
|
38
|
-
page: '/rooms',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
offset: -1,
|
|
42
|
-
page: '/events',
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
}}
|
|
46
|
-
mode={'dark'}
|
|
47
|
-
ageCategories={[
|
|
48
|
-
{
|
|
49
|
-
id: '2',
|
|
50
|
-
name: 'Alle 6 vuotiaat',
|
|
51
|
-
minVal: 0,
|
|
52
|
-
sortOrder: 3,
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
id: '3',
|
|
56
|
-
name: '6-16 vuotiaat',
|
|
57
|
-
minVal: 0,
|
|
58
|
-
sortOrder: 2,
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
id: '1',
|
|
62
|
-
name: 'Aikuiset',
|
|
63
|
-
minVal: 1,
|
|
64
|
-
sortOrder: 1,
|
|
65
|
-
},
|
|
66
|
-
]}
|
|
34
|
+
redirectUrl="https://store.vendor.willba.app/"
|
|
35
|
+
language="en"
|
|
36
|
+
mode="dark"
|
|
67
37
|
tabs={[
|
|
68
|
-
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
label: 'Events',
|
|
76
|
-
path: '/events',
|
|
77
|
-
default: false,
|
|
78
|
-
order: 1,
|
|
79
|
-
},
|
|
38
|
+
{ label: 'Rooms', path: '/rooms', default: true, order: 1 },
|
|
39
|
+
{ label: 'Events', path: '/events', default: false, order: 2 },
|
|
40
|
+
]}
|
|
41
|
+
ageCategories={[
|
|
42
|
+
{ id: '1', name: 'Adults', minVal: 1, sortOrder: 1 },
|
|
43
|
+
{ id: '2', name: 'Children', minVal: 0, sortOrder: 2 },
|
|
80
44
|
]}
|
|
81
45
|
locations={{
|
|
82
46
|
multiSelect: false,
|
|
83
|
-
|
|
84
|
-
data: [
|
|
85
|
-
{
|
|
86
|
-
id: 1,
|
|
87
|
-
label: 'Helsinki',
|
|
88
|
-
description: 'Capital of Finland',
|
|
89
|
-
imageUrl: 'https://example.com/helsinki.jpg',
|
|
90
|
-
},
|
|
91
|
-
],
|
|
47
|
+
data: [{ id: 1, label: 'Helsinki', description: 'Capital of Finland' }],
|
|
92
48
|
}}
|
|
93
49
|
/>
|
|
94
50
|
)
|
|
95
51
|
}
|
|
96
|
-
|
|
97
|
-
ReactDOM.render(<App />, document.querySelector('#app'))
|
|
98
52
|
```
|
|
99
53
|
|
|
100
|
-
|
|
54
|
+
See [FilterBar props](#filterbar-props) for all available props. TypeScript types are exported as `FilterBarTypes` and `FilterCalendarTypes`.
|
|
55
|
+
|
|
56
|
+
## Use as a script tag (WordPress, plain HTML, anywhere)
|
|
57
|
+
|
|
58
|
+
Two lines. Set `domain` to the host that serves the filter bar config — the element fetches it on mount and renders.
|
|
101
59
|
|
|
102
60
|
```html
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
></
|
|
61
|
+
<willba-filter-bar
|
|
62
|
+
domain="customer.willba.store"
|
|
63
|
+
mode="dark"
|
|
64
|
+
></willba-filter-bar>
|
|
65
|
+
<script src="https://cdn.jsdelivr.net/npm/willba-component-library@0.4.1/lib/embed.umd.js"></script>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The element auto-fetches `https://{domain}/api/services/filter-bar-config?locale=...` and renders inside an isolated Shadow DOM. React, ReactDOM, i18n, and all CSS are bundled inside the script — nothing on the host page can interfere with it, and it cannot interfere with the host page.
|
|
107
69
|
|
|
108
|
-
|
|
109
|
-
<script src="https://unpkg.com/react-dom@18.3.1/umd/react-dom.production.min.js"></script>
|
|
110
|
-
<script src="https://cdn.jsdelivr.net/npm/willba-component-library@0.3.27/lib/index.umd.js"></script>
|
|
70
|
+
### Available HTML attributes
|
|
111
71
|
|
|
72
|
+
| Attribute | Purpose | Default |
|
|
73
|
+
| ----------------- | ----------------------------------------------------------------------------- | ------------------------------------ |
|
|
74
|
+
| `domain` | Host that serves the filter bar config API. Triggers auto-fetch when present. | (none — element waits for `.props=`) |
|
|
75
|
+
| `mode` | `"dark"` or `"light"`. | (whatever the API returns) |
|
|
76
|
+
| `language` | `"en"` or `"fi"`. | `navigator.language` |
|
|
77
|
+
| `fallback-locale` | Locale to use if `navigator.language` is unavailable. | `"fi"` |
|
|
78
|
+
| `redirect-url` | URL to redirect to after submit. | `https://{domain}` |
|
|
79
|
+
|
|
80
|
+
Protocol is auto-detected: `http://` for `localhost` / `127.0.0.1` hosts, `https://` everywhere else.
|
|
81
|
+
|
|
82
|
+
### Configuration precedence
|
|
83
|
+
|
|
84
|
+
When multiple sources set the same prop, the higher one wins:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
API response → HTML attributes → el.props (programmatic)
|
|
88
|
+
(lowest) (highest)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
So a customer's API can ship sensible defaults, and a single embed can override `mode` or `language` per page without touching the API.
|
|
92
|
+
|
|
93
|
+
### Programmatic control (advanced)
|
|
94
|
+
|
|
95
|
+
For full programmatic control — including complex props like `tabs`, `locations`, `ageCategories`, `palette` that don't fit in HTML attributes — set `.props` directly:
|
|
96
|
+
|
|
97
|
+
```html
|
|
98
|
+
<willba-filter-bar id="fb"></willba-filter-bar>
|
|
99
|
+
<script src="https://cdn.jsdelivr.net/npm/willba-component-library@0.4.1/lib/embed.umd.js"></script>
|
|
112
100
|
<script>
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
const fallbackLocale = 'fi'
|
|
121
|
-
// Set request timeout in milliseconds
|
|
122
|
-
const requestTimeout = 10000
|
|
123
|
-
|
|
124
|
-
const locale = (navigator.language || fallbackLocale).split('-')[0]
|
|
125
|
-
const url = `https://${domain}/api/services/filter-bar-config?locale=${locale}`
|
|
126
|
-
|
|
127
|
-
const response = await fetch(url, {
|
|
128
|
-
method: 'GET',
|
|
129
|
-
headers: { Accept: 'application/json' },
|
|
130
|
-
signal: AbortSignal.timeout(requestTimeout),
|
|
131
|
-
})
|
|
132
|
-
|
|
133
|
-
if (!response.ok) return
|
|
134
|
-
|
|
135
|
-
const { filterBarConfig } = await response.json()
|
|
136
|
-
if (!filterBarConfig) return
|
|
137
|
-
|
|
138
|
-
const filterBarContainer = document.getElementById('will-filter-bar')
|
|
139
|
-
const WillbaFilterBar = WillbaComponentLibrary?.FilterBar
|
|
140
|
-
|
|
141
|
-
if (!filterBarContainer || !WillbaFilterBar) return
|
|
142
|
-
|
|
143
|
-
const root = ReactDOM.createRoot(filterBarContainer)
|
|
144
|
-
root.render(
|
|
145
|
-
React.createElement(WillbaFilterBar, {
|
|
146
|
-
...filterBarConfig,
|
|
147
|
-
redirectUrl: `https://${domain}`,
|
|
148
|
-
mode,
|
|
149
|
-
})
|
|
150
|
-
)
|
|
151
|
-
} catch (error) {
|
|
152
|
-
console.error('Failed to render filter bar:', error)
|
|
153
|
-
}
|
|
101
|
+
document.getElementById('fb').props = {
|
|
102
|
+
redirectUrl: 'https://store.vendor.willba.app/',
|
|
103
|
+
language: 'en',
|
|
104
|
+
mode: 'dark',
|
|
105
|
+
tabs: [{ label: 'Rooms', path: '/rooms', default: true, order: 1 }],
|
|
106
|
+
ageCategories: [{ id: '1', name: 'Adults', minVal: 1, sortOrder: 1 }],
|
|
107
|
+
locations: { multiSelect: false, data: [{ id: 1, label: 'Helsinki' }] },
|
|
154
108
|
}
|
|
155
|
-
|
|
156
|
-
window.addEventListener('DOMContentLoaded', () => {
|
|
157
|
-
renderFilterBar()
|
|
158
|
-
})
|
|
159
109
|
</script>
|
|
160
110
|
```
|
|
161
111
|
|
|
162
|
-
|
|
112
|
+
Re-assigning `.props` re-renders the element. Setting `.props` before the element upgrades is safe — the value is buffered and applied automatically. To merge with existing props instead of replacing, spread first: `el.props = { ...el.props, language: 'fi' }`.
|
|
113
|
+
|
|
114
|
+
## FilterBar props
|
|
163
115
|
|
|
164
116
|
| Name | Value | Description |
|
|
165
117
|
| -------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -2,4 +2,4 @@ import React from 'react';
|
|
|
2
2
|
import { FilterBarTypes } from './FilterBarTypes';
|
|
3
3
|
import '../../themes/Default.css';
|
|
4
4
|
import './FilterBar.css';
|
|
5
|
-
export declare const FilterBar: (
|
|
5
|
+
export declare const FilterBar: (props: FilterBarTypes) => React.JSX.Element;
|
|
@@ -2,4 +2,4 @@ import React from 'react';
|
|
|
2
2
|
import { FilterCalendarTypes } from './FilterCalendarTypes';
|
|
3
3
|
import '../../themes/Default.css';
|
|
4
4
|
import './FilterCalendar.css';
|
|
5
|
-
export default function FilterCalendar(
|
|
5
|
+
export default function FilterCalendar(props: FilterCalendarTypes): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { I18nProvider } from './I18nProvider';
|
package/lib/embed.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FilterBarTypes } from './components/FilterBar/FilterBarTypes';
|
|
3
|
+
declare abstract class WillbaElement<P extends object> extends HTMLElement {
|
|
4
|
+
private _props;
|
|
5
|
+
private _root;
|
|
6
|
+
private _shadow;
|
|
7
|
+
private _container;
|
|
8
|
+
set props(value: Partial<P>);
|
|
9
|
+
get props(): Partial<P>;
|
|
10
|
+
protected abstract renderReact(props: Partial<P>): React.ReactNode;
|
|
11
|
+
connectedCallback(): void;
|
|
12
|
+
disconnectedCallback(): void;
|
|
13
|
+
private _render;
|
|
14
|
+
}
|
|
15
|
+
export declare class WillbaFilterBarElement extends WillbaElement<FilterBarTypes> {
|
|
16
|
+
private _autoFetchTriggered;
|
|
17
|
+
protected renderReact(props: Partial<FilterBarTypes>): React.JSX.Element;
|
|
18
|
+
connectedCallback(): void;
|
|
19
|
+
private _loadConfigFromApi;
|
|
20
|
+
}
|
|
21
|
+
export {};
|