fds-vue-core 8.12.2 → 8.13.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/dist/components/IconRescue/IconRescueIcon.vue.d.ts +3 -1
- package/dist/components/IconRescue/iconGame.d.ts +55 -5
- package/dist/components/IconRescue/iconTargets.d.ts +1 -12
- package/dist/components/IconRescue/types.d.ts +2 -2
- package/dist/composables/useCancellationRuleText.d.ts +4 -0
- package/dist/fds-vue-core.cjs.js +127 -42
- package/dist/fds-vue-core.cjs.js.map +1 -1
- package/dist/fds-vue-core.css +1 -1
- package/dist/fds-vue-core.es.js +124 -43
- package/dist/fds-vue-core.es.js.map +1 -1
- package/dist/helpers/cancellationRule.d.ts +22 -0
- package/dist/index.d.ts +4 -1
- package/dist/plugin/useFdsI18n.d.ts +2 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/components/IconRescue/IconRescue.stories.ts +175 -22
- package/src/components/IconRescue/IconRescueIcon.vue +623 -176
- package/src/components/IconRescue/iconGame.ts +67 -18
- package/src/components/IconRescue/iconTargets.ts +1 -20
- package/src/components/IconRescue/types.ts +2 -2
- package/src/composables/useCancellationRuleText.ts +14 -0
- package/src/helpers/cancellationRule.spec.ts +70 -0
- package/src/helpers/cancellationRule.ts +77 -0
- package/src/index.ts +13 -0
- package/src/lang/en.json +32 -20
- package/src/lang/sv.json +32 -20
- package/src/plugin/useFdsI18n.ts +1 -1
|
@@ -17,6 +17,7 @@ declare const __VLS_export: import('vue').DefineComponent<IconRescueIconProps, {
|
|
|
17
17
|
gameOver: () => any;
|
|
18
18
|
experience: (amount: number) => any;
|
|
19
19
|
crate: (reward: "laserBeam" | "homingLaser" | "weaponUpgrade") => any;
|
|
20
|
+
health: (current: number) => any;
|
|
20
21
|
}, string, import('vue').PublicProps, Readonly<IconRescueIconProps> & Readonly<{
|
|
21
22
|
onSplit?: ((point: {
|
|
22
23
|
x: number;
|
|
@@ -31,6 +32,7 @@ declare const __VLS_export: import('vue').DefineComponent<IconRescueIconProps, {
|
|
|
31
32
|
onGameOver?: (() => any) | undefined;
|
|
32
33
|
onExperience?: ((amount: number) => any) | undefined;
|
|
33
34
|
onCrate?: ((reward: "laserBeam" | "homingLaser" | "weaponUpgrade") => any) | undefined;
|
|
35
|
+
onHealth?: ((current: number) => any) | undefined;
|
|
34
36
|
}>, {
|
|
35
37
|
size: string | number;
|
|
36
38
|
title: string;
|
|
@@ -39,7 +41,7 @@ declare const __VLS_export: import('vue').DefineComponent<IconRescueIconProps, {
|
|
|
39
41
|
laser: boolean;
|
|
40
42
|
flying: boolean;
|
|
41
43
|
boss: boolean;
|
|
42
|
-
enemyKind:
|
|
44
|
+
enemyKind: import('./iconGame').EnemyKind;
|
|
43
45
|
spawnPoint: {
|
|
44
46
|
x: number;
|
|
45
47
|
y: number;
|
|
@@ -3,7 +3,8 @@ export type WeaponLevels = Partial<Record<WeaponId, number>>;
|
|
|
3
3
|
export type DamageType = 'laser' | 'rocket' | 'fire' | 'ice' | 'shock' | 'crash';
|
|
4
4
|
export type StatusEffect = 'burning' | 'frozen' | 'stunned';
|
|
5
5
|
export type SynergyId = 'napalm' | 'superconductor' | 'steamBlast' | 'plasmaLaser';
|
|
6
|
-
export type
|
|
6
|
+
export type EnemyKind = 'kamikaze' | 'splitter' | 'sniper' | 'swarm' | 'shotgun' | 'teleporter' | 'bomber' | 'dasher' | 'shielded' | 'healer' | 'hive';
|
|
7
|
+
export type BossAttack = 'ring' | 'spiral' | 'summon' | 'charge' | 'fan' | 'snipe' | 'mines' | 'cross';
|
|
7
8
|
export declare const allBossAttacks: BossAttack[];
|
|
8
9
|
export interface PlayerStats {
|
|
9
10
|
damageMultiplier: number;
|
|
@@ -11,7 +12,7 @@ export interface PlayerStats {
|
|
|
11
12
|
speedMultiplier: number;
|
|
12
13
|
cooldownMultiplier: number;
|
|
13
14
|
criticalHitChance: number;
|
|
14
|
-
|
|
15
|
+
pierceChance: number;
|
|
15
16
|
}
|
|
16
17
|
export declare const defaultPlayerStats: PlayerStats;
|
|
17
18
|
export declare const iconRescueHosts: string[];
|
|
@@ -24,6 +25,9 @@ export declare const gameBalance: {
|
|
|
24
25
|
damage: number;
|
|
25
26
|
damagePerLevel: number;
|
|
26
27
|
chargedMultiplier: number;
|
|
28
|
+
maxLevel: number;
|
|
29
|
+
fireCooldown: number;
|
|
30
|
+
fireCooldownPerLevel: number;
|
|
27
31
|
};
|
|
28
32
|
homingLasers: {
|
|
29
33
|
maxCount: number;
|
|
@@ -88,6 +92,8 @@ export declare const gameBalance: {
|
|
|
88
92
|
scale: number;
|
|
89
93
|
exponent: number;
|
|
90
94
|
};
|
|
95
|
+
maxEnemiesPerWave: number;
|
|
96
|
+
swarmSize: number;
|
|
91
97
|
bossHealthMultiplier: number;
|
|
92
98
|
finalBossHealthMultiplier: number;
|
|
93
99
|
enemyFireRateGrowth: number;
|
|
@@ -98,12 +104,49 @@ export declare const gameBalance: {
|
|
|
98
104
|
splitter: number;
|
|
99
105
|
sniper: number;
|
|
100
106
|
swarm: number;
|
|
107
|
+
shotgun: number;
|
|
108
|
+
teleporter: number;
|
|
109
|
+
bomber: number;
|
|
110
|
+
dasher: number;
|
|
111
|
+
shielded: number;
|
|
112
|
+
healer: number;
|
|
113
|
+
hive: number;
|
|
101
114
|
boss: number;
|
|
102
115
|
};
|
|
116
|
+
sniperShot: {
|
|
117
|
+
pixelsPerSecond: number;
|
|
118
|
+
damage: number;
|
|
119
|
+
};
|
|
120
|
+
teleporter: {
|
|
121
|
+
minimumWait: number;
|
|
122
|
+
randomWait: number;
|
|
123
|
+
shotDelay: number;
|
|
124
|
+
};
|
|
125
|
+
mines: {
|
|
126
|
+
lifetime: number;
|
|
127
|
+
radius: number;
|
|
128
|
+
dropInterval: number;
|
|
129
|
+
};
|
|
130
|
+
dasher: {
|
|
131
|
+
cooldown: number;
|
|
132
|
+
warningTime: number;
|
|
133
|
+
chargeDuration: number;
|
|
134
|
+
chargePixelsPerSecond: number;
|
|
135
|
+
};
|
|
136
|
+
shielded: {
|
|
137
|
+
shieldTime: number;
|
|
138
|
+
openTime: number;
|
|
139
|
+
};
|
|
140
|
+
healer: {
|
|
141
|
+
interval: number;
|
|
142
|
+
range: number;
|
|
143
|
+
healShare: number;
|
|
144
|
+
};
|
|
145
|
+
hive: {
|
|
146
|
+
summonInterval: number;
|
|
147
|
+
};
|
|
103
148
|
experienceForFirstLevel: number;
|
|
104
149
|
experiencePerLevel: number;
|
|
105
|
-
gemMagnetPixelsPerSecond: number;
|
|
106
|
-
maxGemsOnScreen: number;
|
|
107
150
|
bossAttacks: {
|
|
108
151
|
cooldown: number;
|
|
109
152
|
rageHealthShare: number;
|
|
@@ -115,6 +158,13 @@ export declare const gameBalance: {
|
|
|
115
158
|
chargeDuration: number;
|
|
116
159
|
chargePixelsPerSecond: number;
|
|
117
160
|
summonCount: number;
|
|
161
|
+
namedBossAttackCount: number;
|
|
162
|
+
volleyInterval: number;
|
|
163
|
+
fanVolleys: number;
|
|
164
|
+
fanProjectiles: number;
|
|
165
|
+
snipeShots: number;
|
|
166
|
+
mineCount: number;
|
|
167
|
+
crossVolleys: number;
|
|
118
168
|
};
|
|
119
169
|
upgrades: {
|
|
120
170
|
power: {
|
|
@@ -137,7 +187,7 @@ export declare const gameBalance: {
|
|
|
137
187
|
amount: number;
|
|
138
188
|
maxPicks: number;
|
|
139
189
|
};
|
|
140
|
-
|
|
190
|
+
piercing: {
|
|
141
191
|
amount: number;
|
|
142
192
|
maxPicks: number;
|
|
143
193
|
};
|
|
@@ -9,18 +9,7 @@ export interface IconTarget {
|
|
|
9
9
|
};
|
|
10
10
|
applyStatus?: (effect: StatusEffect, duration: number) => void;
|
|
11
11
|
hasStatus?: (effect: StatusEffect) => boolean;
|
|
12
|
-
|
|
13
|
-
export interface ExperienceGem {
|
|
14
|
-
id: number;
|
|
15
|
-
x: number;
|
|
16
|
-
y: number;
|
|
17
|
-
value: number;
|
|
18
|
-
isMagnetized: boolean;
|
|
12
|
+
heal?: (share: number) => void;
|
|
19
13
|
}
|
|
20
14
|
export declare const enemyIconTargets: Set<IconTarget>;
|
|
21
15
|
export declare const playerIconTargets: Set<IconTarget>;
|
|
22
|
-
export declare const experienceGems: import('vue').ShallowRef<ExperienceGem[], ExperienceGem[]>;
|
|
23
|
-
export declare function dropExperienceGem(point: {
|
|
24
|
-
x: number;
|
|
25
|
-
y: number;
|
|
26
|
-
}, value: number, maxGems: number): void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FdsIconProps } from '../FdsIcon/types';
|
|
2
|
-
import { BossAttack, PlayerStats, WeaponLevels } from './iconGame';
|
|
2
|
+
import { BossAttack, EnemyKind, PlayerStats, WeaponLevels } from './iconGame';
|
|
3
3
|
export interface IconRescueIconProps extends FdsIconProps {
|
|
4
4
|
laser?: boolean;
|
|
5
5
|
flying?: boolean;
|
|
6
6
|
boss?: boolean;
|
|
7
|
-
enemyKind?:
|
|
7
|
+
enemyKind?: EnemyKind;
|
|
8
8
|
spawnPoint?: {
|
|
9
9
|
x: number;
|
|
10
10
|
y: number;
|
package/dist/fds-vue-core.cjs.js
CHANGED
|
@@ -61,9 +61,6 @@ var en_exports = /* @__PURE__ */ __exportAll({ default: () => en_default });
|
|
|
61
61
|
var en_default = {
|
|
62
62
|
"App.treeViewTest": "FDS Tree View Test",
|
|
63
63
|
"common.plus": "+",
|
|
64
|
-
"FdsBlockAlert.close": "Close",
|
|
65
|
-
"FdsBlockAlert.showLess": "Show less",
|
|
66
|
-
"FdsBlockAlert.showMore": "Show more",
|
|
67
64
|
"FdsBankId.cancel": "Cancel sign in",
|
|
68
65
|
"FdsBankId.logoAlt": "BankID",
|
|
69
66
|
"FdsBankId.otherDevice": "Use BankID on another device",
|
|
@@ -117,22 +114,32 @@ var en_default = {
|
|
|
117
114
|
"FdsBankId.rfa9.title": "Enter your security code in the BankID app",
|
|
118
115
|
"FdsBankId.timeout.body": "Try again.",
|
|
119
116
|
"FdsBankId.timeout.title": "Login timed out",
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
117
|
+
"FdsBlockAlert.close": "Close",
|
|
118
|
+
"FdsBlockAlert.showLess": "Show less",
|
|
119
|
+
"FdsBlockAlert.showMore": "Show more",
|
|
120
|
+
"FdsCancellationRule.always": "any time",
|
|
121
|
+
"FdsCancellationRule.alwaysLong": "Cancellations can be made at any time before the appointment.",
|
|
122
|
+
"FdsCancellationRule.days.one": "one day",
|
|
123
|
+
"FdsCancellationRule.days.other": "{count} days",
|
|
124
|
+
"FdsCancellationRule.holidaysIncluded": "(weekends and public holidays included)",
|
|
125
|
+
"FdsCancellationRule.hours.one": "1 hour {holidays}",
|
|
126
|
+
"FdsCancellationRule.hours.other": "{count} hours {holidays}",
|
|
127
|
+
"FdsCancellationRule.long": "Cancellations must be made no later than {rule} before the appointment.",
|
|
128
|
+
"FdsCancellationRule.time": "{time} {days} {holidays}",
|
|
129
|
+
"FdsCancellationRule.timeSameDay": "{time} the same day",
|
|
127
130
|
"FdsDevMode.baseBreakpoint": "base",
|
|
128
131
|
"FdsDevMode.baseBreakpointRange": "<320px",
|
|
129
|
-
"FdsDevMode.toggle.off": "Dev mode: OFF",
|
|
130
|
-
"FdsDevMode.toggle.on": "Dev mode: ON",
|
|
131
132
|
"FdsDevMode.overlay.close": "Close dev overlay",
|
|
132
133
|
"FdsDevMode.overlay.localeEn": "English",
|
|
133
134
|
"FdsDevMode.overlay.localeSv": "Svenska",
|
|
134
135
|
"FdsDevMode.overlay.open": "Open dev overlay",
|
|
135
136
|
"FdsDevMode.overlay.poeditor": "Show translation keys",
|
|
137
|
+
"FdsDevMode.overlay.quickSettings": "Quick settings",
|
|
138
|
+
"FdsDevMode.overlay.toggles.apiError": "API error",
|
|
139
|
+
"FdsDevMode.overlay.toggles.confirmation": "Bookings",
|
|
140
|
+
"FdsDevMode.overlay.toggles.debugLogging": "Debug logging",
|
|
141
|
+
"FdsDevMode.toggle.off": "Dev mode: OFF",
|
|
142
|
+
"FdsDevMode.toggle.on": "Dev mode: ON",
|
|
136
143
|
"FdsDevModeStorage.actions.close": "Close",
|
|
137
144
|
"FdsDevModeStorage.actions.delete": "Delete",
|
|
138
145
|
"FdsDevModeStorage.actions.emptyState": "No custom actions configured. Pass customActions prop to FdsDevMode.",
|
|
@@ -143,6 +150,8 @@ var en_default = {
|
|
|
143
150
|
"FdsDevModeStorage.empty.sessionStorage": "No values in sessionStorage.",
|
|
144
151
|
"FdsDevModeStorage.keyLabel": "Key",
|
|
145
152
|
"FdsDevModeStorage.nameLabel": "Name",
|
|
153
|
+
"FdsDevModeStorage.placeholder.body": "(Empty tab - reserved for future DevMode tools)",
|
|
154
|
+
"FdsDevModeStorage.placeholder.heading": "Placeholder",
|
|
146
155
|
"FdsDevModeStorage.placeholders.cookieName": "cookie-name",
|
|
147
156
|
"FdsDevModeStorage.placeholders.localStorageKey": "localStorage-key",
|
|
148
157
|
"FdsDevModeStorage.placeholders.sessionStorageKey": "sessionStorage-key",
|
|
@@ -152,6 +161,7 @@ var en_default = {
|
|
|
152
161
|
"FdsDevModeStorage.tabs.localStorage": "localStorage",
|
|
153
162
|
"FdsDevModeStorage.tabs.sessionStorage": "sessionStorage",
|
|
154
163
|
"FdsDevModeStorage.valueLabel": "Value",
|
|
164
|
+
"FdsDrawer.closeDrawer": "Close drawer",
|
|
155
165
|
"FdsInput.clearInput": "Delete text",
|
|
156
166
|
"FdsInput.hidePassword": "Hide",
|
|
157
167
|
"FdsInput.openDatePicker": "Open date picker",
|
|
@@ -159,7 +169,13 @@ var en_default = {
|
|
|
159
169
|
"FdsInput.today": "(today)",
|
|
160
170
|
"FdsListHeading.loading": "Loading...",
|
|
161
171
|
"FdsListHeading.separator": "of",
|
|
162
|
-
"
|
|
172
|
+
"FdsLoginEmail.emailInvalid": "Enter a valid email address",
|
|
173
|
+
"FdsLoginEmail.emailLabel": "Email address",
|
|
174
|
+
"FdsLoginEmail.emailRequired": "Enter email address",
|
|
175
|
+
"FdsLoginEmail.passwordLabel": "Password",
|
|
176
|
+
"FdsLoginEmail.passwordRequired": "Enter password",
|
|
177
|
+
"FdsLoginEmail.submit": "Sign in",
|
|
178
|
+
"FdsLoginEmail.submitting": "Signing in...",
|
|
163
179
|
"FdsModal.closeModal": "Close modal window",
|
|
164
180
|
"FdsPagination.currentPage": "Current page",
|
|
165
181
|
"FdsPagination.firstPage": "Go to first page",
|
|
@@ -171,11 +187,11 @@ var en_default = {
|
|
|
171
187
|
"FdsPhonenumber.invalidPhone": "Enter a valid phone number",
|
|
172
188
|
"FdsPhonenumber.noCountryResults": "No country matches your search",
|
|
173
189
|
"FdsPhonenumber.phoneNumber": "Phone number",
|
|
174
|
-
"FdsSsn.invalidSsn": "Enter a valid Swedish personal identity number or coordination number",
|
|
175
|
-
"FdsSsn.label": "Personal identity number",
|
|
176
190
|
"FdsSearchSelectPro.loadingMore": "Loading more...",
|
|
177
191
|
"FdsSearchSelectPro.showMore": "Show more",
|
|
178
192
|
"FdsSearchSelectPro.unspecified": "Unspecified",
|
|
193
|
+
"FdsSsn.invalidSsn": "Enter a valid Swedish personal identity number or coordination number",
|
|
194
|
+
"FdsSsn.label": "Personal identity number",
|
|
179
195
|
"FdsTextarea.characters": "characters",
|
|
180
196
|
"FdsTreeView.childrenCountPrefix": "(+",
|
|
181
197
|
"FdsTreeView.closePopover": "Close",
|
|
@@ -185,11 +201,7 @@ var en_default = {
|
|
|
185
201
|
"FdsWeekCalendar.nextWeek": "Next week",
|
|
186
202
|
"FdsWeekCalendar.previousWeek": "Previous week",
|
|
187
203
|
"FdsWeekCalendar.today": "Today",
|
|
188
|
-
"FdsWeekCalendar.week": "week"
|
|
189
|
-
"FdsDevMode.overlay.toggles.apiError": "API error",
|
|
190
|
-
"FdsDevMode.overlay.toggles.confirmation": "Bookings",
|
|
191
|
-
"FdsDevMode.overlay.toggles.debugLogging": "Debug logging",
|
|
192
|
-
"FdsDevMode.overlay.quickSettings": "Quick settings"
|
|
204
|
+
"FdsWeekCalendar.week": "week"
|
|
193
205
|
};
|
|
194
206
|
//#endregion
|
|
195
207
|
//#region src/lang/sv.json
|
|
@@ -197,9 +209,6 @@ var sv_exports = /* @__PURE__ */ __exportAll({ default: () => sv_default });
|
|
|
197
209
|
var sv_default = {
|
|
198
210
|
"App.treeViewTest": "FDS Tree View Test",
|
|
199
211
|
"common.plus": "+",
|
|
200
|
-
"FdsBlockAlert.close": "Stäng",
|
|
201
|
-
"FdsBlockAlert.showLess": "Visa mindre",
|
|
202
|
-
"FdsBlockAlert.showMore": "Visa mer",
|
|
203
212
|
"FdsBankId.cancel": "Avbryt inloggning",
|
|
204
213
|
"FdsBankId.logoAlt": "BankID",
|
|
205
214
|
"FdsBankId.otherDevice": "Använd BankID på annan enhet",
|
|
@@ -253,22 +262,32 @@ var sv_default = {
|
|
|
253
262
|
"FdsBankId.rfa9.title": "Skriv in din säkerhetskod i BankID-appen",
|
|
254
263
|
"FdsBankId.timeout.body": "Försök igen.",
|
|
255
264
|
"FdsBankId.timeout.title": "Inloggningen tog för lång tid",
|
|
256
|
-
"
|
|
257
|
-
"
|
|
258
|
-
"
|
|
259
|
-
"
|
|
260
|
-
"
|
|
261
|
-
"
|
|
262
|
-
"
|
|
265
|
+
"FdsBlockAlert.close": "Stäng",
|
|
266
|
+
"FdsBlockAlert.showLess": "Visa mindre",
|
|
267
|
+
"FdsBlockAlert.showMore": "Visa mer",
|
|
268
|
+
"FdsCancellationRule.always": "när som helst",
|
|
269
|
+
"FdsCancellationRule.alwaysLong": "Återbud kan lämnas när som helst före bokad tid.",
|
|
270
|
+
"FdsCancellationRule.days.one": "en dag",
|
|
271
|
+
"FdsCancellationRule.days.other": "{count} dagar",
|
|
272
|
+
"FdsCancellationRule.holidaysIncluded": "(helger och röda dagar inräknade)",
|
|
273
|
+
"FdsCancellationRule.hours.one": "1 timme {holidays}",
|
|
274
|
+
"FdsCancellationRule.hours.other": "{count} timmar {holidays}",
|
|
275
|
+
"FdsCancellationRule.long": "Återbud lämnas senast {rule} före bokad tid.",
|
|
276
|
+
"FdsCancellationRule.time": "kl. {time} {days} {holidays}",
|
|
277
|
+
"FdsCancellationRule.timeSameDay": "kl. {time} samma dag",
|
|
263
278
|
"FdsDevMode.baseBreakpoint": "base",
|
|
264
279
|
"FdsDevMode.baseBreakpointRange": "<320px",
|
|
265
|
-
"FdsDevMode.toggle.off": "Dev mode: OFF",
|
|
266
|
-
"FdsDevMode.toggle.on": "Dev mode: ON",
|
|
267
280
|
"FdsDevMode.overlay.close": "Stäng dev-overlay",
|
|
268
281
|
"FdsDevMode.overlay.localeEn": "English",
|
|
269
282
|
"FdsDevMode.overlay.localeSv": "Svenska",
|
|
270
283
|
"FdsDevMode.overlay.open": "Öppna dev-overlay",
|
|
271
284
|
"FdsDevMode.overlay.poeditor": "Visa översättningsnycklar",
|
|
285
|
+
"FdsDevMode.overlay.quickSettings": "Snabbval",
|
|
286
|
+
"FdsDevMode.overlay.toggles.apiError": "API-fel",
|
|
287
|
+
"FdsDevMode.overlay.toggles.confirmation": "Bokningar",
|
|
288
|
+
"FdsDevMode.overlay.toggles.debugLogging": "Debug-logg",
|
|
289
|
+
"FdsDevMode.toggle.off": "Dev mode: OFF",
|
|
290
|
+
"FdsDevMode.toggle.on": "Dev mode: ON",
|
|
272
291
|
"FdsDevModeStorage.actions.close": "Stäng",
|
|
273
292
|
"FdsDevModeStorage.actions.delete": "Ta bort",
|
|
274
293
|
"FdsDevModeStorage.actions.emptyState": "No custom actions configured. Pass customActions prop to FdsDevMode.",
|
|
@@ -279,6 +298,8 @@ var sv_default = {
|
|
|
279
298
|
"FdsDevModeStorage.empty.sessionStorage": "Inga värden i sessionStorage.",
|
|
280
299
|
"FdsDevModeStorage.keyLabel": "Nyckel",
|
|
281
300
|
"FdsDevModeStorage.nameLabel": "Namn",
|
|
301
|
+
"FdsDevModeStorage.placeholder.body": "(Tom flik - reserverad för framtida DevMode-verktyg)",
|
|
302
|
+
"FdsDevModeStorage.placeholder.heading": "Placeholder",
|
|
282
303
|
"FdsDevModeStorage.placeholders.cookieName": "cookie-namn",
|
|
283
304
|
"FdsDevModeStorage.placeholders.localStorageKey": "localStorage-nyckel",
|
|
284
305
|
"FdsDevModeStorage.placeholders.sessionStorageKey": "sessionStorage-nyckel",
|
|
@@ -288,6 +309,7 @@ var sv_default = {
|
|
|
288
309
|
"FdsDevModeStorage.tabs.localStorage": "localStorage",
|
|
289
310
|
"FdsDevModeStorage.tabs.sessionStorage": "sessionStorage",
|
|
290
311
|
"FdsDevModeStorage.valueLabel": "Värde",
|
|
312
|
+
"FdsDrawer.closeDrawer": "Stäng sidopanel",
|
|
291
313
|
"FdsInput.clearInput": "Rensa text",
|
|
292
314
|
"FdsInput.hidePassword": "Dölj",
|
|
293
315
|
"FdsInput.openDatePicker": "Öppna datumväljare",
|
|
@@ -295,7 +317,13 @@ var sv_default = {
|
|
|
295
317
|
"FdsInput.today": "(idag)",
|
|
296
318
|
"FdsListHeading.loading": "Laddar...",
|
|
297
319
|
"FdsListHeading.separator": "av",
|
|
298
|
-
"
|
|
320
|
+
"FdsLoginEmail.emailInvalid": "Ange en giltig e-postadress",
|
|
321
|
+
"FdsLoginEmail.emailLabel": "E-postadress",
|
|
322
|
+
"FdsLoginEmail.emailRequired": "Ange e-postadress",
|
|
323
|
+
"FdsLoginEmail.passwordLabel": "Lösenord",
|
|
324
|
+
"FdsLoginEmail.passwordRequired": "Ange lösenord",
|
|
325
|
+
"FdsLoginEmail.submit": "Logga in",
|
|
326
|
+
"FdsLoginEmail.submitting": "Loggar in...",
|
|
299
327
|
"FdsModal.closeModal": "Stäng dialogruta",
|
|
300
328
|
"FdsPagination.currentPage": "Aktuell sida",
|
|
301
329
|
"FdsPagination.firstPage": "Gå till första sidan",
|
|
@@ -307,11 +335,11 @@ var sv_default = {
|
|
|
307
335
|
"FdsPhonenumber.invalidPhone": "Ange ett giltigt telefonnummer",
|
|
308
336
|
"FdsPhonenumber.noCountryResults": "Inget land matchar sökningen",
|
|
309
337
|
"FdsPhonenumber.phoneNumber": "Telefonnummer",
|
|
310
|
-
"FdsSsn.invalidSsn": "Ange ett giltigt personnummer eller samordningsnummer",
|
|
311
|
-
"FdsSsn.label": "Personnummer",
|
|
312
338
|
"FdsSearchSelectPro.loadingMore": "Hämtar fler...",
|
|
313
339
|
"FdsSearchSelectPro.showMore": "Visa fler",
|
|
314
340
|
"FdsSearchSelectPro.unspecified": "Ospecificerat",
|
|
341
|
+
"FdsSsn.invalidSsn": "Ange ett giltigt personnummer eller samordningsnummer",
|
|
342
|
+
"FdsSsn.label": "Personnummer",
|
|
315
343
|
"FdsTextarea.characters": "tecken",
|
|
316
344
|
"FdsTreeView.childrenCountPrefix": "(+",
|
|
317
345
|
"FdsTreeView.closePopover": "Stäng",
|
|
@@ -321,17 +349,11 @@ var sv_default = {
|
|
|
321
349
|
"FdsWeekCalendar.nextWeek": "Nästa vecka",
|
|
322
350
|
"FdsWeekCalendar.previousWeek": "Föregående vecka",
|
|
323
351
|
"FdsWeekCalendar.today": "Idag",
|
|
324
|
-
"FdsWeekCalendar.week": "vecka"
|
|
325
|
-
"FdsDevMode.overlay.toggles.apiError": "API-fel",
|
|
326
|
-
"FdsDevMode.overlay.toggles.confirmation": "Bokningar",
|
|
327
|
-
"FdsDevMode.overlay.toggles.debugLogging": "Debug-logg",
|
|
328
|
-
"FdsDevMode.overlay.quickSettings": "Snabbval"
|
|
352
|
+
"FdsWeekCalendar.week": "vecka"
|
|
329
353
|
};
|
|
330
354
|
//#endregion
|
|
331
355
|
//#region src/plugin/i18n.ts
|
|
332
356
|
var FDS_VUE_CORE_I18N_KEY = Symbol("fds-vue-core:i18n");
|
|
333
|
-
//#endregion
|
|
334
|
-
//#region src/plugin/useFdsI18n.ts
|
|
335
357
|
var translations = Object.entries(/* @__PURE__ */ Object.assign({
|
|
336
358
|
"../lang/en.json": en_exports,
|
|
337
359
|
"../lang/sv.json": sv_exports
|
|
@@ -34243,6 +34265,65 @@ var useBankIdSession = (options) => {
|
|
|
34243
34265
|
};
|
|
34244
34266
|
};
|
|
34245
34267
|
//#endregion
|
|
34268
|
+
//#region src/helpers/cancellationRule.ts
|
|
34269
|
+
var ALWAYS_CANCELLABLE_PATTERN = /^0$/;
|
|
34270
|
+
var HOUR_RULE_PATTERN = /^(?<hours>[1-9]\d*)(?<holidays>HELG)?$/;
|
|
34271
|
+
var TIME_RULE_PATTERN = /^KL(?<hour>\d{2}):(?<minute>\d{2})D(?<days>\d+)(?<holidays>HELG)?$/;
|
|
34272
|
+
var parseCancellationRule = (rule) => {
|
|
34273
|
+
const value = rule?.trim() ?? "";
|
|
34274
|
+
if (ALWAYS_CANCELLABLE_PATTERN.test(value)) return { type: "always" };
|
|
34275
|
+
const hourGroups = value.match(HOUR_RULE_PATTERN)?.groups;
|
|
34276
|
+
if (hourGroups?.hours) return {
|
|
34277
|
+
type: "hours",
|
|
34278
|
+
hours: Number(hourGroups.hours),
|
|
34279
|
+
holidaysIncluded: Boolean(hourGroups.holidays)
|
|
34280
|
+
};
|
|
34281
|
+
const timeGroups = value.match(TIME_RULE_PATTERN)?.groups;
|
|
34282
|
+
if (timeGroups?.hour && timeGroups.minute && timeGroups.days) return {
|
|
34283
|
+
type: "time",
|
|
34284
|
+
time: `${timeGroups.hour}:${timeGroups.minute}`,
|
|
34285
|
+
days: Number(timeGroups.days),
|
|
34286
|
+
holidaysIncluded: Boolean(timeGroups.holidays)
|
|
34287
|
+
};
|
|
34288
|
+
return null;
|
|
34289
|
+
};
|
|
34290
|
+
var isValidCancellationRule = (rule) => parseCancellationRule(rule) !== null;
|
|
34291
|
+
var getCancellationRuleText = (rule, { language = "sv", length = "short", suffix = "" } = {}) => {
|
|
34292
|
+
const dictionary = translations[language] ?? {};
|
|
34293
|
+
const text = (key, values = {}) => Object.entries(values).reduce((message, [name, value]) => message.split(`{${name}}`).join(String(value)), dictionary[`FdsCancellationRule.${key}`] ?? "");
|
|
34294
|
+
const withSuffix = (result) => suffix ? `${result} ${suffix}` : result;
|
|
34295
|
+
const parsed = parseCancellationRule(rule);
|
|
34296
|
+
if (!parsed) return "";
|
|
34297
|
+
if (parsed.type === "always") return withSuffix(text(length === "long" ? "alwaysLong" : "always"));
|
|
34298
|
+
const holidays = parsed.holidaysIncluded ? text("holidaysIncluded") : "";
|
|
34299
|
+
let shortText;
|
|
34300
|
+
if (parsed.type === "hours") shortText = parsed.hours === 1 ? text("hours.one", { holidays }) : text("hours.other", {
|
|
34301
|
+
count: parsed.hours,
|
|
34302
|
+
holidays
|
|
34303
|
+
});
|
|
34304
|
+
else if (parsed.days === 0) shortText = text("timeSameDay", { time: parsed.time });
|
|
34305
|
+
else {
|
|
34306
|
+
const days = parsed.days === 1 ? text("days.one") : text("days.other", { count: parsed.days });
|
|
34307
|
+
shortText = text("time", {
|
|
34308
|
+
time: parsed.time,
|
|
34309
|
+
days,
|
|
34310
|
+
holidays
|
|
34311
|
+
});
|
|
34312
|
+
}
|
|
34313
|
+
shortText = shortText.replace(/\s+/g, " ").trim();
|
|
34314
|
+
return withSuffix(length === "long" ? text("long", { rule: shortText }) : shortText);
|
|
34315
|
+
};
|
|
34316
|
+
//#endregion
|
|
34317
|
+
//#region src/composables/useCancellationRuleText.ts
|
|
34318
|
+
function useCancellationRuleText() {
|
|
34319
|
+
const { locale } = useFdsI18n();
|
|
34320
|
+
const cancellationRuleText = (rule, options = {}) => getCancellationRuleText(rule, {
|
|
34321
|
+
language: locale.value.toLowerCase().startsWith("en") ? "en" : "sv",
|
|
34322
|
+
...options
|
|
34323
|
+
});
|
|
34324
|
+
return { cancellationRuleText };
|
|
34325
|
+
}
|
|
34326
|
+
//#endregion
|
|
34246
34327
|
//#region src/helpers/appendQueryParams.ts
|
|
34247
34328
|
/**
|
|
34248
34329
|
* Appends a query string to a path.
|
|
@@ -34459,6 +34540,7 @@ exports.debounce = debounce;
|
|
|
34459
34540
|
exports.default = FdsVueCorePlugin;
|
|
34460
34541
|
exports.filterCountryOptions = filterCountryOptions;
|
|
34461
34542
|
exports.formatPidWithDash = formatPidWithDash;
|
|
34543
|
+
exports.getCancellationRuleText = getCancellationRuleText;
|
|
34462
34544
|
exports.getCountryOption = getCountryOption;
|
|
34463
34545
|
exports.getExitGuardWizardId = getExitGuardWizardId;
|
|
34464
34546
|
exports.getPhoneValidationState = getPhoneValidationState;
|
|
@@ -34467,12 +34549,14 @@ exports.getSsnMaskOptions = getSsnMaskOptions;
|
|
|
34467
34549
|
exports.getSsnValidationState = getSsnValidationState;
|
|
34468
34550
|
exports.isPidString = isPidString;
|
|
34469
34551
|
exports.isRelativeHref = isRelativeHref;
|
|
34552
|
+
exports.isValidCancellationRule = isValidCancellationRule;
|
|
34470
34553
|
exports.isValidLoginEmail = isValidLoginEmail;
|
|
34471
34554
|
exports.isValidLoginPassword = isValidLoginPassword;
|
|
34472
34555
|
exports.logoFeelgoodColored = logo_feelgood_colored_default;
|
|
34473
34556
|
exports.logoFeelgoodLight = logo_feelgood_light_default;
|
|
34474
34557
|
exports.normalizePidSearchValue = normalizePidSearchValue;
|
|
34475
34558
|
exports.normalizeSsn = normalizeSsn;
|
|
34559
|
+
exports.parseCancellationRule = parseCancellationRule;
|
|
34476
34560
|
exports.parseRouteFiltersFromQuery = parseRouteFiltersFromQuery;
|
|
34477
34561
|
exports.resolveRouterLinkTarget = resolveRouterLinkTarget;
|
|
34478
34562
|
exports.serializeRouteFiltersToQuery = serializeRouteFiltersToQuery;
|
|
@@ -34488,6 +34572,7 @@ exports.useBankIdMessages = useBankIdMessages;
|
|
|
34488
34572
|
exports.useBankIdSameDevice = useBankIdSameDevice;
|
|
34489
34573
|
exports.useBankIdSession = useBankIdSession;
|
|
34490
34574
|
exports.useBoldQuery = useBoldQuery;
|
|
34575
|
+
exports.useCancellationRuleText = useCancellationRuleText;
|
|
34491
34576
|
exports.useDevMode = useDevMode;
|
|
34492
34577
|
exports.useDevModeEnvironment = useDevModeEnvironment;
|
|
34493
34578
|
exports.useDevModeToggles = useDevModeToggles;
|