@table-bro/native 0.0.0-stage → 1.1.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/LICENSE +21 -0
- package/README.md +81 -2
- package/THIRD_PARTY_NOTICES.md +69 -0
- package/dist/table-bro.native.d.ts +185 -0
- package/dist/table-bro.native.esm.js +113 -0
- package/dist/table-bro.native.esm.js.map +1 -0
- package/dist/table-bro.native.min.css +1 -0
- package/dist/table-bro.native.umd.js +113 -0
- package/dist/table-bro.native.umd.js.map +1 -0
- package/package.json +62 -4
- package/styles/_table-bro.api.scss +3 -0
- package/styles/_table-bro.native.api.scss +5 -0
- package/styles/mixins/_text-ellipsis.scss +5 -0
- package/styles/skin/shared/_variables.scss +94 -0
- package/styles/skin/shared/mixins/_custom-properties.scss +39 -0
- package/styles/skin/shared/mixins/_progress-bar.scss +27 -0
- package/styles/skin/shared/mixins/_shared.scss +87 -0
- package/styles/skin/shared/mixins/_skin-colors.scss +64 -0
- package/styles/skin/shared/mixins/_slide-toggle.scss +5 -0
- package/styles/skin/shared/mixins/_sort-header.scss +11 -0
- package/styles/skin/shared/mixins/_toolbar.scss +61 -0
- package/styles/skin/shared/table-bro/_details.scss +11 -0
- package/styles/skin/shared/table-bro/_filter-drawer.scss +62 -0
- package/styles/skin/shared/table-bro/_shadows.scss +19 -0
- package/styles/skin/shared/table-bro/_state.scss +38 -0
- package/styles/skin/shared/table-bro/_table.scss +70 -0
- package/styles/skin/shared/table-bro/_text-ellipsis.scss +14 -0
- package/styles/skin/vanilla-js/native/_themes.scss +45 -0
- package/styles/skin/vanilla-js/native/_variables.scss +54 -0
- package/styles/skin/vanilla-js/native/components/bootstrap-based/_paginator.scss +50 -0
- package/styles/skin/vanilla-js/native/components/bootstrap-based/_toolbar.scss +99 -0
- package/styles/skin/vanilla-js/native/table-bro/_button.scss +16 -0
- package/styles/skin/vanilla-js/native/table-bro/_filter-drawer.scss +10 -0
- package/styles/skin/vanilla-js/native/table-bro/_progress-bar.scss +24 -0
- package/styles/skin/vanilla-js/native/table-bro/_table.scss +16 -0
- package/styles/skin/vanilla-js/native/table-bro/_toolbar-search.scss +17 -0
- package/styles/skin/vanilla-js/native/table-bro/_toolbar.scss +19 -0
- package/styles/skin/vanilla-js/shared/_bootstrap-adapter.scss +9 -0
- package/styles/skin/vanilla-js/shared/_skin.scss +70 -0
- package/styles/skin/vanilla-js/shared/components/bootstrap-based/_button.scss +9 -0
- package/styles/skin/vanilla-js/shared/components/material-based/_paginator.scss +62 -0
- package/styles/skin/vanilla-js/shared/components/material-based/_sort-header.scss +134 -0
- package/styles/skin/vanilla-js/shared/components/material-based/_table.scss +11 -0
- package/styles/skin/vanilla-js/shared/table-bro/_filter-drawer.scss +13 -0
- package/styles/skin/vanilla-js/shared/table-bro/_paginator.scss +5 -0
- package/styles/skin/vanilla-js/shared/table-bro/_toolbar-search.scss +31 -0
- package/styles/skin/vanilla-js/shared/table-bro/_toolbar.scss +39 -0
- package/styles/skin/vanilla-js/shared/vendor-extensions/material-based/_paginator.scss +12 -0
- package/styles/table-bro.native.scss +43 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Table, Bro
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,82 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @table-bro/native
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The native skin of [Table, Bro](https://table-bro.com): data tables on the native controls of the browser, without a
|
|
4
|
+
UI library. The skin is `nv`.
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
npm install @table-bro/core @table-bro/native
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Use
|
|
13
|
+
|
|
14
|
+
Link the CSS of the core and of the skin, each from its package:
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<link rel="stylesheet" href="node_modules/@table-bro/core/dist/table-bro.min.css">
|
|
18
|
+
<link rel="stylesheet" href="node_modules/@table-bro/native/dist/table-bro.native.min.css">
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Import the core and the skin once, before the tables. The import registers the skin:
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import '@table-bro/core';
|
|
25
|
+
import '@table-bro/native';
|
|
26
|
+
|
|
27
|
+
const table = document.createElement('table-bro');
|
|
28
|
+
|
|
29
|
+
table.configure({
|
|
30
|
+
cols: [
|
|
31
|
+
{title: 'Description', name: 'description'},
|
|
32
|
+
{title: 'Price', name: 'price', dataType: 'number', className: 'bro-col_text-right'}
|
|
33
|
+
],
|
|
34
|
+
rows: [{description: 'Modern Cotton Chair', price: 1}],
|
|
35
|
+
conf: {skin: 'nv'}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
document.body.append(table);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Without a bundler, load the UMD build after the core: it puts the skin on the `TableBroNative` global.
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<script src="https://cdn.jsdelivr.net/npm/@table-bro/core@1.1.0/dist/table-bro.umd.js"></script>
|
|
45
|
+
<script src="https://cdn.jsdelivr.net/npm/@table-bro/native@1.1.0/dist/table-bro.native.umd.js"></script>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Load one vanilla skin per page: `@table-bro/native` and `@table-bro/bootstrap` share elements, and the skin loaded
|
|
49
|
+
second warns about it.
|
|
50
|
+
|
|
51
|
+
## Elements for cells
|
|
52
|
+
|
|
53
|
+
The elements of the cells are optional: a page carries their code only when it defines them. After the import of the
|
|
54
|
+
skin, `withTags()` defines `bro-nv-tags` and `withSwitch()` defines `bro-switch`:
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import {withSwitch, withTags} from '@table-bro/native';
|
|
58
|
+
|
|
59
|
+
withTags();
|
|
60
|
+
withSwitch();
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Or define an element itself: `customElements.define('bro-nv-tags', BroNativeTagsComponent)`. The UMD build carries the code of both
|
|
64
|
+
and has the same functions on its global, as `TableBroNative.withTags()`. A table that uses an element that is not defined
|
|
65
|
+
names its function in the console.
|
|
66
|
+
|
|
67
|
+
| Element | Value |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| `bro-nv-tags` | An array of strings in `row[col.name]`; the tags that do not fit become an ellipsis |
|
|
70
|
+
| `bro-switch` | A boolean from the attribute `checked`: `attrs: {checked: (_col, row) => row.done}`. With the attribute `name` and `event: 'action'` a change sends the action `name` with the column and the row; the title of the column names the switch |
|
|
71
|
+
|
|
72
|
+
## Settings
|
|
73
|
+
|
|
74
|
+
`nativeSkinConfig` is the config of the skin. `config.components` and `config.css` of a table change any of its values
|
|
75
|
+
or functions, at any depth, for that table. The sizes and timings are CSS variables of the table: see the README of
|
|
76
|
+
`@table-bro/core`.
|
|
77
|
+
|
|
78
|
+
The skin has a light and a dark theme, as the README of `@table-bro/core` describes.
|
|
79
|
+
|
|
80
|
+
## License
|
|
81
|
+
|
|
82
|
+
MIT
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
Table, Bro is MIT-licensed (LICENSE). Parts of it come from or are built with the code of other projects, under their
|
|
4
|
+
licenses below.
|
|
5
|
+
|
|
6
|
+
## Angular Components (Angular Material)
|
|
7
|
+
|
|
8
|
+
Ported from Angular Material and carrying its license header:
|
|
9
|
+
|
|
10
|
+
- `packages/skins/shared/js/material-based/paginator/bro-paginator.ts`: the paginator of the vanilla skins, a port of
|
|
11
|
+
`MatPaginator`;
|
|
12
|
+
- `packages/skins/shared/styles/vanilla-js/shared/components/material-based/_paginator.scss` and `_sort-header.scss`:
|
|
13
|
+
the styles of the paginator and of the sort header of the vanilla skins.
|
|
14
|
+
|
|
15
|
+
The CSS of the skin `mat` (`table-bro.material.min.css`) is built with the Sass of `@angular/material`, and the CSS of
|
|
16
|
+
the vanilla skins contains the styles above. Minified CSS keeps no comments, so this file carries the notice for it.
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
The MIT License
|
|
20
|
+
|
|
21
|
+
Copyright (c) 2026 Google LLC.
|
|
22
|
+
|
|
23
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
24
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
25
|
+
in the Software without restriction, including without limitation the rights
|
|
26
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
27
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
28
|
+
furnished to do so, subject to the following conditions:
|
|
29
|
+
|
|
30
|
+
The above copyright notice and this permission notice shall be included in
|
|
31
|
+
all copies or substantial portions of the Software.
|
|
32
|
+
|
|
33
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
34
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
35
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
36
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
37
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
38
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
39
|
+
THE SOFTWARE.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Bootstrap
|
|
43
|
+
|
|
44
|
+
The CSS of the skin `bs` (`table-bro.bootstrap.min.css`) and of the shared elements of the vanilla skins is built with
|
|
45
|
+
the Sass functions, variables and mixins of Bootstrap 5.
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
The MIT License (MIT)
|
|
49
|
+
|
|
50
|
+
Copyright (c) 2011-2025 The Bootstrap Authors
|
|
51
|
+
|
|
52
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
53
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
54
|
+
in the Software without restriction, including without limitation the rights
|
|
55
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
56
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
57
|
+
furnished to do so, subject to the following conditions:
|
|
58
|
+
|
|
59
|
+
The above copyright notice and this permission notice shall be included in
|
|
60
|
+
all copies or substantial portions of the Software.
|
|
61
|
+
|
|
62
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
63
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
64
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
65
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
66
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
67
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
68
|
+
THE SOFTWARE.
|
|
69
|
+
```
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { BroCellElement, BroCol, BroConfiguredElement, BroHTMLElement, BroResolvedConfig, BroRow, BroView } from "@table-bro/core";
|
|
2
|
+
//#region js/table-bro.native.config.d.ts
|
|
3
|
+
export declare const nativeSkinConfig: {
|
|
4
|
+
css: {
|
|
5
|
+
table: {
|
|
6
|
+
thead: {
|
|
7
|
+
tr: {
|
|
8
|
+
className: string;
|
|
9
|
+
th: {
|
|
10
|
+
className: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
tbody: {
|
|
15
|
+
tr: {
|
|
16
|
+
className: string;
|
|
17
|
+
td: {
|
|
18
|
+
className: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
shadow: {
|
|
24
|
+
className: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
components: {
|
|
28
|
+
button: {
|
|
29
|
+
selector: string;
|
|
30
|
+
iconSelector: string;
|
|
31
|
+
beforeRender: (element: Element, value: string) => void;
|
|
32
|
+
};
|
|
33
|
+
dropdown: {
|
|
34
|
+
selector: string;
|
|
35
|
+
};
|
|
36
|
+
filterDrawer: {
|
|
37
|
+
beforeRender: (closeButton: Element) => void;
|
|
38
|
+
};
|
|
39
|
+
paginator: {
|
|
40
|
+
selector: string;
|
|
41
|
+
css: {
|
|
42
|
+
ul: {
|
|
43
|
+
className: string;
|
|
44
|
+
li: {
|
|
45
|
+
className: string;
|
|
46
|
+
a: {
|
|
47
|
+
className: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
progressBar: {
|
|
54
|
+
selector: string;
|
|
55
|
+
};
|
|
56
|
+
sortHeader: {
|
|
57
|
+
selector: string;
|
|
58
|
+
contentSelector: string;
|
|
59
|
+
beforeRender: (element: Element, value: string) => void;
|
|
60
|
+
afterRender: (element: Element, value: string) => void;
|
|
61
|
+
};
|
|
62
|
+
state: {
|
|
63
|
+
states: {
|
|
64
|
+
loading: [string, string];
|
|
65
|
+
'no-data': [string, string];
|
|
66
|
+
'not-found': [string, string];
|
|
67
|
+
fail: [string, string];
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
switch: {
|
|
71
|
+
selector: string;
|
|
72
|
+
css: {
|
|
73
|
+
div: {
|
|
74
|
+
className: string;
|
|
75
|
+
input: {
|
|
76
|
+
className: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
textEllipsis: {
|
|
82
|
+
selector: string;
|
|
83
|
+
afterRender: (element: Element, value: string) => void;
|
|
84
|
+
};
|
|
85
|
+
toolbar: {
|
|
86
|
+
selector: string;
|
|
87
|
+
css: {
|
|
88
|
+
nav: {
|
|
89
|
+
className: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
toolbarMain: {
|
|
94
|
+
selector: string;
|
|
95
|
+
css: {
|
|
96
|
+
toolbarTitle: {
|
|
97
|
+
className: string;
|
|
98
|
+
};
|
|
99
|
+
navbarCollapse: {
|
|
100
|
+
className: string;
|
|
101
|
+
ul: {
|
|
102
|
+
li: {
|
|
103
|
+
className: string;
|
|
104
|
+
a: {
|
|
105
|
+
className: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
beforeRender: (searchButton: Element, value: string) => void;
|
|
112
|
+
};
|
|
113
|
+
toolbarSearch: {
|
|
114
|
+
beforeRender: (backButton: Element, clearButton: Element) => void;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
elements: {
|
|
118
|
+
'bro-nv-tags': string;
|
|
119
|
+
'bro-switch': string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region ../shared/js/bro-tags.d.ts
|
|
124
|
+
/**
|
|
125
|
+
* The tags of a cell of the vanilla skins: the items of the field of the column in the row, each in the markup of a tag
|
|
126
|
+
* of the skin.
|
|
127
|
+
*/
|
|
128
|
+
declare abstract class BroTagsComponent extends BroHTMLElement implements BroView, BroCellElement, BroConfiguredElement {
|
|
129
|
+
template(): string;
|
|
130
|
+
row?: BroRow;
|
|
131
|
+
col?: BroCol;
|
|
132
|
+
config?: BroResolvedConfig;
|
|
133
|
+
items: string[];
|
|
134
|
+
/** Stops fitting the tags into the line when the element leaves the DOM. */
|
|
135
|
+
private fitting?;
|
|
136
|
+
/** A move in the DOM connects the element again; it keeps its markup and listeners. */
|
|
137
|
+
private rendered;
|
|
138
|
+
render(): void;
|
|
139
|
+
/** The empty markup of one tag of the skin, which takes the text of an item. */
|
|
140
|
+
protected abstract readonly tagHTML: string;
|
|
141
|
+
connectedCallback(): void;
|
|
142
|
+
disconnectedCallback(): void;
|
|
143
|
+
}
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region js/bro-tags.native.d.ts
|
|
146
|
+
/** The tags of the native skin: marks. */
|
|
147
|
+
export declare class BroNativeTagsComponent extends BroTagsComponent {
|
|
148
|
+
protected readonly tagHTML: string;
|
|
149
|
+
}
|
|
150
|
+
//#endregion
|
|
151
|
+
//#region ../shared/js/bootstrap-based/bro-switch.d.ts
|
|
152
|
+
/**
|
|
153
|
+
* A switch of a boolean of a cell. A change sends the action of the attribute name, as the event action that the table
|
|
154
|
+
* turns into bro-action with the column and the row (event: 'action' of the column); the title of the column names
|
|
155
|
+
* the switch for screen readers.
|
|
156
|
+
*/
|
|
157
|
+
export declare class BroSwitchComponent extends BroHTMLElement implements BroView, BroConfiguredElement {
|
|
158
|
+
template(): string;
|
|
159
|
+
config: BroResolvedConfig;
|
|
160
|
+
/** The column of the cell, which the table sets. */
|
|
161
|
+
col?: BroCol;
|
|
162
|
+
checked: string | null;
|
|
163
|
+
private css;
|
|
164
|
+
/** A move in the DOM connects the element again; it keeps its markup and listeners. */
|
|
165
|
+
private rendered;
|
|
166
|
+
events(): void;
|
|
167
|
+
render(): void;
|
|
168
|
+
connectedCallback(): void;
|
|
169
|
+
}
|
|
170
|
+
//#endregion
|
|
171
|
+
//#region ../shared/js/define-shared-elements.d.ts
|
|
172
|
+
/**
|
|
173
|
+
* Defines the optional element bro-switch, a boolean of a column as a switch, unless it is defined; without a DOM, as
|
|
174
|
+
* in the server render, it does nothing.
|
|
175
|
+
*/
|
|
176
|
+
export declare function withSwitch(): void;
|
|
177
|
+
//#endregion
|
|
178
|
+
//#region js/table-bro.native.d.ts
|
|
179
|
+
/**
|
|
180
|
+
* Defines the optional element bro-nv-tags, the items of a column as tags, unless it is defined; without a DOM, as in
|
|
181
|
+
* the server render, it does nothing. A page without the call does not carry the code of the tags.
|
|
182
|
+
*/
|
|
183
|
+
export declare function withTags(): void;
|
|
184
|
+
//#endregion
|
|
185
|
+
export {};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import{BroHTML as e,BroHTMLElement as t,broCellSelectors as n,dispatchAction as r,events as i,fitCellItems as a,registerSkin as o}from"@table-bro/core";const{escape:s}=e;var c=class extends t{template(){this.css=this.config.components.switch?.css,this.checked=this.getAttribute(`checked`);let e=this.checked===`true`;return`
|
|
2
|
+
<div ${this.css?`class="${s(this.css.div.className)}"`:``}>
|
|
3
|
+
<input type="checkbox"
|
|
4
|
+
${this.css?`class="${s(this.css.div.input.className)}"`:``}
|
|
5
|
+
role="switch"
|
|
6
|
+
${e?` checked`:``}>
|
|
7
|
+
</div>`}config;col;checked;css;rendered=!1;events(){let e=this.querySelector(`input`),t=this.getAttribute(`name`);e.setAttribute(`aria-label`,this.col?.title??``),e.addEventListener(`change`,()=>{t&&this.dispatchEvent(new CustomEvent(`action`,{detail:t}))})}render(){this.insertAdjacentHTML(`afterbegin`,this.template()),this.events()}connectedCallback(){this.rendered||(this.rendered=!0,this.render())}};const{escape:l}=e;var u=class extends t{template(){this.css=this.config.components.toolbar.css;let e=this.css.nav.div?.className?`${this.css.nav.div.className} ${this.contentClassName}`:this.contentClassName;return`
|
|
8
|
+
<nav class="${l(this.css.nav.className)}">
|
|
9
|
+
<div class="${l(e)}">
|
|
10
|
+
<!-- toolbar content -->
|
|
11
|
+
</div>
|
|
12
|
+
</nav>`}config;contentClassName=`bro-toolbar-content`;css;render(){this.insertAdjacentHTML(`afterbegin`,this.template())}appendToolbarContent(...e){this.firstChild||this.render(),this.querySelector(`.${this.contentClassName}`)?.append(...e)}};const{createElement:d,escape:f}=e;var p=class extends t{template(){this.css=this.config.components.toolbarMain.css,this.toolbarTitle=this.config.toolbarTitle;let e=this.css.navbarCollapse.ul.className?`${this.css.navbarCollapse.ul.className} ${this.contentClassName}`:this.contentClassName;return`
|
|
13
|
+
<!--bro-toolbar-->
|
|
14
|
+
<span class="bro-toolbar-title-space"></span>
|
|
15
|
+
<span class="${f(this.css.toolbarTitle.className)}">${f(this.toolbarTitle)}</span>
|
|
16
|
+
|
|
17
|
+
<span class="bro-toolbar-space"></span>
|
|
18
|
+
|
|
19
|
+
<div class="${f(this.css.navbarCollapse.className)} bro-toolbar-buttons">
|
|
20
|
+
<ul class="${f(e)}">
|
|
21
|
+
<!-- search-button -->
|
|
22
|
+
<!-- buttons -->
|
|
23
|
+
</ul>
|
|
24
|
+
</div>
|
|
25
|
+
<!--/bro-toolbar-->`}config;contentClassName=`bro-navbar-nav`;toolbarTitle;css;navContentEl;rendered=!1;events(){this.addEventListener(`click`,e=>{e.preventDefault()}),this.navContentEl.children[0].addEventListener(`click`,()=>{this.dispatchEvent(new CustomEvent(i.toolbarEvent,{bubbles:!0,composed:!0,detail:i.toolbarSearchOpenEvent}))})}render(){let e=document.createElement(this.config.components.toolbar.selector);e.setAttribute(`class`,`bro-toolbar`),e.config=this.config,this.appendChild(e);let t=document.createElement(`div`);t.insertAdjacentHTML(`afterbegin`,this.template()),e.appendToolbarContent(...Array.from(t.children)),this.appendToolbarContent(this.renderSearchButton(),...this.renderButtons()),this.querySelectorAll(this.config.components.dropdown?.selector).forEach(e=>{e.replaceWith(e.children[0])}),this.events()}connectedCallback(){this.rendered||(this.rendered=!0,this.render())}appendToolbarContent(...e){this.navContentEl||=this.querySelector(`.${this.contentClassName}`),this.navContentEl.append(...e)}templateToolbarButton(e,t,n){return d(`
|
|
26
|
+
<li class="${f(this.css.navbarCollapse.ul.li.className)}">
|
|
27
|
+
<a class="${f(this.css.navbarCollapse.ul.li.a.className)}${n?` ${f(n)}`:``}" href="">
|
|
28
|
+
${t||``}${f(e)}
|
|
29
|
+
</a>
|
|
30
|
+
</li>`)}renderSearchButton(){let e=document.createElement(this.config.components.button.selector);this.config.components.toolbarMain.beforeRender?.(e,this.config.texts.search);let t=e.getAttribute(`button-title`)??``;return this.templateToolbarButton(t,e.iconHTML,`bro-toolbar-button-search`)}renderButtons(){return(this.config.components.toolbarMain.buttons??[]).map(e=>{if(e.mode===`navbar-dropdown`){let t=document.createElement(this.config.components.dropdown?.selector);return t.config=this.config,t.setAttribute(`mode`,`navbar-dropdown`),t.setAttribute(`button-title`,e.buttonTitle),t.setAttribute(`options`,JSON.stringify(e.options)),t.addEventListener(`value`,e=>{this.dispatchEvent(new CustomEvent(i.toolbarEvent,{bubbles:!0,composed:!0,detail:e.detail}))}),t}{let t=this.templateToolbarButton(e.buttonTitle,e.iconHTML);return t.querySelector(`a`)?.addEventListener(`click`,()=>{this.dispatchEvent(new CustomEvent(i.toolbarEvent,{bubbles:!0,composed:!0,detail:e.eventType}))}),t}})}};const{escape:m}=e;var h=class extends t{template(){this.label=this.getAttribute(`label`)||``,this.buttonClassName=this.getAttribute(`button-class`),this.buttonTitle=this.getAttribute(`button-title`)||``,this.iconHTML=this.getAttribute(`icon-html`)||this.iconHTML,this.mode=this.getAttribute(`mode`)||`button`,this.eventType=this.getAttribute(`event-type`)||`action`;let e=this.buttonClassName?` class="${m(this.buttonClassName)}"`:``,t=!this.buttonTitle&&this.label?` aria-label="${m(this.label)}"`:``,n=`${m(this.buttonTitle)}${this.iconHTML?`${this.buttonTitle?` `:``}${this.iconHTML}`:``}`;return this.mode===`link`?`
|
|
31
|
+
<a${e} href=""
|
|
32
|
+
role="button"${t}>
|
|
33
|
+
${n}
|
|
34
|
+
</a>`:`
|
|
35
|
+
<button${e}
|
|
36
|
+
type="button"${t}>
|
|
37
|
+
${n}
|
|
38
|
+
</button>`}label;buttonClassName;buttonTitle;iconHTML;mode;eventType;events(){let e=this.children[0];e.addEventListener(`click`,t=>{r(e,this.eventType),t.preventDefault()}),this.mode===`link`&&e.addEventListener(`keydown`,t=>{t.key===` `&&!t.repeat&&(t.preventDefault(),e.click())})}render(){this.insertAdjacentHTML(`afterbegin`,this.template()),this.events()}connectedCallback(){this.firstChild||this.render()}};const{escape:g,text:_}=e;var v=class extends t{template(){return this.containerClassName=this.getAttribute(`container-class`),this.value=this.getAttribute(`value`)||``,`
|
|
39
|
+
<span class="${n.ellipsisContainer}${this.containerClassName?` ${g(this.containerClassName)}`:``}">
|
|
40
|
+
<span class="${n.ellipsis}"></span>
|
|
41
|
+
</span>`}row;col;config;containerClassName;tooltip;value;release;released=!1;rendered=!1;render(){this.insertAdjacentHTML(`afterbegin`,this.template());let e=this.querySelector(`.${n.ellipsis}`);this.col?.html?(e.innerHTML=this.value,this.tooltip=_(this.value)):(e.textContent=this.value,this.tooltip=this.value),this.afterRender()}connectedCallback(){this.rendered?this.released&&(this.released=!1,this.afterRender()):(this.rendered=!0,this.render())}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||(typeof this.release==`function`&&this.release(),this.release=void 0,this.released=!0)})}afterRender(){let e=this.children[0];this.config.components.textEllipsis.afterRender&&(this.release=this.config.components.textEllipsis.afterRender(e,this.tooltip))}};const{escape:y}=e;var b=class extends t{template(){this.arrowPosition=this.getAttribute(`arrow-position`)||`after`,this.sortId=this.getAttribute(`sort-id`)||``,this.dataType=this.getAttribute(`data-type`)||``,this.headerTitle=this.getAttribute(`header-title`)||``,this.iconHTML=this.getAttribute(`icon-html`)||``,this.tooltip=this.getAttribute(`tooltip`)||``;let e=``;this.arrowPosition===`before`&&(e+=` bro-sort-header-position-before`),e+=` bro-sort-header-descending`;let t=this.headerTitle?` role="button" tabindex="0"`:``;return`
|
|
42
|
+
<div class="bro-sort-header-container${e}"${t}>
|
|
43
|
+
<div class="bro-sort-header-content">${y(this.headerTitle)}</div>
|
|
44
|
+
<div class="bro-sort-header-arrow" aria-hidden="true">${this.iconHTML}</div>
|
|
45
|
+
</div>`}static get observedAttributes(){return[`tooltip`]}config;arrowPosition;headerTitle;dataType;iconHTML;sortId;tooltip;_activeSort;direction=``;release;released=!1;rendered=!1;events(){let e=this.children[0];this.headerTitle&&(e.addEventListener(`blur`,()=>{e.classList.remove(`bro-sort-header-recently-cleared-ascending`)}),e.addEventListener(`keydown`,t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e.click())}),e.addEventListener(`click`,()=>{this.direction===``?(this.direction=`desc`,e.classList.add(`bro-sort-header-sorted`),e.classList.remove(`bro-sort-header-recently-cleared-ascending`)):this.direction===`desc`?(this.direction=`asc`,e.classList.remove(`bro-sort-header-descending`)):this.direction===`asc`&&(this.direction=``,e.classList.remove(`bro-sort-header-sorted`),e.classList.add(`bro-sort-header-descending`),e.classList.add(`bro-sort-header-recently-cleared-ascending`)),r(this,i.filtersSortEvent,{sortKey:this.sortId,sortDirection:this.direction||void 0})}))}render(){this.insertAdjacentHTML(`afterbegin`,this.template()),this.afterRender(),this.events()}get activeSort(){return this._activeSort}set activeSort(e){this._activeSort=e;let t=this.children[0];this.direction!==``&&e?.sortKey!==this.sortId&&t&&(this.direction=``,t.classList.remove(`bro-sort-header-sorted`),t.classList.add(`bro-sort-header-descending`))}connectedCallback(){this.rendered?this.released&&(this.released=!1,this.afterRender()):(this.rendered=!0,this.render())}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||(typeof this.release==`function`&&this.release(),this.release=void 0,this.released=!0)})}attributeChangedCallback(e,t,n){this.rendered&&t!==n&&(this.tooltip=n||``,typeof this.release==`function`&&this.release(),this.release=void 0,this.isConnected?this.afterRender():this.released=!0)}afterRender(){let e=this.children[0];this.release=this.config.components.sortHeader.afterRender?.(e,this.tooltip)}};
|
|
46
|
+
/**
|
|
47
|
+
* @license
|
|
48
|
+
* Copyright Google LLC All Rights Reserved.
|
|
49
|
+
*
|
|
50
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
51
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
52
|
+
*/
|
|
53
|
+
const{escape:x}=e,S={"bro-button":h,"bro-paginator":class extends t{template(){this.disabled=this.getAttribute(`disabled`)===`true`||!1,this.length=Number(this.getAttribute(`length`))||0,this.pageIndex=Math.max(Number(this.getAttribute(`page-index`))||0,0),this.pageSize=Number(this.getAttribute(`page-size`)),this.showFirstLastButtons=this.getAttribute(`show-first-last-buttons`)!==`false`,this.parsePageSizeOptions();let e=this.texts=this.config.texts,t=this.config.components.paginator.css?.ul,n=t?.className?` class="${x(t.className)}"`:``,r=t?.li?.className?` class="${x(t.li.className)}"`:``,i=t?.li?.a?.className?`${x(t.li.a.className)} `:``;return this.dropdownSelector=this.config.components.dropdown?.selector,`
|
|
54
|
+
<div class="bro-paginator-outer-container">
|
|
55
|
+
<div class="bro-paginator-inner-container">
|
|
56
|
+
<div class="bro-paginator-page-size">
|
|
57
|
+
<div class="bro-paginator-page-size-label">
|
|
58
|
+
${x(e.itemsPerPage)}
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
${this.pageSizeDropdown?.length?``:this.templatePageSizeValue()}
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div class="bro-paginator-range-actions">
|
|
65
|
+
<div class="bro-paginator-range-label" aria-live="polite">
|
|
66
|
+
${x(e.rangeLabel(this.pageIndex,this.pageSize,this.length))}
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<nav aria-label="${x(e.pageNavigation)}">
|
|
70
|
+
<ul${n}>
|
|
71
|
+
${this.showFirstLastButtons?`
|
|
72
|
+
<li${r}>
|
|
73
|
+
<a class="${i}bro-paginator-navigation-first" href=""
|
|
74
|
+
aria-label="${x(e.firstPage)}">${x(e.first)}</a>
|
|
75
|
+
</li>`:``}
|
|
76
|
+
|
|
77
|
+
<li${r}>
|
|
78
|
+
<a class="${i}bro-paginator-navigation-previous" href=""
|
|
79
|
+
aria-label="${x(e.previousPage)}">${x(e.previous)}</a>
|
|
80
|
+
</li>
|
|
81
|
+
|
|
82
|
+
<li${r}>
|
|
83
|
+
<a class="${i}bro-paginator-navigation-next" href=""
|
|
84
|
+
aria-label="${x(e.nextPage)}">${x(e.next)}</a>
|
|
85
|
+
</li>
|
|
86
|
+
|
|
87
|
+
${this.showFirstLastButtons?`
|
|
88
|
+
<li${r}>
|
|
89
|
+
<a class="${i}bro-paginator-navigation-last" href=""
|
|
90
|
+
aria-label="${x(e.lastPage)}">${x(e.last)}</a>
|
|
91
|
+
</li>`:``}
|
|
92
|
+
</ul>
|
|
93
|
+
</nav>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
</div>`}static get observedAttributes(){return[`page-index`,`page-size`,`length`,`page-size-options`,`disabled`]}config;disabled;length;pageIndex;pageSize;pageSizeOptions;showFirstLastButtons;page;eventName=`page`;firstEl;previousEl;nextEl;lastEl;pageSizeEl;pageSizeValueEl;rangeLabelEl;dropdownSelector;texts;pageSizeDropdown;rendered=!1;events(){this.previousEl=this.querySelector(`.bro-paginator-navigation-previous`),this.nextEl=this.querySelector(`.bro-paginator-navigation-next`),this.previousEl.addEventListener(`click`,e=>{e.preventDefault(),this.hasPreviousPage()&&this.navigate(this.pageIndex-1)}),this.nextEl.addEventListener(`click`,e=>{e.preventDefault(),this.hasNextPage()&&this.navigate(this.pageIndex+1)}),this.showFirstLastButtons&&(this.firstEl=this.querySelector(`.bro-paginator-navigation-first`),this.lastEl=this.querySelector(`.bro-paginator-navigation-last`),this.firstEl.addEventListener(`click`,e=>{e.preventDefault(),this.hasPreviousPage()&&this.navigate(0)}),this.lastEl.addEventListener(`click`,e=>{e.preventDefault(),this.hasNextPage()&&this.navigate(this.getNumberOfPages()-1)}))}render(){this.insertAdjacentHTML(`afterbegin`,this.template()),this.pageSizeDropdown?.length&&(this.pageSizeEl=this.querySelector(`.bro-paginator-page-size`),this.renderPageSizeDropdown()),this.events(),this.renderNavigationState()}connectedCallback(){this.rendered||(this.rendered=!0,this.render())}attributeChangedCallback(e,t,n){this.texts&&((e===`page-index`||e===`page-size`||e===`length`)&&(this.rangeLabelEl||=this.querySelector(`.bro-paginator-range-label`),this.pageSizeValueEl||=this.querySelector(`.bro-paginator-page-size-value`),e===`page-index`&&(this.pageIndex=+n),e===`page-size`&&(this.pageSize=+n,this.pageSizeOptions.length||(this.pageSizeValueEl.innerText=n)),e===`length`&&(this.length=+n),this.rangeLabelEl.textContent=this.texts.rangeLabel(this.pageIndex,this.pageSize,this.length),this.renderNavigationState()),e===`page-size-options`&&(this.parsePageSizeOptions(),this.unrenderPageSizeControls(),this.pageSizeEl||=this.querySelector(`.bro-paginator-page-size`),this.pageSizeDropdown?.length?this.renderPageSizeDropdown():(this.renderPageSizeValue(),this.setAttribute(`disabled`,`true`))),e===`disabled`&&this.setDisabledState(n===`true`))}hasPreviousPage(){return this.pageIndex>=1&&this.pageSize!=0}hasNextPage(){let e=this.getNumberOfPages()-1;return this.pageIndex<e&&this.pageSize!=0}getNumberOfPages(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}parsePageSizeOptions(){if(this.getAttribute(`page-size-options`))try{this.pageSizeOptions=JSON.parse(this.getAttribute(`page-size-options`)).map(e=>+e),this.pageSizeDropdown=this.pageSizeOptions.map(e=>({value:e.toString(),title:e.toString()}))}catch(e){this.pageSizeOptions=[],this.config.debug&&console.log(e)}}templatePageSizeValue(){return`<div class="bro-paginator-page-size-value">${this.pageSize}</div>`}unrenderPageSizeControls(){let e=this.querySelector(this.dropdownSelector);e&&e.remove();let t=this.querySelector(`.bro-paginator-page-size-value`);t&&t.remove()}renderPageSizeDropdown(){let e=document.createElement(this.dropdownSelector);e.config=this.config,e.setAttribute(`mode`,`select`),e.setAttribute(`button-title`,this.pageSize.toString()),e.setAttribute(`options`,JSON.stringify(this.pageSizeDropdown)),e.setAttribute(`label`,this.texts.itemsPerPage),this.eventsPageSize(e),this.pageSizeEl.append(e)}eventsPageSize(e){e.addEventListener(`value`,e=>{let t=e.detail;this.changePageSize(+t),this.setAttribute(`page-size`,t)})}renderPageSizeValue(){this.pageSizeEl.insertAdjacentHTML(`beforeend`,this.templatePageSizeValue())}setDisabledState(e){this.disabled=e;let t=this.querySelector(this.dropdownSelector);t&&t.setAttribute(`disabled`,e.toString()),this.renderNavigationState()}renderNavigationState(){let e=this.disabled||!this.hasPreviousPage(),t=this.disabled||!this.hasNextPage();[[this.firstEl,e],[this.previousEl,e],[this.nextEl,t],[this.lastEl,t]].forEach(([e,t])=>{t?(e?.parentElement?.classList.add(`disabled`),e?.setAttribute(`aria-disabled`,`true`)):(e?.parentElement?.classList.remove(`disabled`),e?.removeAttribute(`aria-disabled`))})}navigate(e){let t=this.pageIndex;e!==t&&(this.pageIndex=e,this.setAttribute(`page-index`,this.pageIndex.toString()),this.emitPageEvent(t))}changePageSize(e){let t=this.pageIndex*this.pageSize,n=this.pageIndex;this.pageIndex=Math.floor(t/e)||0,this.pageSize=e,this.emitPageEvent(n)}emitPageEvent(e){this.page={previousPageIndex:e,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length},this.dispatchEvent(new CustomEvent(this.eventName,{bubbles:!0,composed:!0,detail:this.page}))}},"bro-sort-header":b,"bro-text-ellipsis":v,"bro-toolbar":u,"bro-toolbar-main":p};function C(){w(`bro-switch`,c)}function w(e,t){typeof customElements<`u`&&!customElements.get(e)&&customElements.define(e,t)}function T(e){let t=[];Object.entries(S).forEach(([e,n])=>{let r=customElements.get(e);r?r!==n&&t.push(e):customElements.define(e,n)}),t.length&&console.warn(`${e}: ${t.join(`, `)} are already defined by another vanilla skin bundle, so this skin uses its elements. Load one vanilla skin bundle per page.`)}const{escape:E}=e;var D=class extends t{template(){this.buttonTitle=this.getAttribute(`button-title`)||``,this.name=this.getAttribute(`name`)||`action`,this.mode=this.getAttribute(`mode`)||`dropdown`;try{this.options=JSON.parse(this.getAttribute(`options`))}catch(e){this.options=[],this.config.debug&&console.log(e)}let e=this.getAttribute(`label`)||this.buttonTitle,t=e?` aria-label="${E(e)}"`:``;return this.mode===`select`||this.mode===`dropdown`?`
|
|
97
|
+
<select name="${E(this.name)}"${t}>
|
|
98
|
+
<option value="" hidden>${E(this.buttonTitle)}</option>
|
|
99
|
+
${this.templateDropdown(this.options)}
|
|
100
|
+
</select>`:`
|
|
101
|
+
<li class="bro-nav-item bro-dropdown">
|
|
102
|
+
<select name="${E(this.name)}"${t}>
|
|
103
|
+
<option value="" hidden>${E(this.buttonTitle)}</option>
|
|
104
|
+
${this.templateDropdown(this.options)}
|
|
105
|
+
</select>
|
|
106
|
+
</li>`}static get observedAttributes(){return[`disabled`]}config;buttonTitle;name;mode;options;eventName=`value`;dropdownToggleEl;rendered=!1;events(){let e=this.querySelector(`select`),t=this.mode===`navbar-dropdown`,n=!1,r=null;this.dropdownToggleEl=e,this.renderDisabled();let i=n=>{r=null,t&&(e.selectedIndex=0),this.dispatchEvent(new CustomEvent(this.eventName,{bubbles:!0,composed:!0,detail:n}))};t&&(e.addEventListener(`pointerdown`,()=>{n=!1}),e.addEventListener(`keydown`,e=>{n=e.key!==`Enter`,e.key===`Enter`&&r!==null&&i(r)}),e.addEventListener(`blur`,()=>{r!==null&&(r=null,e.selectedIndex=0)})),e.addEventListener(`change`,()=>{t&&n?r=e.value:i(e.value)})}render(){this.insertAdjacentHTML(`afterbegin`,this.template()),this.events()}connectedCallback(){this.rendered||(this.rendered=!0,this.render())}attributeChangedCallback(e){e===`disabled`&&this.dropdownToggleEl&&this.renderDisabled()}templateDropdown(e){return`
|
|
107
|
+
${e.map(e=>{if(`value`in e&&`title`in e)return`
|
|
108
|
+
<option value="${E(e.value)}">${E(e.title)}</option>`;if(`divider`in e)return`
|
|
109
|
+
<hr>`;if(`header`in e)return`
|
|
110
|
+
<optgroup label="${E(e.header)}"></optgroup>`}).join(``)}`}renderDisabled(){this.dropdownToggleEl.toggleAttribute(`disabled`,this.getAttribute(`disabled`)===`true`)}};const{escape:O}=e;var k=class extends t{template(){this.color=this.getAttribute(`color`)||``,this.mode=this.getAttribute(`mode`)||`indeterminate`;let e=this.mode===`indeterminate`;return this.value=(e?100:this.getAttribute(`value`)||0).toString(),`
|
|
111
|
+
<progress ${e?``:`value="${this.value}"`}
|
|
112
|
+
max="${e?``:100}" aria-label="${O(this.config.texts.loadingProgress)}"></progress>`}static get observedAttributes(){return[`value`]}config;color;mode;value;rendered=!1;valueEl;render(){this.insertAdjacentHTML(`afterbegin`,this.template())}connectedCallback(){this.rendered||(this.rendered=!0,this.render())}attributeChangedCallback(e,t,n){this.mode===`determinate`&&e===`value`&&(this.valueEl||=this.querySelector(`progress`),this.valueEl.value=+n)}},A=class extends t{template(){let e=this.col?.name,t=e&&this.row?.[e];return this.items=Array.isArray(t)&&t.length?t:[this.config?.texts.noItems??``],this.items.map(()=>this.tagHTML).join(``)}row;col;config;items=[];fitting;rendered=!1;render(){this.insertAdjacentHTML(`afterbegin`,this.template()),Array.from(this.children).forEach((e,t)=>{this.col?.html?e.innerHTML=this.items[t]:e.textContent=this.items[t]})}connectedCallback(){this.rendered||(this.rendered=!0,this.render()),this.fitting=new AbortController,a(this,this.fitting.signal)}disconnectedCallback(){this.fitting?.abort()}},j=class extends A{tagHTML=`<mark></mark>`};const M={css:{table:{thead:{tr:{className:`bro-header-row`,th:{className:`bro-header-cell`}}},tbody:{tr:{className:`bro-row`,td:{className:`bro-cell`}}}},shadow:{className:`shadow-lg`}},components:{button:{selector:`bro-button`,iconSelector:`.bro-button-toggle`,beforeRender:(e,t)=>{e.setAttribute(`mode`,`link`),e.setAttribute(`button-title`,t),e.setAttribute(`icon-html`,`<span class="bro-button-toggle"></span>`)}},dropdown:{selector:`bro-nv-dropdown`},filterDrawer:{beforeRender:e=>{e.iconHTML=`×`,e.setAttribute(`button-class`,`bro-nav-link`),e.setAttribute(`mode`,`link`)}},paginator:{selector:`bro-paginator`,css:{ul:{className:`bro-pagination`,li:{className:`bro-page-item`,a:{className:`bro-page-link`}}}}},progressBar:{selector:`bro-nv-progress-bar`},sortHeader:{selector:`bro-sort-header`,contentSelector:`.bro-sort-header-content`,beforeRender:(e=>{e.setAttribute(`icon-html`,`<span class="bro-button-icon">▼</span>`)}),afterRender:(e,t)=>{e.setAttribute(`title`,t)}},state:{states:{loading:[`🚀`,`Loading`],"no-data":[`💔`,`No data`],"not-found":[`🔦`,`No records found`],fail:[`😕`,`Failed`]}},switch:{selector:`bro-switch`,css:{div:{className:`bro-form-check bro-form-switch`,input:{className:`bro-form-check-input`}}}},textEllipsis:{selector:`bro-text-ellipsis`,afterRender:(e,t)=>{e.setAttribute(`title`,t)}},toolbar:{selector:`bro-toolbar`,css:{nav:{className:`bro-navbar bro-navbar-expand`}}},toolbarMain:{selector:`bro-toolbar-main`,css:{toolbarTitle:{className:`bro-navbar-brand`},navbarCollapse:{className:`bro-navbar-collapse`,ul:{li:{className:`bro-nav-item`,a:{className:`bro-nav-link`}}}}},beforeRender:(e,t)=>{e.setAttribute(`button-title`,t)}},toolbarSearch:{beforeRender:(e,t)=>{e.iconHTML=`←`,e.setAttribute(`button-class`,`bro-nav-link`),e.setAttribute(`mode`,`link`),t.iconHTML=`×`,t.setAttribute(`button-class`,`bro-nav-link`),t.setAttribute(`mode`,`link`)}}},elements:{"bro-nv-tags":`withTags`,"bro-switch":`withSwitch`}};typeof customElements<`u`&&(T(`@table-bro/native`),w(`bro-nv-dropdown`,D),w(`bro-nv-progress-bar`,k)),o(`nv`,M);function N(){w(`bro-nv-tags`,j)}export{j as BroNativeTagsComponent,c as BroSwitchComponent,M as nativeSkinConfig,C as withSwitch,N as withTags};
|
|
113
|
+
//# sourceMappingURL=table-bro.native.esm.js.map
|