xv-webcomponents 2.0.0-beta.2 → 2.0.0-beta.28
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 +3 -2
- package/dist/angular/index.d.ts +1 -1
- package/dist/angular/index.js +3 -4
- package/dist/angular/proxies.d.ts +60 -34
- package/dist/angular/proxies.js +51 -67
- package/dist/angular/web-components.module.d.ts +1 -1
- package/dist/angular/web-components.module.js +10 -13
- package/dist/cjs/{index-Cfa6bBQW.js → index-DaTpiyaU.js} +1 -1
- package/dist/cjs/{index-Cixkr3sz.js → index-Dwhgrew8.js} +15 -10
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{xv-accordion-v2_50.cjs.entry.js → xv-accordion-v2_49.cjs.entry.js} +1529 -147
- package/dist/cjs/xv-header-next.cjs.entry.js +2 -2
- package/dist/cjs/xv-mega-menu-next.cjs.entry.js +2 -2
- package/dist/cjs/xv-webcomponents.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +1 -2
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +9 -8
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.css +129 -61
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js +277 -78
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.css +138 -24
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +334 -168
- package/dist/collection/components/xv-table/xv-table.css +240 -99
- package/dist/collection/components/xv-table/xv-table.js +2056 -63
- package/dist/collection/components/xv-table/xv-table.model.js +10 -0
- package/dist/collection/components/xv-table/xv-table.utils.js +243 -0
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +1 -1
- package/dist/collection/components/xv-tag/xv-tag.js +1 -1
- package/dist/collection/components/xv-tag-combobox/xv-tag-combobox.js +2 -2
- package/dist/collection/components/xv-text-input/xv-text-input.js +2 -2
- package/dist/collection/components/xv-textarea/xv-textarea.js +2 -2
- package/dist/collection/components/xv-tile/xv-tile.js +2 -2
- package/dist/collection/components/xv-toggle/xv-toggle.js +1 -1
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js +1 -1
- package/dist/collection/components/xv-tooltip/xv-tooltip.js +2 -2
- package/dist/collection/utils/table-layout.js +130 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-B0kwaJ8n.js +1 -0
- package/dist/components/{p-CbVZCn2p.js → p-BEoh0dZI.js} +1 -1
- package/dist/components/{p-ZYJfCCwX.js → p-BaZ-srfu.js} +1 -1
- package/dist/components/{p-DyGMZIub.js → p-Bej2l-wN.js} +1 -1
- package/dist/components/{p-Ddx5DwV5.js → p-BfhvpeQh.js} +1 -1
- package/dist/components/{p-kQVUwJXZ.js → p-CSYnNMKb.js} +1 -1
- package/dist/components/{p-BNP2Lw34.js → p-CspyoLL9.js} +1 -1
- package/dist/components/p-CvgDDcjp.js +1 -0
- package/dist/components/{p-COoj5JkZ.js → p-D4FwGeDJ.js} +1 -1
- package/dist/components/p-DCvH_Br_.js +1 -0
- package/dist/components/{p-CEjlxnKY.js → p-DFe9Mtw_.js} +1 -1
- package/dist/components/{p-BRZwUlfE.js → p-DFtMwE-h.js} +1 -1
- package/dist/components/p-DIvi4fI3.js +1 -0
- package/dist/components/{p-DTwz9Fsh.js → p-DNRISLNf.js} +1 -1
- package/dist/components/p-DPnvoOYj.js +1 -0
- package/dist/components/{p-Dzz9jxLm.js → p-Dwbe941A.js} +1 -1
- package/dist/components/{p-CMAJWZsP.js → p-JClekcEh.js} +1 -1
- package/dist/components/{p-DtUNYh73.js → p-NoM9oIJn.js} +1 -1
- package/dist/components/{p-DlLBjhuH.js → p-XEk4dHG3.js} +1 -1
- package/dist/components/p-i7_81si-.js +1 -0
- package/dist/components/{p-BRYrLHiz.js → p-i82EFiq6.js} +1 -1
- package/dist/components/{p-BXB4D7j4.js → p-jD7nSJaM.js} +1 -1
- package/dist/components/xv-accordion-v2-item.js +1 -1
- package/dist/components/xv-accordion-v2.js +1 -1
- package/dist/components/xv-breadcrumbs-v2.js +1 -1
- package/dist/components/xv-button-group-v2.js +1 -1
- package/dist/components/xv-button-v2.js +1 -1
- package/dist/components/xv-card-v2.js +1 -1
- package/dist/components/xv-checkbox-v2.js +1 -1
- package/dist/components/xv-content-switcher-item-v2.js +1 -1
- package/dist/components/xv-content-switcher-v2.js +1 -1
- package/dist/components/xv-data-table-cell.js +1 -1
- package/dist/components/xv-data-table-collapse.js +1 -1
- package/dist/components/xv-data-table-row.js +1 -1
- package/dist/components/xv-data-table.js +2 -2
- package/dist/components/xv-date-picker.js +1 -1
- package/dist/components/xv-datepicker.js +1 -1
- package/dist/components/xv-dropdown-v2-item.js +1 -1
- package/dist/components/xv-dropdown-v2.js +1 -1
- package/dist/components/xv-file-uploader.js +1 -1
- package/dist/components/xv-footer.js +1 -1
- package/dist/components/xv-geo-map-v2.js +1 -1
- package/dist/components/xv-header-next.js +1 -1
- package/dist/components/xv-header.js +1 -1
- package/dist/components/xv-image-viewer.js +1 -1
- package/dist/components/xv-link-v2.js +1 -1
- package/dist/components/xv-loader-v2.js +1 -1
- package/dist/components/xv-login-modal.js +1 -1
- package/dist/components/xv-mega-menu-next.js +1 -1
- package/dist/components/xv-mega-menu.js +1 -1
- package/dist/components/xv-modal-v2.js +1 -1
- package/dist/components/xv-notification-v2.js +1 -1
- package/dist/components/xv-number-input-v2.js +1 -1
- package/dist/components/xv-overflow-menu-v2-item.js +1 -1
- package/dist/components/xv-overflow-menu-v2.js +1 -1
- package/dist/components/xv-pagination.js +1 -1
- package/dist/components/xv-progress-indicator-v2-item.js +1 -1
- package/dist/components/xv-progress-indicator-v2.js +1 -1
- package/dist/components/xv-radio-v2.js +1 -1
- package/dist/components/xv-slider-v2.js +1 -1
- package/dist/components/xv-tab-v2.js +1 -1
- package/dist/components/{xv-table-v2-row.d.ts → xv-table-cell.d.ts} +4 -4
- package/dist/components/xv-table-cell.js +1 -0
- package/dist/components/{xv-table-v2-cell.d.ts → xv-table-row.d.ts} +4 -4
- package/dist/components/xv-table-row.js +1 -0
- package/dist/components/{xv-table-v2.d.ts → xv-table.d.ts} +4 -4
- package/dist/components/xv-table.js +1 -0
- package/dist/components/xv-tabs-v2.js +1 -1
- package/dist/components/xv-tag-combobox.js +1 -1
- package/dist/components/xv-tag-v2.js +1 -1
- package/dist/components/xv-text-input-v2.js +1 -1
- package/dist/components/xv-textarea.js +1 -1
- package/dist/components/xv-tile.js +1 -1
- package/dist/components/xv-toggle-tip.js +1 -1
- package/dist/components/xv-toggle.js +1 -1
- package/dist/components/xv-tooltip-v2.js +1 -1
- package/dist/custom-elements.json +1765 -294
- package/dist/docs.json +2749 -443
- package/dist/esm/{index-B6cY-_U1.js → index-ClusqSO5.js} +1 -1
- package/dist/esm/{index-Bu8SrOeR.js → index-DJC3-dS3.js} +15 -10
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{xv-accordion-v2_50.entry.js → xv-accordion-v2_49.entry.js} +1527 -144
- package/dist/esm/xv-header-next.entry.js +2 -2
- package/dist/esm/xv-mega-menu-next.entry.js +2 -2
- package/dist/esm/xv-webcomponents.js +4 -4
- package/dist/react/components.d.ts +3 -4
- package/dist/react/components.js +3 -4
- package/dist/react/{xv-table-v2-expand.d.ts → xv-table-cell.d.ts} +3 -3
- package/dist/react/xv-table-cell.js +14 -0
- package/dist/react/{xv-table-v2.d.ts → xv-table-row.d.ts} +3 -3
- package/dist/react/{xv-table-v2.js → xv-table-row.js} +5 -5
- package/dist/react/xv-table.d.ts +18 -0
- package/dist/react/xv-table.js +22 -0
- package/dist/types/components/xv-table/xv-table-cell/xv-table-cell.d.ts +43 -8
- package/dist/types/components/xv-table/xv-table-row/xv-table-row.d.ts +57 -18
- package/dist/types/components/xv-table/xv-table.d.ts +298 -9
- package/dist/types/components/xv-table/xv-table.model.d.ts +78 -0
- package/dist/types/components/xv-table/xv-table.utils.d.ts +47 -0
- package/dist/types/components.d.ts +899 -118
- package/dist/types/stencil-public-runtime.d.ts +61 -55
- package/dist/types/utils/table-layout.d.ts +7 -0
- package/dist/vscode-data.json +347 -56
- package/dist/xv-webcomponents/index.esm.js +1 -1
- package/dist/xv-webcomponents/{p-1ffb0b4f.entry.js → p-0c30d09f.entry.js} +1 -1
- package/dist/xv-webcomponents/{p-eb9d7750.entry.js → p-6b58979e.entry.js} +2 -2
- package/dist/xv-webcomponents/{p-Bu8SrOeR.js → p-DJC3-dS3.js} +2 -2
- package/dist/xv-webcomponents/{p-DB4KqDJz.js → p-DSFVdw3w.js} +1 -1
- package/dist/xv-webcomponents/{p-d4d26ff2.entry.js → p-c4173686.entry.js} +1 -1
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
- package/package.json +139 -139
- package/dist/collection/components/xv-table/_vars.js +0 -2
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.css +0 -58
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +0 -75
- package/dist/components/p-CHtssNO9.js +0 -1
- package/dist/components/p-CILNPUHH.js +0 -1
- package/dist/components/p-DVZ2BlIP.js +0 -1
- package/dist/components/p-bdaoJ1tx.js +0 -1
- package/dist/components/xv-table-v2-cell.js +0 -1
- package/dist/components/xv-table-v2-expand.d.ts +0 -11
- package/dist/components/xv-table-v2-expand.js +0 -1
- package/dist/components/xv-table-v2-row.js +0 -1
- package/dist/components/xv-table-v2.js +0 -1
- package/dist/react/xv-table-v2-cell.d.ts +0 -12
- package/dist/react/xv-table-v2-cell.js +0 -14
- package/dist/react/xv-table-v2-expand.js +0 -14
- package/dist/react/xv-table-v2-row.d.ts +0 -13
- package/dist/react/xv-table-v2-row.js +0 -17
- package/dist/types/components/xv-table/_vars.d.ts +0 -15
- package/dist/types/components/xv-table/xv-table-expand/xv-table-expand.d.ts +0 -8
package/dist/vscode-data.json
CHANGED
|
@@ -432,7 +432,7 @@
|
|
|
432
432
|
"name": "xv-data-table",
|
|
433
433
|
"description": {
|
|
434
434
|
"kind": "markdown",
|
|
435
|
-
"value": ""
|
|
435
|
+
"value": "> **Deprecated.** Superseded by [`xv-table`](../xv-table), which adds sorting, selection, batch\r\n> actions, expansion, column resizing, reordering and hiding, a persisted layout and pagination.\r\n> This component stays only until its 22 usages in XvMarketplaceNG are migrated; removal is\r\n> tracked by MAR-15895."
|
|
436
436
|
},
|
|
437
437
|
"attributes": [
|
|
438
438
|
{
|
|
@@ -2160,23 +2160,176 @@
|
|
|
2160
2160
|
]
|
|
2161
2161
|
},
|
|
2162
2162
|
{
|
|
2163
|
-
"name": "xv-table
|
|
2163
|
+
"name": "xv-table",
|
|
2164
2164
|
"description": {
|
|
2165
2165
|
"kind": "markdown",
|
|
2166
|
-
"value": ""
|
|
2166
|
+
"value": "A data table built on CSS grid with `subgrid` rows, so a row keeps its own box while its cells\nstay aligned to the table's columns and an expanded panel can span the full width.\n\n`columns` always describes the structure — widths, order, sorting, resizing, hiding and the\nstored layout all read from it. Rows come either from `rows` as data, or as slotted\n`xv-table-row` children when the cells hold arbitrary markup."
|
|
2167
2167
|
},
|
|
2168
2168
|
"attributes": [
|
|
2169
|
+
{
|
|
2170
|
+
"name": "block",
|
|
2171
|
+
"description": "Stretches the table to the full width of its container."
|
|
2172
|
+
},
|
|
2173
|
+
{
|
|
2174
|
+
"name": "columns",
|
|
2175
|
+
"description": "Column definitions. Accepts its JSON string form so it is settable from plain markup."
|
|
2176
|
+
},
|
|
2177
|
+
{
|
|
2178
|
+
"name": "columns-label",
|
|
2179
|
+
"description": "Tooltip on the column picker trigger."
|
|
2180
|
+
},
|
|
2181
|
+
{
|
|
2182
|
+
"name": "description",
|
|
2183
|
+
"description": "Supporting text under the title."
|
|
2184
|
+
},
|
|
2185
|
+
{
|
|
2186
|
+
"name": "empty-label",
|
|
2187
|
+
"description": "Shown when there are no rows."
|
|
2188
|
+
},
|
|
2189
|
+
{
|
|
2190
|
+
"name": "expand-label",
|
|
2191
|
+
"description": "Accessible name of a row's expand toggle."
|
|
2192
|
+
},
|
|
2193
|
+
{
|
|
2194
|
+
"name": "expand-mode",
|
|
2195
|
+
"description": "Whether rows expand, and whether more than one may be open.",
|
|
2196
|
+
"values": [
|
|
2197
|
+
{
|
|
2198
|
+
"name": "multiple"
|
|
2199
|
+
},
|
|
2200
|
+
{
|
|
2201
|
+
"name": "none"
|
|
2202
|
+
},
|
|
2203
|
+
{
|
|
2204
|
+
"name": "single"
|
|
2205
|
+
}
|
|
2206
|
+
]
|
|
2207
|
+
},
|
|
2208
|
+
{
|
|
2209
|
+
"name": "expanded",
|
|
2210
|
+
"description": "Values of the expanded rows."
|
|
2211
|
+
},
|
|
2169
2212
|
{
|
|
2170
2213
|
"name": "hover",
|
|
2171
|
-
"description": ""
|
|
2214
|
+
"description": "Highlights a row on pointer hover."
|
|
2215
|
+
},
|
|
2216
|
+
{
|
|
2217
|
+
"name": "label",
|
|
2218
|
+
"description": "Title above the table."
|
|
2219
|
+
},
|
|
2220
|
+
{
|
|
2221
|
+
"name": "layout",
|
|
2222
|
+
"description": "Controlled column layout. Overrides whatever is stored."
|
|
2172
2223
|
},
|
|
2173
2224
|
{
|
|
2174
2225
|
"name": "loading",
|
|
2175
|
-
"description": ""
|
|
2226
|
+
"description": "Covers the body with a loading state."
|
|
2227
|
+
},
|
|
2228
|
+
{
|
|
2229
|
+
"name": "locale",
|
|
2230
|
+
"description": "Locale used for sorting and cell formatting. Falls back to the nearest `[lang]` ancestor."
|
|
2231
|
+
},
|
|
2232
|
+
{
|
|
2233
|
+
"name": "min-width",
|
|
2234
|
+
"description": "Width below which the table scrolls instead of squeezing, at any viewport. Left unset, a table\nonly stops squeezing below 1180px, where it scrolls at the width its columns declared."
|
|
2235
|
+
},
|
|
2236
|
+
{
|
|
2237
|
+
"name": "page",
|
|
2238
|
+
"description": "Current page, 1-based."
|
|
2239
|
+
},
|
|
2240
|
+
{
|
|
2241
|
+
"name": "page-size",
|
|
2242
|
+
"description": "Rows per page."
|
|
2243
|
+
},
|
|
2244
|
+
{
|
|
2245
|
+
"name": "page-size-options",
|
|
2246
|
+
"description": "Page size choices. Accepts a comma-separated attribute."
|
|
2247
|
+
},
|
|
2248
|
+
{
|
|
2249
|
+
"name": "pagination-mode",
|
|
2250
|
+
"description": "`client` slices the `rows` prop; `server` only emits `pageChange`.",
|
|
2251
|
+
"values": [
|
|
2252
|
+
{
|
|
2253
|
+
"name": "client"
|
|
2254
|
+
},
|
|
2255
|
+
{
|
|
2256
|
+
"name": "none"
|
|
2257
|
+
},
|
|
2258
|
+
{
|
|
2259
|
+
"name": "server"
|
|
2260
|
+
}
|
|
2261
|
+
]
|
|
2262
|
+
},
|
|
2263
|
+
{
|
|
2264
|
+
"name": "reorder-label",
|
|
2265
|
+
"description": "Accessible name of a row's drag grip."
|
|
2266
|
+
},
|
|
2267
|
+
{
|
|
2268
|
+
"name": "reorderable",
|
|
2269
|
+
"description": "Allows dragging column headers into a new order. Off by default, like `resizable`."
|
|
2270
|
+
},
|
|
2271
|
+
{
|
|
2272
|
+
"name": "reset-label",
|
|
2273
|
+
"description": "Text of the button that restores the declared column layout."
|
|
2274
|
+
},
|
|
2275
|
+
{
|
|
2276
|
+
"name": "resizable",
|
|
2277
|
+
"description": "Allows dragging column edges. Off by default: no handle is rendered and nothing is bound\nuntil it is switched on. A column may switch itself off, never on."
|
|
2278
|
+
},
|
|
2279
|
+
{
|
|
2280
|
+
"name": "row-clickable",
|
|
2281
|
+
"description": "Emits `rowClick` when a row is clicked outside an interactive element."
|
|
2282
|
+
},
|
|
2283
|
+
{
|
|
2284
|
+
"name": "row-key",
|
|
2285
|
+
"description": "Property of a row object that identifies it in selection and expansion payloads."
|
|
2286
|
+
},
|
|
2287
|
+
{
|
|
2288
|
+
"name": "row-reorder-handle",
|
|
2289
|
+
"description": "Whether the whole row drags, or only a grip in a leading control cell.",
|
|
2290
|
+
"values": [
|
|
2291
|
+
{
|
|
2292
|
+
"name": "icon"
|
|
2293
|
+
},
|
|
2294
|
+
{
|
|
2295
|
+
"name": "row"
|
|
2296
|
+
}
|
|
2297
|
+
]
|
|
2298
|
+
},
|
|
2299
|
+
{
|
|
2300
|
+
"name": "row-reorderable",
|
|
2301
|
+
"description": "Allows dragging rows into a new order. Off by default: nothing is bound and no handle is\nrendered until it is switched on."
|
|
2302
|
+
},
|
|
2303
|
+
{
|
|
2304
|
+
"name": "rows",
|
|
2305
|
+
"description": "Row data. Ignored when `xv-table-row` children are slotted."
|
|
2306
|
+
},
|
|
2307
|
+
{
|
|
2308
|
+
"name": "selected",
|
|
2309
|
+
"description": "Values of the selected rows."
|
|
2310
|
+
},
|
|
2311
|
+
{
|
|
2312
|
+
"name": "selected-label",
|
|
2313
|
+
"description": "Text of the batch bar counter. `{count}` is replaced with the number of selected rows."
|
|
2314
|
+
},
|
|
2315
|
+
{
|
|
2316
|
+
"name": "selection",
|
|
2317
|
+
"description": "`multiple` renders checkboxes, `single` renders radios.",
|
|
2318
|
+
"values": [
|
|
2319
|
+
{
|
|
2320
|
+
"name": "multiple"
|
|
2321
|
+
},
|
|
2322
|
+
{
|
|
2323
|
+
"name": "none"
|
|
2324
|
+
},
|
|
2325
|
+
{
|
|
2326
|
+
"name": "single"
|
|
2327
|
+
}
|
|
2328
|
+
]
|
|
2176
2329
|
},
|
|
2177
2330
|
{
|
|
2178
2331
|
"name": "size",
|
|
2179
|
-
"description": "",
|
|
2332
|
+
"description": "Row height ladder.",
|
|
2180
2333
|
"values": [
|
|
2181
2334
|
{
|
|
2182
2335
|
"name": "lg"
|
|
@@ -2194,6 +2347,45 @@
|
|
|
2194
2347
|
"name": "xs"
|
|
2195
2348
|
}
|
|
2196
2349
|
]
|
|
2350
|
+
},
|
|
2351
|
+
{
|
|
2352
|
+
"name": "skeleton-rows",
|
|
2353
|
+
"description": "Placeholder rows drawn while `loading`. Zero draws a spinner instead."
|
|
2354
|
+
},
|
|
2355
|
+
{
|
|
2356
|
+
"name": "sort-by",
|
|
2357
|
+
"description": "Active sort, as `asc(field)` / `desc(field)` or an object."
|
|
2358
|
+
},
|
|
2359
|
+
{
|
|
2360
|
+
"name": "sort-mode",
|
|
2361
|
+
"description": "`none` makes headers inert whatever the column says; `client` sorts the `rows` prop itself;\n`server` offers the affordance and only emits `sortChange` for the consumer to reload.",
|
|
2362
|
+
"values": [
|
|
2363
|
+
{
|
|
2364
|
+
"name": "client"
|
|
2365
|
+
},
|
|
2366
|
+
{
|
|
2367
|
+
"name": "none"
|
|
2368
|
+
},
|
|
2369
|
+
{
|
|
2370
|
+
"name": "server"
|
|
2371
|
+
}
|
|
2372
|
+
]
|
|
2373
|
+
},
|
|
2374
|
+
{
|
|
2375
|
+
"name": "sticky-header",
|
|
2376
|
+
"description": "Keeps the header visible while the body scrolls."
|
|
2377
|
+
},
|
|
2378
|
+
{
|
|
2379
|
+
"name": "storage-key",
|
|
2380
|
+
"description": "Persists the column layout under this key. Empty means the layout is not remembered."
|
|
2381
|
+
},
|
|
2382
|
+
{
|
|
2383
|
+
"name": "storage-owner",
|
|
2384
|
+
"description": "Scopes the stored layout to a user."
|
|
2385
|
+
},
|
|
2386
|
+
{
|
|
2387
|
+
"name": "total",
|
|
2388
|
+
"description": "Total row count, for `server` pagination."
|
|
2197
2389
|
}
|
|
2198
2390
|
],
|
|
2199
2391
|
"references": [
|
|
@@ -2204,38 +2396,85 @@
|
|
|
2204
2396
|
]
|
|
2205
2397
|
},
|
|
2206
2398
|
{
|
|
2207
|
-
"name": "xv-table-
|
|
2399
|
+
"name": "xv-table-cell",
|
|
2208
2400
|
"description": {
|
|
2209
2401
|
"kind": "markdown",
|
|
2210
|
-
"value": ""
|
|
2402
|
+
"value": "One cell of a table row. It holds arbitrary markup — buttons, links, tags, nested components —\r\nwhich is why the table stays composed rather than driven only by data.\r\n\r\nIn a header row it also carries the column affordances: the sort arrow, the drag grip and the\r\nresize handle. The table renders this same component in both modes, so a header written as\r\nmarkup can do everything a header built from `columns` can."
|
|
2211
2403
|
},
|
|
2212
2404
|
"attributes": [
|
|
2213
2405
|
{
|
|
2214
2406
|
"name": "align",
|
|
2215
|
-
"description": "",
|
|
2407
|
+
"description": "Horizontal alignment of the content.",
|
|
2216
2408
|
"values": [
|
|
2217
2409
|
{
|
|
2218
2410
|
"name": "center"
|
|
2219
2411
|
},
|
|
2220
2412
|
{
|
|
2221
|
-
"name": "
|
|
2413
|
+
"name": "end"
|
|
2222
2414
|
},
|
|
2223
2415
|
{
|
|
2224
|
-
"name": "
|
|
2416
|
+
"name": "start"
|
|
2225
2417
|
}
|
|
2226
2418
|
]
|
|
2227
2419
|
},
|
|
2228
2420
|
{
|
|
2229
|
-
"name": "
|
|
2230
|
-
"description": ""
|
|
2421
|
+
"name": "clamp-lines",
|
|
2422
|
+
"description": "Lines kept before clamping, when `overflow` is `clamp`."
|
|
2231
2423
|
},
|
|
2232
2424
|
{
|
|
2233
|
-
"name": "
|
|
2234
|
-
"description": ""
|
|
2425
|
+
"name": "column-id",
|
|
2426
|
+
"description": "Column this cell belongs to. Identifies it for sorting, resizing and the stored layout."
|
|
2235
2427
|
},
|
|
2236
2428
|
{
|
|
2237
|
-
"name": "
|
|
2238
|
-
"description": ""
|
|
2429
|
+
"name": "header",
|
|
2430
|
+
"description": "Renders the cell as a column header. Set by the table from the row it sits in."
|
|
2431
|
+
},
|
|
2432
|
+
{
|
|
2433
|
+
"name": "hideable",
|
|
2434
|
+
"description": "Lets the column picker hide this column. A header cell only."
|
|
2435
|
+
},
|
|
2436
|
+
{
|
|
2437
|
+
"name": "overflow",
|
|
2438
|
+
"description": "How content wider than the column behaves.",
|
|
2439
|
+
"values": [
|
|
2440
|
+
{
|
|
2441
|
+
"name": "clamp"
|
|
2442
|
+
},
|
|
2443
|
+
{
|
|
2444
|
+
"name": "ellipsis"
|
|
2445
|
+
},
|
|
2446
|
+
{
|
|
2447
|
+
"name": "wrap"
|
|
2448
|
+
}
|
|
2449
|
+
]
|
|
2450
|
+
},
|
|
2451
|
+
{
|
|
2452
|
+
"name": "reorder-label",
|
|
2453
|
+
"description": "Accessible name of the drag grip."
|
|
2454
|
+
},
|
|
2455
|
+
{
|
|
2456
|
+
"name": "reorderable",
|
|
2457
|
+
"description": "Offers the drag grip. A header cell only."
|
|
2458
|
+
},
|
|
2459
|
+
{
|
|
2460
|
+
"name": "resizable",
|
|
2461
|
+
"description": "Offers the resize handle. A header cell only."
|
|
2462
|
+
},
|
|
2463
|
+
{
|
|
2464
|
+
"name": "sort-direction",
|
|
2465
|
+
"description": "Direction currently sorted by; empty when this column is not the active one."
|
|
2466
|
+
},
|
|
2467
|
+
{
|
|
2468
|
+
"name": "sortable",
|
|
2469
|
+
"description": "Offers the sort affordance. A header cell only."
|
|
2470
|
+
},
|
|
2471
|
+
{
|
|
2472
|
+
"name": "tooltip",
|
|
2473
|
+
"description": "Tooltip shown on hover. Only a cell that sets it pays for the tooltip component."
|
|
2474
|
+
},
|
|
2475
|
+
{
|
|
2476
|
+
"name": "width",
|
|
2477
|
+
"description": "Column width. Read off the header row when the table has no `columns`. Any CSS length."
|
|
2239
2478
|
}
|
|
2240
2479
|
],
|
|
2241
2480
|
"references": [
|
|
@@ -2246,82 +2485,134 @@
|
|
|
2246
2485
|
]
|
|
2247
2486
|
},
|
|
2248
2487
|
{
|
|
2249
|
-
"name": "xv-table-
|
|
2488
|
+
"name": "xv-table-row",
|
|
2250
2489
|
"description": {
|
|
2251
2490
|
"kind": "markdown",
|
|
2252
|
-
"value": ""
|
|
2491
|
+
"value": "One row of a table. Everything it needs is pushed down by `xv-table`, so it never reads the\r\ntable's attributes itself — the old row did that on `slotchange` only and went stale."
|
|
2253
2492
|
},
|
|
2254
2493
|
"attributes": [
|
|
2255
2494
|
{
|
|
2256
2495
|
"name": "disabled",
|
|
2257
|
-
"description": ""
|
|
2496
|
+
"description": "Blocks selection and expansion."
|
|
2258
2497
|
},
|
|
2259
2498
|
{
|
|
2260
|
-
"name": "
|
|
2261
|
-
"description": ""
|
|
2262
|
-
}
|
|
2263
|
-
],
|
|
2264
|
-
"references": [
|
|
2499
|
+
"name": "expand-label",
|
|
2500
|
+
"description": "Accessible name of the expand toggle. Set by the table."
|
|
2501
|
+
},
|
|
2265
2502
|
{
|
|
2266
|
-
"name": "
|
|
2267
|
-
"
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2503
|
+
"name": "expand-mode",
|
|
2504
|
+
"description": "Whether the row can be expanded. Set by the table.",
|
|
2505
|
+
"values": [
|
|
2506
|
+
{
|
|
2507
|
+
"name": "multiple"
|
|
2508
|
+
},
|
|
2509
|
+
{
|
|
2510
|
+
"name": "none"
|
|
2511
|
+
},
|
|
2512
|
+
{
|
|
2513
|
+
"name": "single"
|
|
2514
|
+
}
|
|
2515
|
+
]
|
|
2516
|
+
},
|
|
2278
2517
|
{
|
|
2279
|
-
"name": "
|
|
2280
|
-
"description": ""
|
|
2518
|
+
"name": "expandable",
|
|
2519
|
+
"description": "Whether this row has anything to expand. Set by the table."
|
|
2281
2520
|
},
|
|
2282
2521
|
{
|
|
2283
|
-
"name": "
|
|
2284
|
-
"description": ""
|
|
2522
|
+
"name": "expanded",
|
|
2523
|
+
"description": "Whether the row's expand panel is open."
|
|
2524
|
+
},
|
|
2525
|
+
{
|
|
2526
|
+
"name": "group",
|
|
2527
|
+
"description": "Renders the row as a subtotal or grouping row: no controls, accented background."
|
|
2528
|
+
},
|
|
2529
|
+
{
|
|
2530
|
+
"name": "has-panel",
|
|
2531
|
+
"description": "Whether the row carries `slot=\"expand\"` content. Set by the table."
|
|
2285
2532
|
},
|
|
2286
2533
|
{
|
|
2287
2534
|
"name": "header",
|
|
2288
|
-
"description": ""
|
|
2535
|
+
"description": "Marks the row as the table's header. Its cells supply the column labels."
|
|
2289
2536
|
},
|
|
2290
2537
|
{
|
|
2291
2538
|
"name": "hover",
|
|
2292
|
-
"description": ""
|
|
2539
|
+
"description": "Highlights the row on pointer hover. Set by the table."
|
|
2293
2540
|
},
|
|
2294
2541
|
{
|
|
2295
|
-
"name": "
|
|
2296
|
-
"description": ""
|
|
2542
|
+
"name": "parent",
|
|
2543
|
+
"description": "Value of the row this one belongs to. Child rows are siblings in the same grid, so they keep\r\nthe table's columns instead of living in a panel of their own."
|
|
2297
2544
|
},
|
|
2298
2545
|
{
|
|
2299
2546
|
"name": "partial",
|
|
2300
|
-
"description": ""
|
|
2547
|
+
"description": "Indeterminate state of the header row's select-all checkbox."
|
|
2301
2548
|
},
|
|
2302
2549
|
{
|
|
2303
|
-
"name": "
|
|
2304
|
-
"description": ""
|
|
2550
|
+
"name": "reorder-label",
|
|
2551
|
+
"description": "Accessible name of the drag grip. Set by the table."
|
|
2305
2552
|
},
|
|
2306
2553
|
{
|
|
2307
|
-
"name": "
|
|
2308
|
-
"description": ""
|
|
2554
|
+
"name": "row-reorder-handle",
|
|
2555
|
+
"description": "Whether the whole row drags, or only its grip. Set by the table.",
|
|
2556
|
+
"values": [
|
|
2557
|
+
{
|
|
2558
|
+
"name": "icon"
|
|
2559
|
+
},
|
|
2560
|
+
{
|
|
2561
|
+
"name": "row"
|
|
2562
|
+
}
|
|
2563
|
+
]
|
|
2309
2564
|
},
|
|
2310
2565
|
{
|
|
2311
|
-
"name": "
|
|
2312
|
-
"description": ""
|
|
2566
|
+
"name": "row-reorderable",
|
|
2567
|
+
"description": "Whether this row can be dragged into a new position. Set by the table."
|
|
2313
2568
|
},
|
|
2314
2569
|
{
|
|
2315
|
-
"name": "
|
|
2316
|
-
"description": ""
|
|
2570
|
+
"name": "selectable",
|
|
2571
|
+
"description": "Whether the row offers its selection control. A header with no rows under it has nothing to pick."
|
|
2572
|
+
},
|
|
2573
|
+
{
|
|
2574
|
+
"name": "selected",
|
|
2575
|
+
"description": "Whether the row is selected."
|
|
2576
|
+
},
|
|
2577
|
+
{
|
|
2578
|
+
"name": "selection-mode",
|
|
2579
|
+
"description": "Selection control rendered in the leading cell. Set by the table.",
|
|
2317
2580
|
"values": [
|
|
2318
2581
|
{
|
|
2319
|
-
"name": "
|
|
2582
|
+
"name": "multiple"
|
|
2583
|
+
},
|
|
2584
|
+
{
|
|
2585
|
+
"name": "none"
|
|
2586
|
+
},
|
|
2587
|
+
{
|
|
2588
|
+
"name": "single"
|
|
2589
|
+
}
|
|
2590
|
+
]
|
|
2591
|
+
},
|
|
2592
|
+
{
|
|
2593
|
+
"name": "size",
|
|
2594
|
+
"description": "Row height ladder. Set by the table.",
|
|
2595
|
+
"values": [
|
|
2596
|
+
{
|
|
2597
|
+
"name": "lg"
|
|
2598
|
+
},
|
|
2599
|
+
{
|
|
2600
|
+
"name": "md"
|
|
2601
|
+
},
|
|
2602
|
+
{
|
|
2603
|
+
"name": "sm"
|
|
2604
|
+
},
|
|
2605
|
+
{
|
|
2606
|
+
"name": "xl"
|
|
2320
2607
|
},
|
|
2321
2608
|
{
|
|
2322
|
-
"name": "
|
|
2609
|
+
"name": "xs"
|
|
2323
2610
|
}
|
|
2324
2611
|
]
|
|
2612
|
+
},
|
|
2613
|
+
{
|
|
2614
|
+
"name": "value",
|
|
2615
|
+
"description": "Identifies the row in selection and expansion payloads."
|
|
2325
2616
|
}
|
|
2326
2617
|
],
|
|
2327
2618
|
"references": [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{e as format}from"./p-
|
|
1
|
+
export{e as format}from"./p-DSFVdw3w.js";export{d as setTagTransformer,t as transformTag}from"./p-DJC3-dS3.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as n,h as i,F as a,H as t,a as o}from"./p-Bu8SrOeR.js";import{a as r}from"./p-DB4KqDJz.js";const s=class{constructor(i){e(this,i),this.openChange=n(this,"openChange",7),this.mobileSize=991,this.open=!1,this.menuItems=[],this.applicationContext="Xv",this.menuLoading=!1}handleClickOutside(e){this.open&&!this.el.contains(e.target)&&this.handleClose()}handleClose(){this.open=!1,this.activeItem=this.activeGroup=void 0,this.openChange.emit(this.open)}get isMobile(){return window.outerWidth<=this.mobileSize}setActiveItem(e){var n,i,a,t,o;this.activeItem=(null===(n=this.activeItem)||void 0===n?void 0:n.id)===(null==e?void 0:e.id)?void 0:e,this.isMobile&&1!==((null===(a=null===(i=this.activeItem)||void 0===i?void 0:i.groups)||void 0===a?void 0:a.length)||0)||this.setActiveGroup(null===(o=null===(t=this.activeItem)||void 0===t?void 0:t.groups)||void 0===o?void 0:o[0]),this.isMobile||(this.open=!!this.activeItem,!this.open&&this.handleClose())}setActiveGroup(e){var n;this.activeGroup=this.isMobile&&(null===(n=this.activeGroup)||void 0===n?void 0:n.id)===(null==e?void 0:e.id)?void 0:e}navActionClick(e){window.location.href=e.url}parseMenuData(e){if(!e)return null;if(Array.isArray(e))return e;try{const n=JSON.parse(e);return Array.isArray(n)?n:null}catch(e){return console.warn("xv-mega-menu-next: invalid menu-data JSON",e),null}}async fetchMenuData(){try{this.menuItems=await r.get("/api-fd/v1/home/menu",{awaitWl:!0,credentials:"include"}).then((({data:e,meta:n})=>(this.applicationContext=n.applicationContext,e||[])))}catch(e){console.error("fetchMenuData error",e),this.menuItems=[]}}onMenuDataChange(e){const n=this.parseMenuData(e);n&&(this.menuItems=n)}componentWillLoad(){const e=this.parseMenuData(this.menuData);e?this.menuItems=e:this.fetchMenuData()}render(){return i(t,{key:"ed607b8cd4c395fb89c2b925381a66476ee7fc66"},i("nav",{key:"df1bc505eea962a6dd450aff9ce94bdaf851bb60",class:{"xv-menu":!0,open:this.open}},this.menuLoading&&i("div",{key:"43d7eb0df82e01e7bc9dcf7d305b41e2e274206b",class:{"xv-menu-loader":!0,open:this.open}},i("xv-loader-v2",{key:"d1fe2d349bbb091ca9e1ad3b3042f751cd7bea8a"})),i("ul",{key:"7daed87d6a28ef57cf50c44d6b692818d898f24b",class:{menu:!0,open:this.open}},this.menuItems.map((e=>{var n,t;return i("li",{class:{"menu-item":!0,active:e.id===(null===(n=this.activeItem)||void 0===n?void 0:n.id)}},e.route?i("xv-link-v2",{variant:"ghost",href:e.route.route},i("p",{class:"menu-item-label"},null===(t=e.route)||void 0===t?void 0:t.label)):i(a,null,i("p",{class:"menu-item-label",onClick:()=>this.setActiveItem(e)},null==e?void 0:e.label),i("ul",{class:"menu-item-groups"},e.groups.map((n=>{var a;return i("li",{class:{group:!0,active:(null===(a=this.activeGroup)||void 0===a?void 0:a.id)===n.id}},n.label&&e.groups.length>1&&i("div",{class:"group-label",onClick:()=>this.setActiveGroup(n)},i("span",{class:"group-label-text"},n.label),i("span",{class:"group-label-icon"})),i("div",{class:"group-container"},i("div",{class:{"group-container-absolute":!0,noLabel:!(n.label&&e.groups.length>1)}},i("div",{class:"group-menus"},i("ul",{class:{"group-menus-categories":!0,inline:"inline"===n.layout}},n.categories.map((e=>i("li",{class:"category"},i("p",{class:"category-label"},e.label),i("ul",{class:"category-routes"},e.routes.map((e=>i("li",{class:"route"},i("xv-link-v2",{size:"lg",variant:"ghost",href:e.route||"#"},e.label),e.tag&&i("xv-tag-v2",{class:"route-tag",size:"sm",color:"#161616",bg:"#E0E0E0"},e.tag))))))))),i("ul",{class:"group-menus-actions"},n.actions.map((e=>i("li",{class:"action"},"link"===e.type&&i("xv-link-v2",{variant:"standalone",href:null==e?void 0:e.url},e.label,i("span",{class:"link-chevron",slot:"icon-right"},"→")),"button"===e.type&&i("xv-button-v2",{onClick:()=>this.navActionClick(e),block:!0,variant:"tertiary"},e.label)))))),(null==n?void 0:n.card)&&i("div",{class:"group-card"},i("xv-card-v2",{media:"Komsa"!==this.applicationContext?n.card.image:void 0,variant:this.isMobile?"horizontal":"vertical"},i("h5",{slot:"header",class:"group-card-title"},n.card.title),i("p",{slot:"body",class:"group-card-desc"},n.card.description),n.card.linkLabel&&i("xv-link-v2",{slot:"footer",variant:"standalone",href:n.card.linkUrl||"#"},n.card.linkLabel,i("span",{class:"link-chevron",slot:"icon-right"},"→")))))))})))))})),i("li",{key:"9644d518b2a427d1af5319f6d0dcd08b11a9c6c2",class:"menu--right"},i("slot",{key:"5200a528a6e5b5374815d7978ec09e87da55a3d7",name:"menu-right"})),this.open&&i("li",{key:"378f37f82e6b9ae4990e4bd7d197d1a1ce851b2e",class:"menu--backdrop",onClick:()=>this.handleClose()}))))}get el(){return o(this)}static get watchers(){return{menuData:[{onMenuDataChange:0}]}}};s.style=":host{--menu-group-width:244px;--menu-group-height:454px;--link-visited:var(--link-primary)}.xv-menu{background:inherit;position:relative;font-family:var(--ff-work-sans), sans-serif}@media (min-width: 992px){.xv-menu{min-height:55px}}.xv-menu-loader{position:absolute;top:0;left:0;width:100%;height:100%;z-index:4;background-color:rgba(255, 255, 255, 0.7);display:flex;align-items:center;justify-content:center}@media (max-width: 991px){.xv-menu-loader:not(.open){display:none}}@media (max-width: 991px){.xv-menu.open{padding-bottom:env(safe-area-inset-bottom);max-height:calc(100vh - 120px);overflow:auto;overscroll-behavior:contain}}.xv-menu_mobile{position:relative;display:none}@media (max-width: 991px){.xv-menu_mobile{display:inline-flex}}.xv-menu ul{margin:0;padding:0;list-style:none}.xv-menu .link-chevron{display:inline-block;margin-inline-start:var(--spacing-01)}.xv-menu .menu{overflow-x:auto;display:flex;justify-content:flex-start;column-gap:var(--spacing-08)}@media (max-width: 991px){.xv-menu .menu{flex-direction:column;display:none}}.xv-menu .menu--right{margin-left:auto;display:flex;align-items:center;align-self:center}@media (max-width: 991px){.xv-menu .menu--right{margin-left:unset;padding-block:var(--spacing-05)}}.xv-menu .menu--backdrop{z-index:-1;background-color:rgba(0, 0, 0, 0.3);position:fixed;top:0;left:0;width:100%;height:100%}@media (max-width: 991px){.xv-menu .menu.open{display:flex}}.xv-menu .menu-item:hover .menu-item-label{border-bottom-color:var(--interactive-02)}.xv-menu .menu-item.active .menu-item-groups{z-index:990;display:flex}.xv-menu .menu-item.active .menu-item-label{border-bottom-color:var(--interactive-02)}@media (max-width: 991px){.xv-menu .menu-item.active{border-bottom:1px solid #E1E4ED}}.xv-menu .menu-item-label{margin:0;padding-block:var(--spacing-05, 16px);color:inherit;font-size:16px;line-height:24px;font-family:var(--ff-body), sans-serif;font-weight:600;cursor:pointer;border-bottom:2px solid transparent;transition:250ms ease-in-out border-bottom-color;user-select:none;white-space:nowrap}@media (max-width: 991px){.xv-menu .menu-item-label{border-bottom:1px solid #E1E4ED}}.xv-menu .menu-item-groups{z-index:-1;position:absolute;left:0;top:100%;width:100%;background-color:var(--background, #fff);display:none;flex-direction:column;border:1px solid var(--border-subtle-01);row-gap:var(--spacing-05);padding-block:var(--spacing-08) var(--spacing-06);min-height:var(--menu-group-height);border-radius:0 0 8px 8px;overflow:hidden;color:var(--interactive-01, #273435)}@media (max-width: 991px){.xv-menu .menu-item-groups{min-height:unset;padding-block:unset;position:relative;row-gap:unset;border:none}}.xv-menu .menu .group{display:flex;align-items:flex-start}@media (max-width: 991px){.xv-menu .menu .group{flex-direction:column;align-items:stretch}}.xv-menu .menu .group-label{user-select:none;min-width:var(--menu-group-width);max-width:var(--menu-group-width);color:var(--text-primary, #333);font-size:16px;font-style:normal;font-weight:400;line-height:137.5%;display:flex;column-gap:var(--spacing-04);text-align:right;justify-content:flex-end;cursor:pointer}.xv-menu .menu .group-label-text{text-overflow:ellipsis;overflow:hidden}.xv-menu .menu .group-label-icon{width:8px;height:8px;border-bottom:2px solid currentColor;border-right:2px solid currentColor;transform:rotate(-45deg);transform-origin:bottom;align-self:center}@media (max-width: 991px){.xv-menu .menu .group-label{max-width:unset;min-width:unset;align-items:stretch;justify-content:flex-start;padding-block:var(--spacing-05)}}.xv-menu .menu .group-container{flex:1;display:none}.xv-menu .menu .group-container-absolute{position:absolute;top:0;right:0;width:calc(100% - (var(--menu-group-width) + var(--spacing-06) + var(--spacing-09) + var(--spacing-05)));min-height:calc(100% - (var(--spacing-08) + var(--spacing-06)));padding:var(--spacing-08) var(--spacing-06) var(--spacing-06) var(--spacing-09);display:flex;background-color:var(--layer-01, #F7F7F7)}@media (max-width: 991px){.xv-menu .menu .group-container-absolute{position:unset;flex-direction:column;width:100%;flex:1;padding:var(--spacing-06) 0;background-color:var(--background)}}.xv-menu .menu .group-container-absolute.noLabel{left:0;width:calc(100% - (var(--spacing-06) + var(--spacing-09)))}.xv-menu .menu .group.active .group-label{font-weight:600}@media (max-width: 991px){.xv-menu .menu .group.active .group-label-icon{transform-origin:center;transform:rotate(45deg)}}.xv-menu .menu .group.active .group-container{display:flex}.xv-menu .menu .group-menus{flex:1;display:flex;flex-direction:column;row-gap:var(--spacing-06)}.xv-menu .menu .group-menus-categories{display:flex;row-gap:var(--spacing-07);column-gap:var(--spacing-05);flex:1}@media (max-width: 991px){.xv-menu .menu .group-menus-categories{flex-direction:column;gap:var(--spacing-07)}}.xv-menu .menu .group-menus-categories.inline{flex-direction:column;flex-wrap:wrap;max-height:365px}@media (max-width: 991px){.xv-menu .menu .group-menus-categories.inline{max-height:unset}}.xv-menu .menu .group-menus-categories.inline .category{flex:none}.xv-menu .menu .group-menus-actions{display:flex;align-items:center;justify-content:flex-start;gap:var(--spacing-05)}@media (max-width: 991px){.xv-menu .menu .group-menus-actions{flex-direction:column;justify-content:stretch;align-items:stretch;text-align:center}}.xv-menu .menu .group-card{box-sizing:content-box;max-width:228px;min-width:200px;padding-left:var(--spacing-06);border-left:1px solid var(--border-subtle-01)}@media (min-width: 992px) and (max-width: 1199px){.xv-menu .menu .group-card{display:none}}@media (max-width: 991px){.xv-menu .menu .group-card{margin-block-start:var(--spacing-06);border-left:none;padding-left:0;max-width:unset;min-width:unset}}.xv-menu .menu .group-card .xv-card{box-shadow:none;background-color:var(--background, #fff)}@media (max-width: 991px){.xv-menu .menu .group-card .xv-card{width:unset}}.xv-menu .menu .group-card-title,.xv-menu .menu .group-card-desc{font-size:var(--fz-md, 14px);font-style:normal;line-height:18px;letter-spacing:0.16px}.xv-menu .menu .group-card .xv-link_standalone,.xv-menu .menu .group-card-title,.xv-menu .menu .group-card-desc{font-family:var(--ff-work-sans), sans-serif}.xv-menu .menu .group-card-title{color:var(--text-primary, #333);font-weight:600}.xv-menu .menu .group-card-desc{color:var(--text-secondary, #515151);font-weight:400;padding-top:var(--spacing-03);display:-webkit-box;-webkit-line-clamp:11;-webkit-box-orient:vertical;overflow:hidden}.xv-menu .menu .category{flex:1;display:flex;flex-direction:column;row-gap:var(--spacing-05)}@media (max-width: 991px){.xv-menu .menu .category{flex:0}.xv-menu .menu .category:not(:last-child){border-bottom:1px solid var(--border-subtle-01);padding-bottom:var(--spacing-04)}}.xv-menu .menu .category-label{margin:0;font-size:var(--fz-md, 14px);color:var(--text-secondary)}.xv-menu .menu .category-routes{display:flex;flex-direction:column;row-gap:var(--spacing-05)}.xv-menu .menu .route{display:inline-flex;align-items:center;column-gap:var(--spacing-03);position:relative;font-size:var(--fz-lg, 16px)}.xv-menu .menu .route .xv-link_ghost{font-family:var(--ff-work-sans), sans-serif}.xv-menu .menu .route .xv-link_ghost:hover{color:var(--link-primary)}@media (max-width: 991px){.xv-menu .menu .route{white-space:nowrap}}.xv-menu .menu .route .route-tag{font-size:9px}";export{s as xv_mega_menu_next}
|
|
1
|
+
import{r as e,c as n,h as i,F as a,H as t,a as o}from"./p-DJC3-dS3.js";import{a as r}from"./p-DSFVdw3w.js";const s=class{constructor(i){e(this,i),this.openChange=n(this,"openChange",7),this.mobileSize=991,this.open=!1,this.menuItems=[],this.applicationContext="Xv",this.menuLoading=!1}handleClickOutside(e){this.open&&!this.el.contains(e.target)&&this.handleClose()}handleClose(){this.open=!1,this.activeItem=this.activeGroup=void 0,this.openChange.emit(this.open)}get isMobile(){return window.outerWidth<=this.mobileSize}setActiveItem(e){var n,i,a,t,o;this.activeItem=(null===(n=this.activeItem)||void 0===n?void 0:n.id)===(null==e?void 0:e.id)?void 0:e,this.isMobile&&1!==((null===(a=null===(i=this.activeItem)||void 0===i?void 0:i.groups)||void 0===a?void 0:a.length)||0)||this.setActiveGroup(null===(o=null===(t=this.activeItem)||void 0===t?void 0:t.groups)||void 0===o?void 0:o[0]),this.isMobile||(this.open=!!this.activeItem,!this.open&&this.handleClose())}setActiveGroup(e){var n;this.activeGroup=this.isMobile&&(null===(n=this.activeGroup)||void 0===n?void 0:n.id)===(null==e?void 0:e.id)?void 0:e}navActionClick(e){window.location.href=e.url}parseMenuData(e){if(!e)return null;if(Array.isArray(e))return e;try{const n=JSON.parse(e);return Array.isArray(n)?n:null}catch(e){return console.warn("xv-mega-menu-next: invalid menu-data JSON",e),null}}async fetchMenuData(){try{this.menuItems=await r.get("/api-fd/v1/home/menu",{awaitWl:!0,credentials:"include"}).then((({data:e,meta:n})=>(this.applicationContext=n.applicationContext,e||[])))}catch(e){console.error("fetchMenuData error",e),this.menuItems=[]}}onMenuDataChange(e){const n=this.parseMenuData(e);n&&(this.menuItems=n)}componentWillLoad(){const e=this.parseMenuData(this.menuData);e?this.menuItems=e:this.fetchMenuData()}render(){return i(t,{key:"ed607b8cd4c395fb89c2b925381a66476ee7fc66"},i("nav",{key:"df1bc505eea962a6dd450aff9ce94bdaf851bb60",class:{"xv-menu":!0,open:this.open}},this.menuLoading&&i("div",{key:"43d7eb0df82e01e7bc9dcf7d305b41e2e274206b",class:{"xv-menu-loader":!0,open:this.open}},i("xv-loader-v2",{key:"d1fe2d349bbb091ca9e1ad3b3042f751cd7bea8a"})),i("ul",{key:"7daed87d6a28ef57cf50c44d6b692818d898f24b",class:{menu:!0,open:this.open}},this.menuItems.map((e=>{var n,t;return i("li",{class:{"menu-item":!0,active:e.id===(null===(n=this.activeItem)||void 0===n?void 0:n.id)}},e.route?i("xv-link-v2",{variant:"ghost",href:e.route.route},i("p",{class:"menu-item-label"},null===(t=e.route)||void 0===t?void 0:t.label)):i(a,null,i("p",{class:"menu-item-label",onClick:()=>this.setActiveItem(e)},null==e?void 0:e.label),i("ul",{class:"menu-item-groups"},e.groups.map((n=>{var a;return i("li",{class:{group:!0,active:(null===(a=this.activeGroup)||void 0===a?void 0:a.id)===n.id}},n.label&&e.groups.length>1&&i("div",{class:"group-label",onClick:()=>this.setActiveGroup(n)},i("span",{class:"group-label-text"},n.label),i("span",{class:"group-label-icon"})),i("div",{class:"group-container"},i("div",{class:{"group-container-absolute":!0,noLabel:!(n.label&&e.groups.length>1)}},i("div",{class:"group-menus"},i("ul",{class:{"group-menus-categories":!0,inline:"inline"===n.layout}},n.categories.map((e=>i("li",{class:"category"},i("p",{class:"category-label"},e.label),i("ul",{class:"category-routes"},e.routes.map((e=>i("li",{class:"route"},i("xv-link-v2",{size:"lg",variant:"ghost",href:e.route||"#"},e.label),e.tag&&i("xv-tag-v2",{class:"route-tag",size:"sm",color:"#161616",bg:"#E0E0E0"},e.tag))))))))),i("ul",{class:"group-menus-actions"},n.actions.map((e=>i("li",{class:"action"},"link"===e.type&&i("xv-link-v2",{variant:"standalone",href:null==e?void 0:e.url},e.label,i("span",{class:"link-chevron",slot:"icon-right"},"→")),"button"===e.type&&i("xv-button-v2",{onClick:()=>this.navActionClick(e),block:!0,variant:"tertiary"},e.label)))))),(null==n?void 0:n.card)&&i("div",{class:"group-card"},i("xv-card-v2",{media:"Komsa"!==this.applicationContext?n.card.image:void 0,variant:this.isMobile?"horizontal":"vertical"},i("h5",{slot:"header",class:"group-card-title"},n.card.title),i("p",{slot:"body",class:"group-card-desc"},n.card.description),n.card.linkLabel&&i("xv-link-v2",{slot:"footer",variant:"standalone",href:n.card.linkUrl||"#"},n.card.linkLabel,i("span",{class:"link-chevron",slot:"icon-right"},"→")))))))})))))})),i("li",{key:"9644d518b2a427d1af5319f6d0dcd08b11a9c6c2",class:"menu--right"},i("slot",{key:"5200a528a6e5b5374815d7978ec09e87da55a3d7",name:"menu-right"})),this.open&&i("li",{key:"378f37f82e6b9ae4990e4bd7d197d1a1ce851b2e",class:"menu--backdrop",onClick:()=>this.handleClose()}))))}get el(){return o(this)}static get watchers(){return{menuData:[{onMenuDataChange:0}]}}};s.style=":host{--menu-group-width:244px;--menu-group-height:454px;--link-visited:var(--link-primary)}.xv-menu{background:inherit;position:relative;font-family:var(--ff-work-sans), sans-serif}@media (min-width: 992px){.xv-menu{min-height:55px}}.xv-menu-loader{position:absolute;top:0;left:0;width:100%;height:100%;z-index:4;background-color:rgba(255, 255, 255, 0.7);display:flex;align-items:center;justify-content:center}@media (max-width: 991px){.xv-menu-loader:not(.open){display:none}}@media (max-width: 991px){.xv-menu.open{padding-bottom:env(safe-area-inset-bottom);max-height:calc(100vh - 120px);overflow:auto;overscroll-behavior:contain}}.xv-menu_mobile{position:relative;display:none}@media (max-width: 991px){.xv-menu_mobile{display:inline-flex}}.xv-menu ul{margin:0;padding:0;list-style:none}.xv-menu .link-chevron{display:inline-block;margin-inline-start:var(--spacing-01)}.xv-menu .menu{overflow-x:auto;display:flex;justify-content:flex-start;column-gap:var(--spacing-08)}@media (max-width: 991px){.xv-menu .menu{flex-direction:column;display:none}}.xv-menu .menu--right{margin-left:auto;display:flex;align-items:center;align-self:center}@media (max-width: 991px){.xv-menu .menu--right{margin-left:unset;padding-block:var(--spacing-05)}}.xv-menu .menu--backdrop{z-index:-1;background-color:rgba(0, 0, 0, 0.3);position:fixed;top:0;left:0;width:100%;height:100%}@media (max-width: 991px){.xv-menu .menu.open{display:flex}}.xv-menu .menu-item:hover .menu-item-label{border-bottom-color:var(--interactive-02)}.xv-menu .menu-item.active .menu-item-groups{z-index:990;display:flex}.xv-menu .menu-item.active .menu-item-label{border-bottom-color:var(--interactive-02)}@media (max-width: 991px){.xv-menu .menu-item.active{border-bottom:1px solid #E1E4ED}}.xv-menu .menu-item-label{margin:0;padding-block:var(--spacing-05, 16px);color:inherit;font-size:16px;line-height:24px;font-family:var(--ff-body), sans-serif;font-weight:600;cursor:pointer;border-bottom:2px solid transparent;transition:250ms ease-in-out border-bottom-color;user-select:none;white-space:nowrap}@media (max-width: 991px){.xv-menu .menu-item-label{border-bottom:1px solid #E1E4ED}}.xv-menu .menu-item-groups{z-index:-1;position:absolute;left:0;top:100%;width:100%;background-color:var(--background, #fff);display:none;flex-direction:column;border:1px solid var(--border-subtle-01);row-gap:var(--spacing-05);padding-block:var(--spacing-08) var(--spacing-06);min-height:var(--menu-group-height);border-radius:0 0 8px 8px;overflow:hidden;color:var(--interactive-01, #273435)}@media (max-width: 991px){.xv-menu .menu-item-groups{min-height:unset;padding-block:unset;position:relative;row-gap:unset;border:none}}.xv-menu .menu .group{display:flex;align-items:flex-start}@media (max-width: 991px){.xv-menu .menu .group{flex-direction:column;align-items:stretch}}.xv-menu .menu .group-label{user-select:none;min-width:var(--menu-group-width);max-width:var(--menu-group-width);color:var(--text-primary, #333);font-size:16px;font-style:normal;font-weight:400;line-height:137.5%;display:flex;column-gap:var(--spacing-04);text-align:right;justify-content:flex-end;cursor:pointer}.xv-menu .menu .group-label-text{text-overflow:ellipsis;overflow:hidden}.xv-menu .menu .group-label-icon{width:8px;height:8px;border-bottom:2px solid currentColor;border-right:2px solid currentColor;transform:rotate(-45deg);transform-origin:bottom;align-self:center}@media (max-width: 991px){.xv-menu .menu .group-label{max-width:unset;min-width:unset;align-items:stretch;justify-content:flex-start;padding-block:var(--spacing-05)}}.xv-menu .menu .group-container{flex:1;display:none}.xv-menu .menu .group-container-absolute{position:absolute;top:0;right:0;width:calc(100% - (var(--menu-group-width) + var(--spacing-06) + var(--spacing-09) + var(--spacing-05)));min-height:calc(100% - (var(--spacing-08) + var(--spacing-06)));padding:var(--spacing-08) var(--spacing-06) var(--spacing-06) var(--spacing-09);display:flex;background-color:var(--layer-01, #F7F7F7)}@media (max-width: 991px){.xv-menu .menu .group-container-absolute{position:unset;flex-direction:column;width:100%;flex:1;padding:var(--spacing-06) 0;background-color:var(--background)}}.xv-menu .menu .group-container-absolute.noLabel{left:0;width:calc(100% - (var(--spacing-06) + var(--spacing-09)))}.xv-menu .menu .group.active .group-label{font-weight:600}@media (max-width: 991px){.xv-menu .menu .group.active .group-label-icon{transform-origin:center;transform:rotate(45deg)}}.xv-menu .menu .group.active .group-container{display:flex}.xv-menu .menu .group-menus{flex:1;display:flex;flex-direction:column;row-gap:var(--spacing-06)}.xv-menu .menu .group-menus-categories{display:flex;row-gap:var(--spacing-07);column-gap:var(--spacing-05);flex:1}@media (max-width: 991px){.xv-menu .menu .group-menus-categories{flex-direction:column;gap:var(--spacing-07)}}.xv-menu .menu .group-menus-categories.inline{flex-direction:column;flex-wrap:wrap;max-height:365px}@media (max-width: 991px){.xv-menu .menu .group-menus-categories.inline{max-height:unset}}.xv-menu .menu .group-menus-categories.inline .category{flex:none}.xv-menu .menu .group-menus-actions{display:flex;align-items:center;justify-content:flex-start;gap:var(--spacing-05)}@media (max-width: 991px){.xv-menu .menu .group-menus-actions{flex-direction:column;justify-content:stretch;align-items:stretch;text-align:center}}.xv-menu .menu .group-card{box-sizing:content-box;max-width:228px;min-width:200px;padding-left:var(--spacing-06);border-left:1px solid var(--border-subtle-01)}@media (min-width: 992px) and (max-width: 1199px){.xv-menu .menu .group-card{display:none}}@media (max-width: 991px){.xv-menu .menu .group-card{margin-block-start:var(--spacing-06);border-left:none;padding-left:0;max-width:unset;min-width:unset}}.xv-menu .menu .group-card .xv-card{box-shadow:none;background-color:var(--background, #fff)}@media (max-width: 991px){.xv-menu .menu .group-card .xv-card{width:unset}}.xv-menu .menu .group-card-title,.xv-menu .menu .group-card-desc{font-size:var(--fz-md, 14px);font-style:normal;line-height:18px;letter-spacing:0.16px}.xv-menu .menu .group-card .xv-link_standalone,.xv-menu .menu .group-card-title,.xv-menu .menu .group-card-desc{font-family:var(--ff-work-sans), sans-serif}.xv-menu .menu .group-card-title{color:var(--text-primary, #333);font-weight:600}.xv-menu .menu .group-card-desc{color:var(--text-secondary, #515151);font-weight:400;padding-top:var(--spacing-03);display:-webkit-box;-webkit-line-clamp:11;-webkit-box-orient:vertical;overflow:hidden}.xv-menu .menu .category{flex:1;display:flex;flex-direction:column;row-gap:var(--spacing-05)}@media (max-width: 991px){.xv-menu .menu .category{flex:0}.xv-menu .menu .category:not(:last-child){border-bottom:1px solid var(--border-subtle-01);padding-bottom:var(--spacing-04)}}.xv-menu .menu .category-label{margin:0;font-size:var(--fz-md, 14px);color:var(--text-secondary)}.xv-menu .menu .category-routes{display:flex;flex-direction:column;row-gap:var(--spacing-05)}.xv-menu .menu .route{display:inline-flex;align-items:center;column-gap:var(--spacing-03);position:relative;font-size:var(--fz-lg, 16px)}.xv-menu .menu .route .xv-link_ghost{font-family:var(--ff-work-sans), sans-serif}.xv-menu .menu .route .xv-link_ghost:hover{color:var(--link-primary)}@media (max-width: 991px){.xv-menu .menu .route{white-space:nowrap}}.xv-menu .menu .route .route-tag{font-size:9px}";export{s as xv_mega_menu_next}
|