@ganpatiinfo/gids-web-dom-reference 9.3.0 → 11.0.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/CHANGELOG.md +59 -0
- package/dist/components/GidsActionBar/GidsActionBar.d.ts +1 -1
- package/dist/components/GidsActionBar/GidsActionBar.d.ts.map +1 -1
- package/dist/components/GidsActionBar/GidsActionBar.js +2 -1
- package/dist/components/GidsActionBar/GidsActionBar.js.map +1 -1
- package/dist/components/GidsBasicTableBody/GidsBasicTableBody.d.ts +8 -0
- package/dist/components/GidsBasicTableBody/GidsBasicTableBody.d.ts.map +1 -0
- package/dist/components/GidsBasicTableBody/GidsBasicTableBody.js +27 -0
- package/dist/components/GidsBasicTableBody/GidsBasicTableBody.js.map +1 -0
- package/dist/components/GidsBasicTableCell/GidsBasicTableCell.d.ts +8 -0
- package/dist/components/GidsBasicTableCell/GidsBasicTableCell.d.ts.map +1 -0
- package/dist/components/GidsBasicTableCell/GidsBasicTableCell.js +16 -0
- package/dist/components/GidsBasicTableCell/GidsBasicTableCell.js.map +1 -0
- package/dist/components/GidsBasicTableHead/GidsBasicTableHead.d.ts +11 -0
- package/dist/components/GidsBasicTableHead/GidsBasicTableHead.d.ts.map +1 -0
- package/dist/components/GidsBasicTableHead/GidsBasicTableHead.js +86 -0
- package/dist/components/GidsBasicTableHead/GidsBasicTableHead.js.map +1 -0
- package/dist/components/GidsBasicTableHeader/GidsBasicTableHeader.d.ts +8 -0
- package/dist/components/GidsBasicTableHeader/GidsBasicTableHeader.d.ts.map +1 -0
- package/dist/components/GidsBasicTableHeader/GidsBasicTableHeader.js +26 -0
- package/dist/components/GidsBasicTableHeader/GidsBasicTableHeader.js.map +1 -0
- package/dist/components/GidsBasicTableRow/GidsBasicTableRow.d.ts +8 -0
- package/dist/components/GidsBasicTableRow/GidsBasicTableRow.d.ts.map +1 -0
- package/dist/components/GidsBasicTableRow/GidsBasicTableRow.js +41 -0
- package/dist/components/GidsBasicTableRow/GidsBasicTableRow.js.map +1 -0
- package/dist/components/GidsBsTable/GidsBsTable.d.ts +11 -0
- package/dist/components/GidsBsTable/GidsBsTable.d.ts.map +1 -0
- package/dist/components/GidsBsTable/GidsBsTable.js +99 -0
- package/dist/components/GidsBsTable/GidsBsTable.js.map +1 -0
- package/dist/components/GidsMdTable/GidsMdTable.d.ts +8 -0
- package/dist/components/GidsMdTable/GidsMdTable.d.ts.map +1 -0
- package/dist/components/GidsMdTable/GidsMdTable.js +24 -0
- package/dist/components/GidsMdTable/GidsMdTable.js.map +1 -0
- package/dist/components/GidsSideMenu/GidsSideMenu.d.ts +1 -1
- package/dist/components/GidsSideMenu/GidsSideMenu.d.ts.map +1 -1
- package/dist/components/GidsSideMenu/GidsSideMenu.js +3 -2
- package/dist/components/GidsSideMenu/GidsSideMenu.js.map +1 -1
- package/dist/components/GidsSideNavigation/GidsSideNavigation.d.ts +1 -1
- package/dist/components/GidsSideNavigation/GidsSideNavigation.d.ts.map +1 -1
- package/dist/components/GidsSideNavigation/GidsSideNavigation.js +3 -1
- package/dist/components/GidsSideNavigation/GidsSideNavigation.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/GidsActionBar/GidsActionBar.ts +2 -0
- package/src/components/GidsBasicTableBody/GidsBasicTableBody.ts +55 -0
- package/src/components/GidsBasicTableCell/GidsBasicTableCell.ts +45 -0
- package/src/components/GidsBasicTableHead/GidsBasicTableHead.ts +172 -0
- package/src/components/GidsBasicTableHeader/GidsBasicTableHeader.ts +56 -0
- package/src/components/GidsBasicTableRow/GidsBasicTableRow.ts +70 -0
- package/src/components/GidsBsTable/GidsBsTable.ts +206 -0
- package/src/components/GidsMdTable/GidsMdTable.ts +57 -0
- package/src/components/GidsSideMenu/GidsSideMenu.ts +18 -16
- package/src/components/GidsSideNavigation/GidsSideNavigation.ts +79 -76
- package/src/index.ts +7 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GidsBsTableWebProps,
|
|
3
|
+
GidsBsTableWebUtils,
|
|
4
|
+
} from '@ganpatiinfo/gids-web-shared';
|
|
5
|
+
import { DomChildren } from '../../utils/domUtils';
|
|
6
|
+
import { HtmlInputAttributes } from '../GidsInput/GidsInput';
|
|
7
|
+
import {
|
|
8
|
+
GidsBasicTableHeadDom,
|
|
9
|
+
GidsBasicTableHeadDomProps,
|
|
10
|
+
} from '../GidsBasicTableHead/GidsBasicTableHead';
|
|
11
|
+
import { GidsBasicTableHeaderDom } from '../GidsBasicTableHeader/GidsBasicTableHeader';
|
|
12
|
+
import { GidsBasicTableBodyDom } from '../GidsBasicTableBody/GidsBasicTableBody';
|
|
13
|
+
|
|
14
|
+
const {
|
|
15
|
+
getGidsBsTableClassNames,
|
|
16
|
+
getCustomisedTopHeaderCells,
|
|
17
|
+
getBsTableClasses,
|
|
18
|
+
getBsTableBodyBorder,
|
|
19
|
+
} = GidsBsTableWebUtils;
|
|
20
|
+
|
|
21
|
+
type GidsBsTableBaseWebProps = GidsBsTableWebProps<
|
|
22
|
+
DomChildren,
|
|
23
|
+
Event,
|
|
24
|
+
Element,
|
|
25
|
+
HtmlInputAttributes
|
|
26
|
+
> &
|
|
27
|
+
Pick<
|
|
28
|
+
GidsBasicTableHeadDomProps,
|
|
29
|
+
'onChange' | 'onInput' | 'onFocus' | 'onBlur' | 'onGidsSearchBarClear'
|
|
30
|
+
>;
|
|
31
|
+
|
|
32
|
+
export interface GidsBsTableDomProps extends GidsBsTableBaseWebProps {
|
|
33
|
+
extraClasses?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const GidsBsTableDom = ({
|
|
37
|
+
// Table properties
|
|
38
|
+
topHeaderCells = [],
|
|
39
|
+
tableBody = [],
|
|
40
|
+
width = 'full',
|
|
41
|
+
isTopHeaderVisible = false,
|
|
42
|
+
isHeadVisible = true,
|
|
43
|
+
topHeaderAppearance = 'none',
|
|
44
|
+
topHeaderLabelTypography = 'eyebrow-small',
|
|
45
|
+
topHeaderTextAlignment = 'left',
|
|
46
|
+
rowAppearance = 'none',
|
|
47
|
+
rowLabelTypography = 'label-small',
|
|
48
|
+
rowTextAlignment = 'left',
|
|
49
|
+
tableBorders = 'none',
|
|
50
|
+
tableBorderRadius = [],
|
|
51
|
+
tableBodyMaxHeight = 200,
|
|
52
|
+
extraClasses,
|
|
53
|
+
|
|
54
|
+
// Table Head properties
|
|
55
|
+
actionGroup = false,
|
|
56
|
+
allFiltersTabVisible = false,
|
|
57
|
+
moreFiltersTabVisible = false,
|
|
58
|
+
clearAllFiltersVisible = true,
|
|
59
|
+
clearAllFiltersButtonAppearance = 'primary',
|
|
60
|
+
primaryFilters = [],
|
|
61
|
+
secondaryFilters = [],
|
|
62
|
+
filterSize = 'xs',
|
|
63
|
+
filterAllIsDefaultSelected = true,
|
|
64
|
+
dropdownDividerVisible,
|
|
65
|
+
onToggleActionBarAllFilter,
|
|
66
|
+
onToggleActionBarDropdownFilter,
|
|
67
|
+
onToggleActionBarMoreFilter,
|
|
68
|
+
onToggleActionBarNoneFilter,
|
|
69
|
+
onDropdownSelectionActionBarFilterChange,
|
|
70
|
+
onMoreSelectionActionBarFilterChange,
|
|
71
|
+
onClearAllFiltersButton,
|
|
72
|
+
actionBarDisabled = false,
|
|
73
|
+
searchDisabled = false,
|
|
74
|
+
allFiltersData,
|
|
75
|
+
moreFiltersData,
|
|
76
|
+
children,
|
|
77
|
+
searchVisible = true,
|
|
78
|
+
filtersVisible = true,
|
|
79
|
+
childrenPosition = 'top-most',
|
|
80
|
+
tabVisible = false,
|
|
81
|
+
tabProps,
|
|
82
|
+
headBorderSides = [],
|
|
83
|
+
headBorderRadiusSides = [],
|
|
84
|
+
leadingIcon,
|
|
85
|
+
leadingLabel,
|
|
86
|
+
trailingLabel,
|
|
87
|
+
loading,
|
|
88
|
+
readOnly,
|
|
89
|
+
onGidsSearchBarClear,
|
|
90
|
+
onChange,
|
|
91
|
+
onInput,
|
|
92
|
+
onFocus,
|
|
93
|
+
onBlur,
|
|
94
|
+
headValue = '',
|
|
95
|
+
inputProps,
|
|
96
|
+
headAppearance = 'surface-default',
|
|
97
|
+
...restProps
|
|
98
|
+
}: GidsBsTableDomProps): HTMLDivElement => {
|
|
99
|
+
const bsTable = document.createElement('div');
|
|
100
|
+
bsTable.className = getGidsBsTableClassNames(
|
|
101
|
+
{ width, tableBorders, tableBorderRadius },
|
|
102
|
+
extraClasses,
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
// Table Head properties
|
|
106
|
+
if (isHeadVisible) {
|
|
107
|
+
bsTable.append(
|
|
108
|
+
GidsBasicTableHeadDom({
|
|
109
|
+
actionGroup,
|
|
110
|
+
allFiltersTabVisible,
|
|
111
|
+
moreFiltersTabVisible,
|
|
112
|
+
clearAllFiltersVisible,
|
|
113
|
+
clearAllFiltersButtonAppearance,
|
|
114
|
+
primaryFilters,
|
|
115
|
+
secondaryFilters,
|
|
116
|
+
filterSize,
|
|
117
|
+
filterAllIsDefaultSelected,
|
|
118
|
+
dropdownDividerVisible,
|
|
119
|
+
onToggleActionBarAllFilter,
|
|
120
|
+
onToggleActionBarDropdownFilter,
|
|
121
|
+
onToggleActionBarMoreFilter,
|
|
122
|
+
onToggleActionBarNoneFilter,
|
|
123
|
+
onDropdownSelectionActionBarFilterChange,
|
|
124
|
+
onMoreSelectionActionBarFilterChange,
|
|
125
|
+
onClearAllFiltersButton,
|
|
126
|
+
actionBarDisabled,
|
|
127
|
+
searchDisabled,
|
|
128
|
+
allFiltersData,
|
|
129
|
+
moreFiltersData,
|
|
130
|
+
children,
|
|
131
|
+
searchVisible,
|
|
132
|
+
filtersVisible,
|
|
133
|
+
childrenPosition,
|
|
134
|
+
tabVisible,
|
|
135
|
+
tabProps,
|
|
136
|
+
borderSides: headBorderSides,
|
|
137
|
+
borderRadiusSides: headBorderRadiusSides,
|
|
138
|
+
leadingIcon,
|
|
139
|
+
leadingLabel,
|
|
140
|
+
trailingLabel,
|
|
141
|
+
loading,
|
|
142
|
+
readOnly,
|
|
143
|
+
onGidsSearchBarClear,
|
|
144
|
+
onChange,
|
|
145
|
+
onInput,
|
|
146
|
+
onFocus,
|
|
147
|
+
onBlur,
|
|
148
|
+
value: headValue,
|
|
149
|
+
inputProps,
|
|
150
|
+
headAppearance,
|
|
151
|
+
...restProps,
|
|
152
|
+
}),
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Wrapper Container to safely handle scroll containment
|
|
157
|
+
const tableScrollContainer = document.createElement('div');
|
|
158
|
+
tableScrollContainer.className = 'gids-bs-table__scroll-container';
|
|
159
|
+
|
|
160
|
+
// Safe injection of the custom property value into the container element
|
|
161
|
+
if (tableBodyMaxHeight) {
|
|
162
|
+
tableScrollContainer.style.setProperty(
|
|
163
|
+
'--gidsBsTable-body-max-height',
|
|
164
|
+
`${tableBodyMaxHeight}px`,
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Table properties
|
|
169
|
+
const table = document.createElement('table');
|
|
170
|
+
table.className = getBsTableClasses({ width, isHeadVisible });
|
|
171
|
+
|
|
172
|
+
if (isTopHeaderVisible && topHeaderCells && topHeaderCells.length > 0) {
|
|
173
|
+
// Append Table Header
|
|
174
|
+
table.append(
|
|
175
|
+
GidsBasicTableHeaderDom({
|
|
176
|
+
appearance: topHeaderAppearance,
|
|
177
|
+
labelTypography: topHeaderLabelTypography,
|
|
178
|
+
textAlignment: topHeaderTextAlignment,
|
|
179
|
+
headerCells: getCustomisedTopHeaderCells({
|
|
180
|
+
topHeaderCells,
|
|
181
|
+
tableBorders,
|
|
182
|
+
}),
|
|
183
|
+
width: isHeadVisible ? 'full' : width,
|
|
184
|
+
}),
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if (tableBody && tableBody.length > 0) {
|
|
189
|
+
table.append(
|
|
190
|
+
GidsBasicTableBodyDom({
|
|
191
|
+
width: isHeadVisible ? 'full' : width,
|
|
192
|
+
tableBorders: getBsTableBodyBorder({ tableBorders }),
|
|
193
|
+
tableBodyData: tableBody,
|
|
194
|
+
rowAppearance,
|
|
195
|
+
rowLabelTypography,
|
|
196
|
+
rowTextAlignment,
|
|
197
|
+
}),
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// Structural Append hierarchy: table -> scroll wrapper -> root container
|
|
202
|
+
tableScrollContainer.appendChild(table);
|
|
203
|
+
bsTable.appendChild(tableScrollContainer);
|
|
204
|
+
|
|
205
|
+
return bsTable;
|
|
206
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GidsMdTableWebProps,
|
|
3
|
+
GidsMdTableWebUtils,
|
|
4
|
+
} from '@ganpatiinfo/gids-web-shared';
|
|
5
|
+
|
|
6
|
+
const { getGidsMdTableClassNames } = GidsMdTableWebUtils;
|
|
7
|
+
|
|
8
|
+
type GidsMdTableBaseWebProps = GidsMdTableWebProps;
|
|
9
|
+
|
|
10
|
+
type GidsMdTableElement = HTMLElement & GidsMdTableBaseWebProps;
|
|
11
|
+
|
|
12
|
+
export interface GidsMdTableDomProps extends GidsMdTableBaseWebProps {
|
|
13
|
+
extraClasses?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const GidsMdTableDom = ({
|
|
17
|
+
topHeaderCells = [],
|
|
18
|
+
tableBody = [],
|
|
19
|
+
width = 'full',
|
|
20
|
+
isTopHeaderVisible = false,
|
|
21
|
+
isSideHeaderVisible = false,
|
|
22
|
+
topHeaderAppearance = 'none',
|
|
23
|
+
topHeaderLabelTypography = 'eyebrow-small',
|
|
24
|
+
topHeaderTextAlignment = 'left',
|
|
25
|
+
sideHeaderAppearance = 'none',
|
|
26
|
+
sideHeaderLabelTypography = 'label-small',
|
|
27
|
+
sideHeaderTextAlignment = 'left',
|
|
28
|
+
rowAppearance = 'none',
|
|
29
|
+
rowLabelTypography = 'label-small',
|
|
30
|
+
rowTextAlignment = 'left',
|
|
31
|
+
tableBorders = 'none',
|
|
32
|
+
tableBorderRadius = [],
|
|
33
|
+
extraClasses,
|
|
34
|
+
}: GidsMdTableDomProps): HTMLElement => {
|
|
35
|
+
const mdTable = document.createElement('gids-md-table') as GidsMdTableElement;
|
|
36
|
+
|
|
37
|
+
mdTable.isTopHeaderVisible = isTopHeaderVisible;
|
|
38
|
+
mdTable.isSideHeaderVisible = isSideHeaderVisible;
|
|
39
|
+
mdTable.topHeaderAppearance = topHeaderAppearance;
|
|
40
|
+
mdTable.topHeaderLabelTypography = topHeaderLabelTypography;
|
|
41
|
+
mdTable.topHeaderTextAlignment = topHeaderTextAlignment;
|
|
42
|
+
mdTable.sideHeaderAppearance = sideHeaderAppearance;
|
|
43
|
+
mdTable.sideHeaderLabelTypography = sideHeaderLabelTypography;
|
|
44
|
+
mdTable.sideHeaderTextAlignment = sideHeaderTextAlignment;
|
|
45
|
+
mdTable.rowAppearance = rowAppearance;
|
|
46
|
+
mdTable.rowLabelTypography = rowLabelTypography;
|
|
47
|
+
mdTable.rowTextAlignment = rowTextAlignment;
|
|
48
|
+
mdTable.topHeaderCells = topHeaderCells;
|
|
49
|
+
mdTable.tableBody = tableBody;
|
|
50
|
+
mdTable.tableBorders = tableBorders;
|
|
51
|
+
mdTable.tableBorderRadius = tableBorderRadius;
|
|
52
|
+
mdTable.width = width;
|
|
53
|
+
|
|
54
|
+
mdTable.className = getGidsMdTableClassNames({ width }, extraClasses);
|
|
55
|
+
|
|
56
|
+
return mdTable;
|
|
57
|
+
};
|
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
GidsSideMenuWebProps,
|
|
3
|
+
GidsSideMenuWebUtils,
|
|
4
4
|
} from '@ganpatiinfo/gids-web-shared';
|
|
5
5
|
import { appendAsChildren, DomChildren } from '../../utils/domUtils.js';
|
|
6
6
|
|
|
7
7
|
const { getGidsSideMenuClassNames } = GidsSideMenuWebUtils;
|
|
8
8
|
|
|
9
9
|
export interface GidsSideMenuDomProps extends GidsSideMenuWebProps<DomChildren> {
|
|
10
|
-
|
|
10
|
+
sideMenuExtraClasses?: string;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export const GidsSideMenuDom = ({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
children,
|
|
15
|
+
sideMenuAppearance = 'default',
|
|
16
|
+
height = 'intrinsic',
|
|
17
|
+
sideMenuExtraClasses,
|
|
17
18
|
}: GidsSideMenuDomProps): HTMLDivElement => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
const sideMenu = document.createElement('div');
|
|
20
|
+
sideMenu.className = getGidsSideMenuClassNames(
|
|
21
|
+
{ sideMenuAppearance, height },
|
|
22
|
+
sideMenuExtraClasses,
|
|
23
|
+
);
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
sideMenu.setAttribute('side-menu-appearance', sideMenuAppearance);
|
|
26
|
+
sideMenu.setAttribute('side-menu-height', height);
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
if (children) {
|
|
29
|
+
appendAsChildren(sideMenu, children);
|
|
30
|
+
}
|
|
29
31
|
|
|
30
|
-
|
|
32
|
+
return sideMenu;
|
|
31
33
|
};
|
|
@@ -1,97 +1,100 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
GidsSideNavigationWebProps,
|
|
3
|
+
GidsSideNavigationWebUtils,
|
|
4
4
|
} from '@ganpatiinfo/gids-web-shared';
|
|
5
5
|
import { DomChildren } from '../../utils/domUtils.js';
|
|
6
6
|
import { HtmlInputAttributes } from '../GidsInput/GidsInput.js';
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
type GidsSideMenuHeaderDomProps,
|
|
9
|
+
GidsSideMenuHeaderDom,
|
|
10
10
|
} from '../GidsSideMenuHeader/GidsSideMenuHeader.js';
|
|
11
11
|
import { GidsSideMenuDom } from '../GidsSideMenu/GidsSideMenu.js';
|
|
12
12
|
|
|
13
13
|
const { getGidsSideNavigationClassNames } = GidsSideNavigationWebUtils;
|
|
14
14
|
|
|
15
15
|
export interface GidsSideNavigationDomProps
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
16
|
+
extends
|
|
17
|
+
GidsSideNavigationWebProps<
|
|
18
|
+
DomChildren,
|
|
19
|
+
DomChildren,
|
|
20
|
+
Element,
|
|
21
|
+
HtmlInputAttributes
|
|
22
|
+
>,
|
|
23
|
+
Pick<
|
|
24
|
+
GidsSideMenuHeaderDomProps,
|
|
25
|
+
| 'headerClasses'
|
|
26
|
+
| 'wrapperClass'
|
|
27
|
+
| 'onGidsSearchBarClear'
|
|
28
|
+
| 'className'
|
|
29
|
+
| 'onBlur'
|
|
30
|
+
| 'onChange'
|
|
31
|
+
| 'onFocus'
|
|
32
|
+
| 'onInput'
|
|
33
|
+
> {
|
|
34
|
+
extraSideNavigationClasses?: string;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export const GidsSideNavigationDom = ({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
38
|
+
sideNavigationAppearance = 'default',
|
|
39
|
+
headerDividedByDivider = true,
|
|
40
|
+
headerClasses,
|
|
41
|
+
height = 'intrinsic',
|
|
42
|
+
extraSideNavigationClasses,
|
|
43
|
+
customHeaderChildren,
|
|
44
|
+
isHeaderVisible = true,
|
|
45
|
+
searchVisible = true,
|
|
46
|
+
children,
|
|
47
|
+
onGidsSearchBarClear,
|
|
48
|
+
onBlur,
|
|
49
|
+
onChange,
|
|
50
|
+
onFocus,
|
|
51
|
+
onInput,
|
|
52
|
+
...restProps
|
|
52
53
|
}: GidsSideNavigationDomProps): HTMLElement => {
|
|
53
|
-
|
|
54
|
+
const sideNav = document.createElement('nav');
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
// FIX: Force set the physical HTML attributes so Stencil is forced to read them on boot
|
|
57
|
+
sideNav.setAttribute('side-navigation-appearance', sideNavigationAppearance);
|
|
58
|
+
sideNav.setAttribute('is-header-visible', String(isHeaderVisible));
|
|
59
|
+
sideNav.setAttribute('search-visible', String(searchVisible));
|
|
60
|
+
sideNav.setAttribute('side-navigation-height', height);
|
|
61
|
+
sideNav.setAttribute(
|
|
62
|
+
'header-divided-by-divider',
|
|
63
|
+
String(headerDividedByDivider),
|
|
64
|
+
);
|
|
63
65
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
sideNav.className = getGidsSideNavigationClassNames(
|
|
67
|
+
{ sideNavigationAppearance },
|
|
68
|
+
extraSideNavigationClasses,
|
|
69
|
+
);
|
|
68
70
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
71
|
+
if (isHeaderVisible) {
|
|
72
|
+
sideNav.append(
|
|
73
|
+
GidsSideMenuHeaderDom({
|
|
74
|
+
searchVisible,
|
|
75
|
+
headerClasses,
|
|
76
|
+
headerAppearance: sideNavigationAppearance,
|
|
77
|
+
customChildren: customHeaderChildren,
|
|
78
|
+
onBlur,
|
|
79
|
+
onChange,
|
|
80
|
+
onFocus,
|
|
81
|
+
onInput,
|
|
82
|
+
onGidsSearchBarClear,
|
|
83
|
+
headerDividedByDivider,
|
|
84
|
+
...restProps,
|
|
85
|
+
}),
|
|
86
|
+
);
|
|
87
|
+
}
|
|
86
88
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
89
|
+
if (children) {
|
|
90
|
+
sideNav.append(
|
|
91
|
+
GidsSideMenuDom({
|
|
92
|
+
children,
|
|
93
|
+
sideMenuAppearance: sideNavigationAppearance,
|
|
94
|
+
height,
|
|
95
|
+
}),
|
|
96
|
+
);
|
|
97
|
+
}
|
|
95
98
|
|
|
96
|
-
|
|
99
|
+
return sideNav;
|
|
97
100
|
};
|
package/src/index.ts
CHANGED
|
@@ -109,6 +109,13 @@ export * from './components/GidsExpansion/GidsExpansion.js';
|
|
|
109
109
|
export * from './components/GidsExpansionBodyListItem/GidsExpansionBodyListItem.js';
|
|
110
110
|
export * from './components/GidsExpansionBodyList/GidsExpansionBodyList.js';
|
|
111
111
|
export * from './components/GidsExpansionGroup/GidsExpansionGroup.js';
|
|
112
|
+
export * from './components/GidsBasicTableHead/GidsBasicTableHead.js';
|
|
113
|
+
export * from './components/GidsBasicTableCell/GidsBasicTableCell.js';
|
|
114
|
+
export * from './components/GidsBasicTableRow/GidsBasicTableRow.js';
|
|
115
|
+
export * from './components/GidsBasicTableHeader/GidsBasicTableHeader.js';
|
|
116
|
+
export * from './components/GidsMdTable/GidsMdTable.js';
|
|
117
|
+
export * from './components/GidsBsTable/GidsBsTable.js';
|
|
118
|
+
export * from './components/GidsBasicTableBody/GidsBasicTableBody.js';
|
|
112
119
|
|
|
113
120
|
/**
|
|
114
121
|
* Utilities
|