scb-wc 0.1.16 → 0.1.17
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 +22 -32
- package/all.js +0 -2
- package/blazor/ScbBlazorInteropBase.cs +5 -69
- package/blazor/scb-blazor-bridge.js +19 -168
- package/blazor/wrappers/ScbAppBar.razor +1 -1
- package/blazor/wrappers/ScbCalendar.razor +2 -5
- package/blazor/wrappers/ScbCalendarCard.razor +2 -18
- package/blazor/wrappers/ScbCookiesConsent.razor +4 -10
- package/blazor/wrappers/ScbNav.razor +2 -5
- package/blazor/wrappers/ScbNotificationCard.razor +2 -42
- package/index.js +90 -88
- package/mvc/components/all.js +0 -1
- package/mvc/components/scb-breadcrumb/scb-breadcrumb-item.js +4 -4
- package/mvc/components/scb-breadcrumb/scb-breadcrumb.js +1 -1
- package/mvc/components/scb-button/scb-button.js +13 -7
- package/mvc/components/scb-calendar/scb-calendar.js +10 -10
- package/mvc/components/scb-calendar-card/scb-calendar-card.js +36 -18
- package/mvc/components/scb-card/scb-card.js +209 -143
- package/mvc/components/scb-checkbox/scb-checkbox.js +11 -9
- package/mvc/components/scb-chevron/scb-chevron.js +12 -92
- package/mvc/components/scb-chip/scb-chip.js +44 -5
- package/mvc/components/scb-cookies-consent/scb-cookies-consent.js +11 -11
- package/mvc/components/scb-dialog/scb-dialog.js +8 -8
- package/mvc/components/scb-drawer/scb-drawer.js +6 -6
- package/mvc/components/scb-dropdown/scb-dropdown.js +7 -2
- package/mvc/components/scb-fact-card/scb-fact-card-content.js +27 -8
- package/mvc/components/scb-fact-card/scb-fact-card.js +13 -5
- package/mvc/components/scb-footer/scb-footer.js +33 -15
- package/mvc/components/scb-gallery-grid/scb-gallery-grid.js +3 -3
- package/mvc/components/scb-grid/scb-grid-item.js +2 -2
- package/mvc/components/scb-grid/scb-stack.js +2 -2
- package/mvc/components/scb-header/scb-header.js +6 -6
- package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +31 -14
- package/mvc/components/scb-nav/scb-nav.js +2 -2
- package/mvc/components/scb-notification-card/scb-notification-card.js +59 -35
- package/mvc/components/scb-progress-indicator/scb-progress-indicator.js +5 -5
- package/mvc/components/scb-progress-stepper/scb-progress-stepper.js +1 -1
- package/mvc/components/scb-radio-button/scb-radio-button.js +14 -13
- package/mvc/components/scb-scrollspy/scb-scrollspy.js +1 -1
- package/mvc/components/scb-segmented-button/scb-segmented-item.js +6 -6
- package/mvc/components/scb-select/scb-select.js +1 -1
- package/mvc/components/scb-table/scb-table.js +3 -3
- package/mvc/components/scb-table-advanced/scb-table-advanced.js +8 -8
- package/mvc/components/scb-tooltip/scb-tooltip.js +3 -3
- package/mvc/scb-blazor-bridge.js +19 -168
- package/package.json +3 -14
- package/profile-image-dummy.svg +16 -0
- package/scb-breadcrumb/scb-breadcrumb-item.js +6 -2
- package/scb-breadcrumb/scb-breadcrumb.js +4 -1
- package/scb-button/scb-button.js +19 -9
- package/scb-calendar/scb-calendar.js +23 -16
- package/scb-calendar-card/scb-calendar-card.js +89 -51
- package/scb-card/scb-card.js +350 -224
- package/scb-checkbox/scb-checkbox.js +9 -7
- package/scb-chevron/scb-chevron.js +14 -96
- package/scb-chip/scb-chip.js +56 -7
- package/scb-components/index.d.ts +0 -1
- package/scb-components/scb-breadcrumb/scb-breadcrumb-item.d.ts +1 -0
- package/scb-components/scb-button/scb-button.d.ts +2 -0
- package/scb-components/scb-calendar-card/scb-calendar-card.d.ts +3 -1
- package/scb-components/scb-card/scb-card.d.ts +31 -3
- package/scb-components/scb-chevron/scb-chevron.d.ts +1 -3
- package/scb-components/scb-chip/scb-chip.d.ts +2 -1
- package/scb-components/scb-dialog/scb-dialog.d.ts +2 -0
- package/scb-components/scb-fact-card/scb-fact-card-content.d.ts +7 -0
- package/scb-components/scb-fact-card/scb-fact-card.d.ts +4 -1
- package/scb-components/scb-keyfigure-card/scb-keyfigure-card.d.ts +3 -1
- package/scb-components/scb-notification-card/scb-notification-card.d.ts +9 -1
- package/scb-components/scb-segmented-button/scb-segmented-item.d.ts +3 -2
- package/scb-components/scb-select/scb-select.d.ts +1 -0
- package/scb-components/scb-table/scb-table.d.ts +2 -0
- package/scb-components/scb-table-advanced/scb-table-advanced.d.ts +2 -0
- package/scb-components/scb-tooltip/scb-tooltip.d.ts +2 -0
- package/scb-cookies-consent/scb-cookies-consent.js +42 -25
- package/scb-datepicker/scb-datepicker.js +1 -0
- package/scb-dialog/scb-dialog.js +43 -33
- package/scb-drawer/scb-drawer.js +30 -18
- package/scb-dropdown/scb-dropdown.js +7 -2
- package/scb-fact-card/scb-fact-card-content.js +55 -13
- package/scb-fact-card/scb-fact-card.js +50 -32
- package/scb-footer/scb-footer.js +43 -21
- package/scb-gallery-grid/scb-gallery-grid.js +13 -5
- package/scb-grid/scb-grid-item.js +19 -14
- package/scb-grid/scb-stack.js +18 -12
- package/scb-header/scb-header.js +13 -4
- package/scb-keyfigure-card/scb-keyfigure-card.js +53 -26
- package/scb-nav/scb-nav.js +18 -15
- package/scb-notification-card/scb-notification-card.js +110 -59
- package/scb-progress-indicator/scb-progress-indicator.js +15 -12
- package/scb-progress-stepper/scb-progress-stepper.js +1 -2
- package/scb-radio-button/scb-radio-button.js +9 -8
- package/scb-scrollspy/scb-scrollspy.js +2 -1
- package/scb-segmented-button/scb-segmented-item.js +6 -3
- package/scb-select/scb-select.js +5 -2
- package/scb-table/scb-table.js +17 -7
- package/scb-table-advanced/scb-table-advanced.js +19 -13
- package/scb-tooltip/scb-tooltip.js +21 -15
- package/scb-wc.bundle.js +1178 -1071
- package/scb-wc.d.ts +178 -174
- package/bin/scb-wc.mjs +0 -159
- package/mvc/components/scb-vignette/scb-vignette.js +0 -37
- package/scb-components/scb-vignette/scb-vignette.d.ts +0 -20
- package/scb-vignette/scb-vignette.js +0 -87
- package/scb-wc-public-entry/index.d.ts +0 -87
package/README.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
# Om SCB Web Components
|
|
1
|
+
# Om SCB Web Components Preview
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> ⚠️ **Previewkanal**
|
|
4
|
+
> Installera `scb-wc` via `@next` för komponenter under utveckling. API, utseende och beteende kan ändras eller tas bort mellan versioner.
|
|
5
|
+
|
|
6
|
+
SCB Web Components(test) finns för att underlätta skapandet av enhetliga, tillgängliga och användbara webbapplikationer.
|
|
4
7
|
|
|
5
8
|
Komponenterna bygger på:
|
|
6
9
|
- [Lit](https://lit.dev/)
|
|
@@ -8,45 +11,32 @@ Komponenterna bygger på:
|
|
|
8
11
|
|
|
9
12
|
## Storybook och dokumentation (internt)
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
Previewkomponenterna dokumenteras och demonstreras i Storybook på SCB:s interna testadress:
|
|
12
15
|
|
|
13
|
-
-
|
|
16
|
+
- Test: <https://webcomponentstest.scb.intra>
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
Den publika/stabila Storybooken finns på:
|
|
16
19
|
|
|
17
|
-
-
|
|
20
|
+
- Prod: <https://webcomponents.scb.intra>
|
|
18
21
|
|
|
19
22
|
---
|
|
20
23
|
|
|
21
24
|
## Kom igång
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
```sh
|
|
26
|
-
npx scb-wc init html my-app
|
|
27
|
-
npx scb-wc init react my-react-app
|
|
28
|
-
npx scb-wc init blazor my-blazor-app
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Det skapar en liten starterapp med:
|
|
32
|
-
- `scb-header`
|
|
33
|
-
- `scb-footer`
|
|
34
|
-
- `scb-grid`
|
|
35
|
-
- några vanliga komponenter
|
|
36
|
-
|
|
37
|
-
Välj sedan den starter som ligger närmast din app och kör `npm install` i den nya mappen.
|
|
26
|
+
> **Obs:** Kör alla kommandon i mappen där din `package.json` ligger.
|
|
27
|
+
> Har du ingen? Kör `npm init -y` i projektroten (eller annan lämplig mapp).
|
|
38
28
|
|
|
39
|
-
|
|
29
|
+
Installera previewkanalen:
|
|
40
30
|
|
|
41
31
|
```sh
|
|
42
|
-
npm install scb-wc
|
|
32
|
+
npm install scb-wc@next
|
|
43
33
|
```
|
|
44
34
|
|
|
45
35
|
---
|
|
46
36
|
|
|
47
37
|
## Alternativ 1: Använd som ES‑moduler (t.ex. i React, Vue, SPA)
|
|
48
38
|
|
|
49
|
-
Importera CSS och de
|
|
39
|
+
Importera CSS och de testkomponenter du använder (bäst för tree‑shaking):
|
|
50
40
|
|
|
51
41
|
```js
|
|
52
42
|
// Global CSS + tokens (måste bara importeras en gång)
|
|
@@ -82,7 +72,7 @@ Då används paketets egna fontfiler under `node_modules/scb-wc/fonts/`.
|
|
|
82
72
|
|
|
83
73
|
## Alternativ 2: Använd i MVC/MPA via `<script type="module">`
|
|
84
74
|
|
|
85
|
-
Det här läget använder den färdig‑
|
|
75
|
+
Det här läget använder den färdig‑splittade **MVC‑ESM**‑builden som följer med paketet under:
|
|
86
76
|
|
|
87
77
|
```text
|
|
88
78
|
node_modules/scb-wc/mvc/
|
|
@@ -95,7 +85,7 @@ Lägg till i din apps `package.json`:
|
|
|
95
85
|
```jsonc
|
|
96
86
|
{
|
|
97
87
|
"scripts": {
|
|
98
|
-
"ui:install": "node -e \"const fs=require('fs'),p=require('path');const src=p.resolve('node_modules/scb-wc/mvc');if(!fs.existsSync(src)){console.error('Hittar inte '+src+'. Har du kört npm install scb-wc?');process.exit(1);}const start=process.env.INIT_CWD||process.cwd();const ov=process.env.npm_config_ui_wwwroot;function findBase(){if(ov){return p.isAbsolute(ov)?ov:p.resolve(start,ov);}let d=start;while(true){const cand=p.join(d,'wwwroot');if(fs.existsSync(cand)) return cand;const up=p.dirname(d);if(up===d) return p.resolve(start,'wwwroot');d=up;}}const base=findBase();const dst=p.resolve(base,'ui');fs.rmSync(dst,{recursive:true,force:true});fs.mkdirSync(base,{recursive:true});fs.cpSync(src,dst,{recursive:true});console.log('Kopierade '+src+' → '+dst);\""
|
|
88
|
+
"ui:install": "node -e \"const fs=require('fs'),p=require('path');const src=p.resolve('node_modules/scb-wc/mvc');if(!fs.existsSync(src)){console.error('Hittar inte '+src+'. Har du kört npm install scb-wc@next?');process.exit(1);}const start=process.env.INIT_CWD||process.cwd();const ov=process.env.npm_config_ui_wwwroot;function findBase(){if(ov){return p.isAbsolute(ov)?ov:p.resolve(start,ov);}let d=start;while(true){const cand=p.join(d,'wwwroot');if(fs.existsSync(cand)) return cand;const up=p.dirname(d);if(up===d) return p.resolve(start,'wwwroot');d=up;}}const base=findBase();const dst=p.resolve(base,'ui');fs.rmSync(dst,{recursive:true,force:true});fs.mkdirSync(base,{recursive:true});fs.cpSync(src,dst,{recursive:true});console.log('Kopierade '+src+' → '+dst);\""
|
|
99
89
|
}
|
|
100
90
|
}
|
|
101
91
|
```
|
|
@@ -142,7 +132,7 @@ Behöver du en annan webbrotsökväg (t.ex. om din `wwwroot` ligger någon annan
|
|
|
142
132
|
|
|
143
133
|
## Alternativ 3: Bundlad version (IIFE) för äldre miljöer
|
|
144
134
|
|
|
145
|
-
Om ESM inte stöds kan du använda den bundlade varianten från paketroten.
|
|
135
|
+
Om ESM inte stöds kan du använda den bundlade test‑varianten från paketroten.
|
|
146
136
|
Flytta följande två filer från `node_modules/scb-wc` och använd dem i applikationen:
|
|
147
137
|
|
|
148
138
|
```text
|
|
@@ -164,7 +154,7 @@ node_modules/scb-wc/scb-wc.css
|
|
|
164
154
|
|
|
165
155
|
SCB Web Components fungerar även i Blazor‑appar när du vill använda samma komponenter i både MVC/MPA och Blazor.
|
|
166
156
|
|
|
167
|
-
Grundprincipen är
|
|
157
|
+
Grundprincipen är samma som för `scb-wc`:
|
|
168
158
|
|
|
169
159
|
1. Använd MVC‑ESM‑builden (`node_modules/scb-wc/mvc`) och kopiera den till `wwwroot/ui` med `ui:install`.
|
|
170
160
|
2. Ladda `scb-blazor-bridge.js` från `wwwroot/ui` i din Blazor‑layout.
|
|
@@ -177,8 +167,8 @@ Lägg till ett script som kopierar interop-filen från `node_modules` till ditt
|
|
|
177
167
|
```jsonc
|
|
178
168
|
{
|
|
179
169
|
"scripts": {
|
|
180
|
-
"ui:install": "node -e \"const fs=require('fs'),p=require('path');const src=p.resolve('node_modules/scb-wc/mvc');if(!fs.existsSync(src)){console.error('Hittar inte '+src+'. Har du kört npm install scb-wc?');process.exit(1);}const start=process.env.INIT_CWD||process.cwd();const ov=process.env.npm_config_ui_wwwroot;function findBase(){if(ov){return p.isAbsolute(ov)?ov:p.resolve(start,ov);}let d=start;while(true){const cand=p.join(d,'wwwroot');if(fs.existsSync(cand)) return cand;const up=p.dirname(d);if(up===d) return p.resolve(start,'wwwroot');d=up;}}const base=findBase();const dst=p.resolve(base,'ui');fs.rmSync(dst,{recursive:true,force:true});fs.mkdirSync(base,{recursive:true});fs.cpSync(src,dst,{recursive:true});console.log('Kopierade '+src+' → '+dst);\"",
|
|
181
|
-
"ui:blazor:interop": "node -e \"const fs=require('fs'),p=require('path');const start=process.env.INIT_CWD||process.cwd();const src=p.resolve('node_modules/scb-wc/blazor/ScbBlazorInteropBase.cs');if(!fs.existsSync(src)){console.error('Hittar inte '+src+'. Har du kört npm install scb-wc?');process.exit(1);}const dst=p.resolve(start,'ScbBlazor/ScbBlazorInteropBase.cs');fs.mkdirSync(p.dirname(dst),{recursive:true});fs.copyFileSync(src,dst);console.log('Kopierade '+src+' → '+dst);\""
|
|
170
|
+
"ui:install": "node -e \"const fs=require('fs'),p=require('path');const src=p.resolve('node_modules/scb-wc/mvc');if(!fs.existsSync(src)){console.error('Hittar inte '+src+'. Har du kört npm install scb-wc@next?');process.exit(1);}const start=process.env.INIT_CWD||process.cwd();const ov=process.env.npm_config_ui_wwwroot;function findBase(){if(ov){return p.isAbsolute(ov)?ov:p.resolve(start,ov);}let d=start;while(true){const cand=p.join(d,'wwwroot');if(fs.existsSync(cand)) return cand;const up=p.dirname(d);if(up===d) return p.resolve(start,'wwwroot');d=up;}}const base=findBase();const dst=p.resolve(base,'ui');fs.rmSync(dst,{recursive:true,force:true});fs.mkdirSync(base,{recursive:true});fs.cpSync(src,dst,{recursive:true});console.log('Kopierade '+src+' → '+dst);\"",
|
|
171
|
+
"ui:blazor:interop": "node -e \"const fs=require('fs'),p=require('path');const start=process.env.INIT_CWD||process.cwd();const src=p.resolve('node_modules/scb-wc/blazor/ScbBlazorInteropBase.cs');if(!fs.existsSync(src)){console.error('Hittar inte '+src+'. Har du kört npm install scb-wc@next?');process.exit(1);}const dst=p.resolve(start,'ScbBlazor/ScbBlazorInteropBase.cs');fs.mkdirSync(p.dirname(dst),{recursive:true});fs.copyFileSync(src,dst);console.log('Kopierade '+src+' → '+dst);\""
|
|
182
172
|
}
|
|
183
173
|
}
|
|
184
174
|
```
|
|
@@ -192,13 +182,13 @@ Exempel på layout:
|
|
|
192
182
|
<script type="module" src="~/ui/scb-blazor-bridge.js"></script>
|
|
193
183
|
```
|
|
194
184
|
|
|
195
|
-
`ScbBlazorInteropBase` kan
|
|
185
|
+
`ScbBlazorInteropBase` är samma bas‑klass i preview- och public-kanalen. Du kan därför dela samma C#‑fil mellan projekt som använder `scb-wc@next` och `scb-wc@latest`.
|
|
196
186
|
|
|
197
187
|
---
|
|
198
188
|
|
|
199
189
|
## Viktigt
|
|
200
190
|
|
|
201
|
-
- `scb-wc@
|
|
191
|
+
- `scb-wc@next` är **previewkanalen**. Komponenter kan ändras eller tas bort mellan versioner. Använd `scb-wc@latest` i externa produktionsmiljöer.
|
|
202
192
|
- **Kör kommandon i mappen med din `package.json`.** Placeringen av `package.json` styr standardmål för `ui:install` (rot → `wwwroot/ui`, `ClientApp/` → använd `--ui_wwwroot=../wwwroot`).
|
|
203
193
|
- **Blanda inte MVC‑ESM och IIFE på samma sida.** Välj en distributionsform per sida/app.
|
|
204
194
|
- **Blazor:** Se till att `scb-blazor-bridge.js` laddas efter att komponent‑JS:et finns på sidan, och att `ScbBlazorInteropBase` inte dupliceras i flera namespaces i samma lösning.
|
package/all.js
CHANGED
|
@@ -85,7 +85,6 @@ import './mvc/components/scb-textfield/scb-textfield.js';
|
|
|
85
85
|
import './mvc/components/scb-toc/scb-toc-item.js';
|
|
86
86
|
import './mvc/components/scb-toc/scb-toc.js';
|
|
87
87
|
import './mvc/components/scb-tooltip/scb-tooltip.js';
|
|
88
|
-
import './mvc/components/scb-vignette/scb-vignette.js';
|
|
89
88
|
import './mvc/components/scb-viz/scb-viz-actions-runtime.js';
|
|
90
89
|
import './mvc/components/scb-viz/scb-viz-print-runtime.js';
|
|
91
90
|
import './mvc/components/scb-viz/scb-viz-series-differentiation-registry.js';
|
|
@@ -183,7 +182,6 @@ import './scb-textfield/scb-textfield.js';
|
|
|
183
182
|
import './scb-toc/scb-toc-item.js';
|
|
184
183
|
import './scb-toc/scb-toc.js';
|
|
185
184
|
import './scb-tooltip/scb-tooltip.js';
|
|
186
|
-
import './scb-vignette/scb-vignette.js';
|
|
187
185
|
import './scb-viz/scb-viz-actions-runtime.js';
|
|
188
186
|
import './scb-viz/scb-viz-print-runtime.js';
|
|
189
187
|
import './scb-viz/scb-viz-series-differentiation-registry.js';
|
|
@@ -739,9 +739,6 @@ namespace ScbBlazor
|
|
|
739
739
|
Type = dto.Type ?? string.Empty,
|
|
740
740
|
Variant = dto.Variant ?? string.Empty,
|
|
741
741
|
Direction = dto.Direction ?? string.Empty,
|
|
742
|
-
Title = dto.Title ?? string.Empty,
|
|
743
|
-
Subtitle = dto.Subtitle ?? string.Empty,
|
|
744
|
-
SupportingText = dto.SupportingText ?? string.Empty,
|
|
745
742
|
CardHref = dto.CardHref ?? string.Empty,
|
|
746
743
|
|
|
747
744
|
MediaType = dto.MediaType ?? string.Empty,
|
|
@@ -848,9 +845,6 @@ namespace ScbBlazor
|
|
|
848
845
|
{
|
|
849
846
|
Id = dto.Id ?? string.Empty,
|
|
850
847
|
Variant = dto.Variant ?? string.Empty,
|
|
851
|
-
Title = dto.Title ?? string.Empty,
|
|
852
|
-
Subtitle = dto.Subtitle ?? string.Empty,
|
|
853
|
-
SupportingText = dto.SupportingText ?? string.Empty,
|
|
854
848
|
Icon = dto.Icon ?? string.Empty,
|
|
855
849
|
ShowCloseButton = dto.ShowCloseButton,
|
|
856
850
|
Open = dto.Open,
|
|
@@ -1052,9 +1046,6 @@ namespace ScbBlazor
|
|
|
1052
1046
|
if (state.Calendars is not null && state.Calendars.Length > 0)
|
|
1053
1047
|
{
|
|
1054
1048
|
var dto = state.Calendars[0];
|
|
1055
|
-
Calendar.Title = dto.Title ?? string.Empty;
|
|
1056
|
-
Calendar.Subtitle = dto.Subtitle ?? string.Empty;
|
|
1057
|
-
Calendar.SupportingText = dto.SupportingText ?? string.Empty;
|
|
1058
1049
|
Calendar.Variant = string.IsNullOrWhiteSpace(dto.Variant)
|
|
1059
1050
|
? "default"
|
|
1060
1051
|
: dto.Variant!;
|
|
@@ -1062,9 +1053,6 @@ namespace ScbBlazor
|
|
|
1062
1053
|
}
|
|
1063
1054
|
else if (state.Calendar is not null)
|
|
1064
1055
|
{
|
|
1065
|
-
Calendar.Title = state.Calendar.Title ?? string.Empty;
|
|
1066
|
-
Calendar.Subtitle = state.Calendar.Subtitle ?? string.Empty;
|
|
1067
|
-
Calendar.SupportingText = state.Calendar.SupportingText ?? string.Empty;
|
|
1068
1056
|
Calendar.Variant = string.IsNullOrWhiteSpace(state.Calendar.Variant)
|
|
1069
1057
|
? "default"
|
|
1070
1058
|
: state.Calendar.Variant!;
|
|
@@ -1072,9 +1060,6 @@ namespace ScbBlazor
|
|
|
1072
1060
|
}
|
|
1073
1061
|
else
|
|
1074
1062
|
{
|
|
1075
|
-
Calendar.Title = string.Empty;
|
|
1076
|
-
Calendar.Subtitle = string.Empty;
|
|
1077
|
-
Calendar.SupportingText = string.Empty;
|
|
1078
1063
|
Calendar.Variant = "default";
|
|
1079
1064
|
Calendar.ShowMedia = false;
|
|
1080
1065
|
}
|
|
@@ -1088,9 +1073,6 @@ namespace ScbBlazor
|
|
|
1088
1073
|
var dto = state.Calendars[i];
|
|
1089
1074
|
calendars[i] = new CalendarState
|
|
1090
1075
|
{
|
|
1091
|
-
Title = dto.Title ?? string.Empty,
|
|
1092
|
-
Subtitle = dto.Subtitle ?? string.Empty,
|
|
1093
|
-
SupportingText = dto.SupportingText ?? string.Empty,
|
|
1094
1076
|
Variant = string.IsNullOrWhiteSpace(dto.Variant)
|
|
1095
1077
|
? "default"
|
|
1096
1078
|
: dto.Variant!,
|
|
@@ -1184,17 +1166,11 @@ namespace ScbBlazor
|
|
|
1184
1166
|
notifications[i] = new NotificationState
|
|
1185
1167
|
{
|
|
1186
1168
|
Open = dto.Open,
|
|
1187
|
-
Variant = dto.Variant
|
|
1188
|
-
|
|
1189
|
-
Subtitle = dto.Subtitle ?? string.Empty,
|
|
1190
|
-
SupportingText = dto.SupportingText ?? string.Empty,
|
|
1191
|
-
LinkText = dto.LinkText ?? string.Empty,
|
|
1192
|
-
LinkHref = dto.LinkHref ?? string.Empty,
|
|
1169
|
+
Variant = dto.Variant ?? string.Empty,
|
|
1170
|
+
Size = dto.Size ?? string.Empty,
|
|
1193
1171
|
ShowIcon = dto.ShowIcon,
|
|
1194
1172
|
ShowCloseButton = dto.ShowCloseButton,
|
|
1195
|
-
|
|
1196
|
-
FullWidth = dto.FullWidth,
|
|
1197
|
-
Direction = dto.Direction ?? string.Empty
|
|
1173
|
+
Direction = dto.Direction ?? string.Empty
|
|
1198
1174
|
};
|
|
1199
1175
|
}
|
|
1200
1176
|
Notifications = notifications;
|
|
@@ -2587,16 +2563,6 @@ namespace ScbBlazor
|
|
|
2587
2563
|
}
|
|
2588
2564
|
|
|
2589
2565
|
// Calendar card: index-baserad och id-baserad variant
|
|
2590
|
-
public Task SetCalendarCardTitleAsync(int index, string title)
|
|
2591
|
-
{
|
|
2592
|
-
return JS.InvokeVoidAsync("SCBBlazor.setCalendarCardTitle", GetScbRootArg(), index, title ?? string.Empty).AsTask();
|
|
2593
|
-
}
|
|
2594
|
-
|
|
2595
|
-
public Task SetCalendarCardTitleByIdAsync(string id, string title)
|
|
2596
|
-
{
|
|
2597
|
-
return JS.InvokeVoidAsync("SCBBlazor.setCalendarCardTitleById", GetScbRootArg(), id ?? string.Empty, title ?? string.Empty).AsTask();
|
|
2598
|
-
}
|
|
2599
|
-
|
|
2600
2566
|
public Task SetCalendarCardShowMediaAsync(int index, bool showMedia)
|
|
2601
2567
|
{
|
|
2602
2568
|
return JS.InvokeVoidAsync("SCBBlazor.setCalendarCardShowMedia", GetScbRootArg(), index, showMedia).AsTask();
|
|
@@ -3008,9 +2974,6 @@ namespace ScbBlazor
|
|
|
3008
2974
|
public string Type { get; set; } = string.Empty;
|
|
3009
2975
|
public string Variant { get; set; } = string.Empty;
|
|
3010
2976
|
public string Direction { get; set; } = string.Empty;
|
|
3011
|
-
public string Title { get; set; } = string.Empty;
|
|
3012
|
-
public string Subtitle { get; set; } = string.Empty;
|
|
3013
|
-
public string SupportingText { get; set; } = string.Empty;
|
|
3014
2977
|
public string CardHref { get; set; } = string.Empty;
|
|
3015
2978
|
|
|
3016
2979
|
public string MediaType { get; set; } = string.Empty;
|
|
@@ -3076,9 +3039,6 @@ namespace ScbBlazor
|
|
|
3076
3039
|
{
|
|
3077
3040
|
public string Id { get; set; } = string.Empty;
|
|
3078
3041
|
public string Variant { get; set; } = string.Empty;
|
|
3079
|
-
public string Title { get; set; } = string.Empty;
|
|
3080
|
-
public string Subtitle { get; set; } = string.Empty;
|
|
3081
|
-
public string SupportingText { get; set; } = string.Empty;
|
|
3082
3042
|
public string Icon { get; set; } = string.Empty;
|
|
3083
3043
|
public bool ShowCloseButton { get; set; }
|
|
3084
3044
|
public bool Open { get; set; }
|
|
@@ -3191,9 +3151,6 @@ namespace ScbBlazor
|
|
|
3191
3151
|
|
|
3192
3152
|
protected sealed class CalendarState
|
|
3193
3153
|
{
|
|
3194
|
-
public string Title { get; set; } = string.Empty;
|
|
3195
|
-
public string Subtitle { get; set; } = string.Empty;
|
|
3196
|
-
public string SupportingText { get; set; } = string.Empty;
|
|
3197
3154
|
public string Variant { get; set; } = "default";
|
|
3198
3155
|
public bool ShowMedia { get; set; }
|
|
3199
3156
|
}
|
|
@@ -3219,15 +3176,9 @@ namespace ScbBlazor
|
|
|
3219
3176
|
{
|
|
3220
3177
|
public bool Open { get; set; }
|
|
3221
3178
|
public string Variant { get; set; } = string.Empty;
|
|
3222
|
-
public string
|
|
3223
|
-
public string Subtitle { get; set; } = string.Empty;
|
|
3224
|
-
public string SupportingText { get; set; } = string.Empty;
|
|
3225
|
-
public string LinkText { get; set; } = string.Empty;
|
|
3226
|
-
public string LinkHref { get; set; } = string.Empty;
|
|
3179
|
+
public string Size { get; set; } = string.Empty;
|
|
3227
3180
|
public bool ShowIcon { get; set; }
|
|
3228
3181
|
public bool ShowCloseButton { get; set; }
|
|
3229
|
-
public bool FullHeight { get; set; }
|
|
3230
|
-
public bool FullWidth { get; set; }
|
|
3231
3182
|
public string Direction { get; set; } = string.Empty;
|
|
3232
3183
|
}
|
|
3233
3184
|
|
|
@@ -3889,9 +3840,6 @@ namespace ScbBlazor
|
|
|
3889
3840
|
public string? Type { get; set; }
|
|
3890
3841
|
public string? Variant { get; set; }
|
|
3891
3842
|
public string? Direction { get; set; }
|
|
3892
|
-
public string? Title { get; set; }
|
|
3893
|
-
public string? Subtitle { get; set; }
|
|
3894
|
-
public string? SupportingText { get; set; }
|
|
3895
3843
|
public string? CardHref { get; set; }
|
|
3896
3844
|
|
|
3897
3845
|
public string? MediaType { get; set; }
|
|
@@ -3957,9 +3905,6 @@ namespace ScbBlazor
|
|
|
3957
3905
|
{
|
|
3958
3906
|
public string? Id { get; set; }
|
|
3959
3907
|
public string? Variant { get; set; }
|
|
3960
|
-
public string? Title { get; set; }
|
|
3961
|
-
public string? Subtitle { get; set; }
|
|
3962
|
-
public string? SupportingText { get; set; }
|
|
3963
3908
|
public string? Icon { get; set; }
|
|
3964
3909
|
public bool ShowCloseButton { get; set; }
|
|
3965
3910
|
public bool Open { get; set; }
|
|
@@ -4072,9 +4017,6 @@ namespace ScbBlazor
|
|
|
4072
4017
|
|
|
4073
4018
|
private sealed class CalendarDto
|
|
4074
4019
|
{
|
|
4075
|
-
public string? Title { get; set; }
|
|
4076
|
-
public string? Subtitle { get; set; }
|
|
4077
|
-
public string? SupportingText { get; set; }
|
|
4078
4020
|
public string? Variant { get; set; }
|
|
4079
4021
|
public bool ShowMedia { get; set; }
|
|
4080
4022
|
}
|
|
@@ -4101,15 +4043,9 @@ namespace ScbBlazor
|
|
|
4101
4043
|
{
|
|
4102
4044
|
public bool Open { get; set; }
|
|
4103
4045
|
public string? Variant { get; set; }
|
|
4104
|
-
public string?
|
|
4105
|
-
public string? Subtitle { get; set; }
|
|
4106
|
-
public string? SupportingText { get; set; }
|
|
4107
|
-
public string? LinkText { get; set; }
|
|
4108
|
-
public string? LinkHref { get; set; }
|
|
4046
|
+
public string? Size { get; set; }
|
|
4109
4047
|
public bool ShowIcon { get; set; }
|
|
4110
4048
|
public bool ShowCloseButton { get; set; }
|
|
4111
|
-
public bool FullHeight { get; set; }
|
|
4112
|
-
public bool FullWidth { get; set; }
|
|
4113
4049
|
public string? Direction { get; set; }
|
|
4114
4050
|
}
|
|
4115
4051
|
|
|
@@ -291,8 +291,6 @@ function mirrorHeaderSearch(el, ev) {
|
|
|
291
291
|
{ sel: 'scb-icon-button', from: 'toggle-changed', to: 'togglechange', prop: 'toggle' },
|
|
292
292
|
{ sel: 'scb-icon-button', from: 'icon-changed', to: 'iconchange', prop: 'icon' },
|
|
293
293
|
{ sel: 'scb-icon-button', from: 'disabled-changed', to: 'disabledchange', prop: 'disabled' },
|
|
294
|
-
{ sel: 'scb-calendar-card', from: 'title-changed', to: 'titlechange', prop: 'title' },
|
|
295
|
-
{ sel: 'scb-calendar-card', from: 'subtitle-changed', to: 'subtitlechange', prop: 'subtitle' },
|
|
296
294
|
{ sel: 'scb-calendar-card', from: 'show-media-changed', to: 'showmediachange', prop: 'showMedia' },
|
|
297
295
|
{ sel: 'scb-toc-item', from: 'expanded-changed', to: 'expandedchange', prop: 'expanded' },
|
|
298
296
|
// </auto-generated blazor-source-rules>
|
|
@@ -535,9 +533,6 @@ function mirrorHeaderSearch(el, ev) {
|
|
|
535
533
|
},
|
|
536
534
|
},
|
|
537
535
|
|
|
538
|
-
// scb-fact-card-content
|
|
539
|
-
// scb-fact-card-content använder attribut (title/subtitle/supporting-text) och saknar egna change-events
|
|
540
|
-
|
|
541
536
|
// scb-options-menu
|
|
542
537
|
{
|
|
543
538
|
sel: 'scb-options-menu',
|
|
@@ -1015,30 +1010,6 @@ function mirrorHeaderSearch(el, ev) {
|
|
|
1015
1010
|
open: typeof el.open === 'boolean' ? el.open : el.hasAttribute('open'),
|
|
1016
1011
|
}),
|
|
1017
1012
|
},
|
|
1018
|
-
{
|
|
1019
|
-
sel: 'scb-fact-card',
|
|
1020
|
-
attr: 'title',
|
|
1021
|
-
to: 'titlechange',
|
|
1022
|
-
detail: (el) => ({
|
|
1023
|
-
title: (el.title ?? el.getAttribute('title') ?? '').toString(),
|
|
1024
|
-
}),
|
|
1025
|
-
},
|
|
1026
|
-
{
|
|
1027
|
-
sel: 'scb-fact-card',
|
|
1028
|
-
attr: 'subtitle',
|
|
1029
|
-
to: 'subtitlechange',
|
|
1030
|
-
detail: (el) => ({
|
|
1031
|
-
subtitle: (el.subtitle ?? el.getAttribute('subtitle') ?? '').toString(),
|
|
1032
|
-
}),
|
|
1033
|
-
},
|
|
1034
|
-
{
|
|
1035
|
-
sel: 'scb-fact-card',
|
|
1036
|
-
attr: 'supporting-text',
|
|
1037
|
-
to: 'supportingtextchange',
|
|
1038
|
-
detail: (el) => ({
|
|
1039
|
-
supportingText: (el.supportingText ?? el.getAttribute('supporting-text') ?? '').toString(),
|
|
1040
|
-
}),
|
|
1041
|
-
},
|
|
1042
1013
|
{
|
|
1043
1014
|
sel: 'scb-fact-card',
|
|
1044
1015
|
attr: 'variant',
|
|
@@ -1063,30 +1034,6 @@ function mirrorHeaderSearch(el, ev) {
|
|
|
1063
1034
|
showCloseButton: typeof el.showCloseButton === 'boolean' ? el.showCloseButton : el.hasAttribute('show-close-button'),
|
|
1064
1035
|
}),
|
|
1065
1036
|
},
|
|
1066
|
-
{
|
|
1067
|
-
sel: 'scb-fact-card-content',
|
|
1068
|
-
attr: 'title',
|
|
1069
|
-
to: 'titlechange',
|
|
1070
|
-
detail: (el) => ({
|
|
1071
|
-
title: (el.title ?? el.getAttribute('title') ?? '').toString(),
|
|
1072
|
-
}),
|
|
1073
|
-
},
|
|
1074
|
-
{
|
|
1075
|
-
sel: 'scb-fact-card-content',
|
|
1076
|
-
attr: 'subtitle',
|
|
1077
|
-
to: 'subtitlechange',
|
|
1078
|
-
detail: (el) => ({
|
|
1079
|
-
subtitle: (el.subtitle ?? el.getAttribute('subtitle') ?? '').toString(),
|
|
1080
|
-
}),
|
|
1081
|
-
},
|
|
1082
|
-
{
|
|
1083
|
-
sel: 'scb-fact-card-content',
|
|
1084
|
-
attr: 'supporting-text',
|
|
1085
|
-
to: 'supportingtextchange',
|
|
1086
|
-
detail: (el) => ({
|
|
1087
|
-
supportingText: (el.supportingText ?? el.getAttribute('supporting-text') ?? '').toString(),
|
|
1088
|
-
}),
|
|
1089
|
-
},
|
|
1090
1037
|
{
|
|
1091
1038
|
sel: 'scb-progress-indicator',
|
|
1092
1039
|
attr: 'type',
|
|
@@ -1351,30 +1298,6 @@ function mirrorHeaderSearch(el, ev) {
|
|
|
1351
1298
|
disabled: typeof el.disabled === 'boolean' ? el.disabled : el.hasAttribute('disabled'),
|
|
1352
1299
|
}),
|
|
1353
1300
|
},
|
|
1354
|
-
{
|
|
1355
|
-
sel: 'scb-calendar-card',
|
|
1356
|
-
attr: 'title',
|
|
1357
|
-
to: 'titlechange',
|
|
1358
|
-
detail: (el) => ({
|
|
1359
|
-
title: (el.title ?? el.getAttribute('title') ?? '').toString(),
|
|
1360
|
-
}),
|
|
1361
|
-
},
|
|
1362
|
-
{
|
|
1363
|
-
sel: 'scb-calendar-card',
|
|
1364
|
-
attr: 'subtitle',
|
|
1365
|
-
to: 'subtitlechange',
|
|
1366
|
-
detail: (el) => ({
|
|
1367
|
-
subtitle: (el.subtitle ?? el.getAttribute('subtitle') ?? '').toString(),
|
|
1368
|
-
}),
|
|
1369
|
-
},
|
|
1370
|
-
{
|
|
1371
|
-
sel: 'scb-calendar-card',
|
|
1372
|
-
attr: 'supporting-text',
|
|
1373
|
-
to: 'supportingtextchange',
|
|
1374
|
-
detail: (el) => ({
|
|
1375
|
-
supportingText: (el.supportingText ?? el.getAttribute('supporting-text') ?? '').toString(),
|
|
1376
|
-
}),
|
|
1377
|
-
},
|
|
1378
1301
|
{
|
|
1379
1302
|
sel: 'scb-calendar-card',
|
|
1380
1303
|
attr: 'variant',
|
|
@@ -1399,22 +1322,6 @@ function mirrorHeaderSearch(el, ev) {
|
|
|
1399
1322
|
keyfigure: (el.keyfigure ?? el.getAttribute('keyfigure') ?? '').toString(),
|
|
1400
1323
|
}),
|
|
1401
1324
|
},
|
|
1402
|
-
{
|
|
1403
|
-
sel: 'scb-keyfigure-card',
|
|
1404
|
-
attr: 'subtitle',
|
|
1405
|
-
to: 'subtitlechange',
|
|
1406
|
-
detail: (el) => ({
|
|
1407
|
-
subtitle: (el.subtitle ?? el.getAttribute('subtitle') ?? '').toString(),
|
|
1408
|
-
}),
|
|
1409
|
-
},
|
|
1410
|
-
{
|
|
1411
|
-
sel: 'scb-keyfigure-card',
|
|
1412
|
-
attr: 'supporting-text',
|
|
1413
|
-
to: 'supportingtextchange',
|
|
1414
|
-
detail: (el) => ({
|
|
1415
|
-
supportingText: (el.supportingText ?? el.getAttribute('supporting-text') ?? '').toString(),
|
|
1416
|
-
}),
|
|
1417
|
-
},
|
|
1418
1325
|
{
|
|
1419
1326
|
sel: 'scb-keyfigure-card',
|
|
1420
1327
|
attr: 'card-href',
|
|
@@ -1892,17 +1799,6 @@ function mirrorHeaderSearch(el, ev) {
|
|
|
1892
1799
|
attr: 'show-close-button',
|
|
1893
1800
|
to: 'showclosebuttonchange',
|
|
1894
1801
|
},
|
|
1895
|
-
{
|
|
1896
|
-
sel: 'scb-notification-card',
|
|
1897
|
-
attr: 'full-height',
|
|
1898
|
-
to: 'fullheightchange',
|
|
1899
|
-
},
|
|
1900
|
-
{
|
|
1901
|
-
sel: 'scb-notification-card',
|
|
1902
|
-
attr: 'full-width',
|
|
1903
|
-
to: 'fullwidthchange',
|
|
1904
|
-
},
|
|
1905
|
-
|
|
1906
1802
|
{ sel: 'scb-table-advanced', attr: 'with-pagination', to: 'tableadvancedchange' },
|
|
1907
1803
|
{ sel: 'scb-table-advanced', attr: 'with-filtering-search', to: 'tableadvancedchange' },
|
|
1908
1804
|
{ sel: 'scb-table-advanced', attr: 'no-scroll', to: 'tableadvancedchange' },
|
|
@@ -2124,7 +2020,7 @@ window.SCBBlazor.getState = function (root) {
|
|
|
2124
2020
|
const breadcrumbItemsState = Array.from(breadcrumbItems).map((item) => {
|
|
2125
2021
|
const anyItem = item;
|
|
2126
2022
|
const label = (
|
|
2127
|
-
anyItem.label ?? item.getAttribute('label') ?? ''
|
|
2023
|
+
anyItem.label ?? item.getAttribute('label') ?? item.textContent?.trim() ?? ''
|
|
2128
2024
|
).toString();
|
|
2129
2025
|
|
|
2130
2026
|
const href = (
|
|
@@ -2201,7 +2097,7 @@ window.SCBBlazor.getState = function (root) {
|
|
|
2201
2097
|
|
|
2202
2098
|
// App bar, läser direkt från attributen
|
|
2203
2099
|
const appBarState = {
|
|
2204
|
-
title: appBar ? appBar.getAttribute('title') || '' : '',
|
|
2100
|
+
title: appBar ? appBar.getAttribute('app-bar-title') || appBar.getAttribute('title') || '' : '',
|
|
2205
2101
|
type: appBar ? appBar.getAttribute('type') || '' : '',
|
|
2206
2102
|
position: appBar ? appBar.getAttribute('position') || '' : '',
|
|
2207
2103
|
searchSupportingText: appBar
|
|
@@ -2259,9 +2155,6 @@ window.SCBBlazor.getState = function (root) {
|
|
|
2259
2155
|
|
|
2260
2156
|
// Alla scb-calendar-card på sidan
|
|
2261
2157
|
const calendarsState = Array.from(calendars).map((c) => ({
|
|
2262
|
-
title: c.getAttribute('title') || '',
|
|
2263
|
-
subtitle: c.getAttribute('subtitle') || '',
|
|
2264
|
-
supportingText: c.getAttribute('supporting-text') || '',
|
|
2265
2158
|
variant: c.getAttribute('variant') || '',
|
|
2266
2159
|
showMedia: c.hasAttribute('show-media'),
|
|
2267
2160
|
}));
|
|
@@ -2271,9 +2164,6 @@ window.SCBBlazor.getState = function (root) {
|
|
|
2271
2164
|
calendarsState.length > 0
|
|
2272
2165
|
? calendarsState[0]
|
|
2273
2166
|
: {
|
|
2274
|
-
title: '',
|
|
2275
|
-
subtitle: '',
|
|
2276
|
-
supportingText: '',
|
|
2277
2167
|
variant: '',
|
|
2278
2168
|
showMedia: false,
|
|
2279
2169
|
};
|
|
@@ -2482,9 +2372,6 @@ window.SCBBlazor.getState = function (root) {
|
|
|
2482
2372
|
|
|
2483
2373
|
const id = (fc.getAttribute('id') ?? '').toString();
|
|
2484
2374
|
const variant = (anyFc.variant ?? fc.getAttribute('variant') ?? '').toString();
|
|
2485
|
-
const title = (anyFc.title ?? fc.getAttribute('title') ?? '').toString();
|
|
2486
|
-
const subtitle = (anyFc.subtitle ?? fc.getAttribute('subtitle') ?? '').toString();
|
|
2487
|
-
const supportingText = (anyFc.supportingText ?? fc.getAttribute('supporting-text') ?? '').toString();
|
|
2488
2375
|
const icon = (anyFc.icon ?? fc.getAttribute('icon') ?? '').toString();
|
|
2489
2376
|
|
|
2490
2377
|
const showCloseButton =
|
|
@@ -2502,9 +2389,6 @@ window.SCBBlazor.getState = function (root) {
|
|
|
2502
2389
|
return {
|
|
2503
2390
|
id,
|
|
2504
2391
|
variant,
|
|
2505
|
-
title,
|
|
2506
|
-
subtitle,
|
|
2507
|
-
supportingText,
|
|
2508
2392
|
icon,
|
|
2509
2393
|
showCloseButton: !!showCloseButton,
|
|
2510
2394
|
open: !!open,
|
|
@@ -2715,11 +2599,16 @@ window.SCBBlazor.getState = function (root) {
|
|
|
2715
2599
|
};
|
|
2716
2600
|
});
|
|
2717
2601
|
|
|
2718
|
-
|
|
2602
|
+
const getSlottedText = (element, slotName) => Array.from(element.querySelectorAll(`[slot="${slotName}"]`))
|
|
2603
|
+
.map((item) => item.textContent?.trim() ?? '')
|
|
2604
|
+
.filter(Boolean)
|
|
2605
|
+
.join(' ');
|
|
2606
|
+
|
|
2607
|
+
// Alla scb-keyfigure-card på sidan
|
|
2719
2608
|
const keyfiguresState = Array.from(keyfigures).map((card) => ({
|
|
2720
2609
|
keyfigure: card.getAttribute('keyfigure') || '',
|
|
2721
|
-
subtitle: card
|
|
2722
|
-
supportingText: card
|
|
2610
|
+
subtitle: getSlottedText(card, 'subtitle'),
|
|
2611
|
+
supportingText: getSlottedText(card, 'supporting-text'),
|
|
2723
2612
|
cardHref: card.getAttribute('card-href') || '',
|
|
2724
2613
|
icon: card.getAttribute('icon') || '',
|
|
2725
2614
|
size: card.getAttribute('size') || '',
|
|
@@ -2975,15 +2864,9 @@ window.SCBBlazor.getState = function (root) {
|
|
|
2975
2864
|
const notificationsState = Array.from(notifications).map((card) => ({
|
|
2976
2865
|
open: card.hasAttribute('open'),
|
|
2977
2866
|
variant: card.getAttribute('variant') || '',
|
|
2978
|
-
|
|
2979
|
-
subtitle: card.getAttribute('subtitle') || '',
|
|
2980
|
-
supportingText: card.getAttribute('supporting-text') || '',
|
|
2981
|
-
linkText: card.getAttribute('link-text') || '',
|
|
2982
|
-
linkHref: card.getAttribute('link-href') || '',
|
|
2867
|
+
size: card.getAttribute('size') || '',
|
|
2983
2868
|
showIcon: card.hasAttribute('show-icon'),
|
|
2984
2869
|
showCloseButton: card.hasAttribute('show-close-button'),
|
|
2985
|
-
fullHeight: card.hasAttribute('full-height'),
|
|
2986
|
-
fullWidth: card.hasAttribute('full-width'),
|
|
2987
2870
|
direction: card.getAttribute('direction') || '',
|
|
2988
2871
|
}));
|
|
2989
2872
|
|
|
@@ -4815,10 +4698,16 @@ window.SCBBlazor.getState = function (root) {
|
|
|
4815
4698
|
if (!appBar) return;
|
|
4816
4699
|
const value = title == null ? '' : String(title);
|
|
4817
4700
|
try {
|
|
4701
|
+
appBar.appBarTitle = value;
|
|
4818
4702
|
appBar.title = value;
|
|
4819
4703
|
} catch (_) {}
|
|
4820
|
-
if (value)
|
|
4821
|
-
|
|
4704
|
+
if (value) {
|
|
4705
|
+
appBar.setAttribute('app-bar-title', value);
|
|
4706
|
+
appBar.setAttribute('title', value);
|
|
4707
|
+
} else {
|
|
4708
|
+
appBar.removeAttribute('app-bar-title');
|
|
4709
|
+
appBar.removeAttribute('title');
|
|
4710
|
+
}
|
|
4822
4711
|
dispatchChange(appBar, 'titlechange', { title: value });
|
|
4823
4712
|
};
|
|
4824
4713
|
|
|
@@ -6398,44 +6287,6 @@ window.SCBBlazor.getState = function (root) {
|
|
|
6398
6287
|
|
|
6399
6288
|
// Calendar card
|
|
6400
6289
|
|
|
6401
|
-
api.setCalendarCardTitle = function (index, title) {
|
|
6402
|
-
const __scbHasRoot = arguments.length === 3;
|
|
6403
|
-
const __scbCtx = (window.SCBBlazor && window.SCBBlazor.__resolveRoot ? window.SCBBlazor.__resolveRoot(__scbHasRoot ? arguments[0] : null) : window.document) || window.document;
|
|
6404
|
-
const document = __scbCtx;
|
|
6405
|
-
if (__scbHasRoot) {
|
|
6406
|
-
index = arguments[1];
|
|
6407
|
-
title = arguments[2];
|
|
6408
|
-
}
|
|
6409
|
-
const card = getByIndex(document, 'scb-calendar-card', index);
|
|
6410
|
-
if (!card) return;
|
|
6411
|
-
const value = title == null ? '' : String(title);
|
|
6412
|
-
try {
|
|
6413
|
-
card.title = value;
|
|
6414
|
-
} catch (_) {}
|
|
6415
|
-
if (value) card.setAttribute('title', value);
|
|
6416
|
-
else card.removeAttribute('title');
|
|
6417
|
-
dispatchChange(card, 'titlechange', { title: value });
|
|
6418
|
-
};
|
|
6419
|
-
|
|
6420
|
-
api.setCalendarCardTitleById = function (id, title) {
|
|
6421
|
-
const __scbHasRoot = arguments.length === 3;
|
|
6422
|
-
const __scbCtx = (window.SCBBlazor && window.SCBBlazor.__resolveRoot ? window.SCBBlazor.__resolveRoot(__scbHasRoot ? arguments[0] : null) : window.document) || window.document;
|
|
6423
|
-
const document = __scbCtx;
|
|
6424
|
-
if (__scbHasRoot) {
|
|
6425
|
-
id = arguments[1];
|
|
6426
|
-
title = arguments[2];
|
|
6427
|
-
}
|
|
6428
|
-
const card = getById(document, id, 'scb-calendar-card');
|
|
6429
|
-
if (!card) return;
|
|
6430
|
-
const value = title == null ? '' : String(title);
|
|
6431
|
-
try {
|
|
6432
|
-
card.title = value;
|
|
6433
|
-
} catch (_) {}
|
|
6434
|
-
if (value) card.setAttribute('title', value);
|
|
6435
|
-
else card.removeAttribute('title');
|
|
6436
|
-
dispatchChange(card, 'titlechange', { title: value });
|
|
6437
|
-
};
|
|
6438
|
-
|
|
6439
6290
|
api.setCalendarCardShowMedia = function (index, showMedia) {
|
|
6440
6291
|
const __scbHasRoot = arguments.length === 3;
|
|
6441
6292
|
const __scbCtx = (window.SCBBlazor && window.SCBBlazor.__resolveRoot ? window.SCBBlazor.__resolveRoot(__scbHasRoot ? arguments[0] : null) : window.document) || window.document;
|