@nanas-home/hub-common 0.16.407 → 0.25.447
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/chunk/{BIZUVNXT.js → 5WH6U556.js} +332 -191
- package/dist/index.css +1 -1
- package/dist/node-utils/index.d.ts +18 -6
- package/dist/node-utils/index.js +80 -33
- package/dist/{textValidation-iMJqTWaq.d.ts → textValidation-D2-ISJBn.d.ts} +147 -110
- package/dist/web/index.d.ts +58 -78
- package/dist/web/index.js +83 -116
- package/dist/web/index.jsx +428 -324
- package/package.json +12 -12
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import dayjs from 'dayjs';
|
|
2
|
-
import { Token, Container } from '@freshgum/typedi';
|
|
3
2
|
import { jwtDecode } from 'jwt-decode';
|
|
3
|
+
import { FormatIcu } from '@tolgee/format-icu';
|
|
4
|
+
import { Tolgee, DevTools, BackendFetch } from '@tolgee/web';
|
|
4
5
|
|
|
5
6
|
// src/constants/calendar.constants.ts
|
|
6
7
|
var weekdayTranslationKeyOrder = [
|
|
@@ -56,6 +57,9 @@ var validUuidChars = [
|
|
|
56
57
|
"F"
|
|
57
58
|
];
|
|
58
59
|
|
|
60
|
+
// src/contracts/dependencyInjection.ts
|
|
61
|
+
var createToken = (description) => ({ id: Symbol(description) });
|
|
62
|
+
|
|
59
63
|
// src/contracts/generated/apiRoute.ts
|
|
60
64
|
var apiRouteParam = {
|
|
61
65
|
userUuid: ":userUuid",
|
|
@@ -247,8 +251,9 @@ var AppType = /* @__PURE__ */ ((AppType2) => {
|
|
|
247
251
|
AppType2[AppType2["HubApi"] = 3] = "HubApi";
|
|
248
252
|
AppType2[AppType2["BookingManager"] = 4] = "BookingManager";
|
|
249
253
|
AppType2[AppType2["HostCalendar"] = 5] = "HostCalendar";
|
|
250
|
-
AppType2[AppType2["
|
|
251
|
-
AppType2[AppType2["
|
|
254
|
+
AppType2[AppType2["Landing"] = 6] = "Landing";
|
|
255
|
+
AppType2[AppType2["Test"] = 7] = "Test";
|
|
256
|
+
AppType2[AppType2["Interactive"] = 8] = "Interactive";
|
|
252
257
|
return AppType2;
|
|
253
258
|
})(AppType || {});
|
|
254
259
|
var webAppTypes = [
|
|
@@ -712,28 +717,59 @@ ${(log.optionalParams ?? []).join("\n\r")}`;
|
|
|
712
717
|
});
|
|
713
718
|
};
|
|
714
719
|
|
|
715
|
-
// src/services/internal/
|
|
716
|
-
var
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
720
|
+
// src/services/internal/dependencyInjection/dependencyInjectionContainer.ts
|
|
721
|
+
var DependencyInjectionContainer = class {
|
|
722
|
+
instances = /* @__PURE__ */ new Map();
|
|
723
|
+
factories = /* @__PURE__ */ new Map();
|
|
724
|
+
parent;
|
|
725
|
+
constructor(parent) {
|
|
726
|
+
this.parent = parent;
|
|
727
|
+
}
|
|
728
|
+
register(token, factory) {
|
|
729
|
+
if (this.instances.has(token)) {
|
|
730
|
+
this.instances.delete(token);
|
|
731
|
+
}
|
|
732
|
+
this.factories.set(token, factory);
|
|
733
|
+
}
|
|
734
|
+
override(token, instance) {
|
|
735
|
+
this.instances.set(token, instance);
|
|
736
|
+
}
|
|
737
|
+
resolve(token) {
|
|
738
|
+
if (this.instances.has(token)) {
|
|
739
|
+
return this.instances.get(token);
|
|
740
|
+
}
|
|
741
|
+
const factory = this.factories.get(token) ?? this.parent?.factories.get(token);
|
|
742
|
+
if (!factory) {
|
|
743
|
+
let serviceName = token.toString();
|
|
744
|
+
if (serviceName == "[object Object]") {
|
|
745
|
+
const bestGuessOfName = token?.id?.toString?.() ?? "unknown";
|
|
746
|
+
serviceName = bestGuessOfName.replace("Symbol(", "").replace(")", "");
|
|
747
|
+
}
|
|
748
|
+
throw new Error(`Service not registered: ${serviceName}`);
|
|
749
|
+
}
|
|
750
|
+
const instance = factory();
|
|
751
|
+
this.instances.set(token, instance);
|
|
752
|
+
return instance;
|
|
753
|
+
}
|
|
732
754
|
};
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
755
|
+
|
|
756
|
+
// src/services/internal/dependencyInjection/setup.ts
|
|
757
|
+
var rootContainer = new DependencyInjectionContainer();
|
|
758
|
+
var BOT_PATH_TOKEN = createToken("BOT_PATH");
|
|
759
|
+
var getBotPath = () => rootContainer.resolve(BOT_PATH_TOKEN);
|
|
760
|
+
var APP_TYPE_TOKEN = createToken("APP_TYPE");
|
|
761
|
+
var getAppType = () => rootContainer.resolve(APP_TYPE_TOKEN);
|
|
762
|
+
var SITE_CONFIG_TOKEN = createToken("SITE_CONFIG");
|
|
763
|
+
var setSiteConfig = (site) => setContainerToken(SITE_CONFIG_TOKEN, site);
|
|
764
|
+
var getSiteConfig = () => rootContainer.resolve(SITE_CONFIG_TOKEN);
|
|
765
|
+
var SITE_COLOUR_TOKEN = createToken("SITE_COLOUR");
|
|
766
|
+
var getSiteColour = () => rootContainer.resolve(SITE_COLOUR_TOKEN);
|
|
767
|
+
var getCommonConfig = () => rootContainer.resolve(CommonConfigService);
|
|
768
|
+
var getLog = () => rootContainer.resolve(LogService);
|
|
769
|
+
var rootDependencyInjectionSetup = (props) => {
|
|
770
|
+
setContainerToken(APP_TYPE_TOKEN, props.appType);
|
|
771
|
+
if (props.botPath != null) setContainerToken(BOT_PATH_TOKEN, props.botPath);
|
|
772
|
+
if (props.siteConfig != null) setContainerToken(SITE_CONFIG_TOKEN, props.siteConfig);
|
|
737
773
|
const loggerOptions = props?.setupLoggerOptions?.();
|
|
738
774
|
const configService = new CommonConfigService();
|
|
739
775
|
const logService = new LogService(
|
|
@@ -749,32 +785,12 @@ var dependencyInjectionSetup = (props) => {
|
|
|
749
785
|
configService
|
|
750
786
|
};
|
|
751
787
|
};
|
|
752
|
-
var
|
|
753
|
-
|
|
754
|
-
var APP_TYPE = new Token("APP_TYPE");
|
|
755
|
-
var getAppType = () => Container.get(APP_TYPE);
|
|
756
|
-
var SITE_CONFIG = new Token("SITE_CONFIG");
|
|
757
|
-
var setSiteConfig = (value) => Container.set({ id: SITE_CONFIG, value });
|
|
758
|
-
var getSiteConfig = () => {
|
|
759
|
-
try {
|
|
760
|
-
return Container.get(SITE_CONFIG);
|
|
761
|
-
} catch {
|
|
762
|
-
console.error("unable to get site config. Did you set the config on app startup?");
|
|
763
|
-
}
|
|
788
|
+
var setContainerToken = (token, value) => {
|
|
789
|
+
rootContainer.register(token, () => value);
|
|
764
790
|
};
|
|
765
|
-
var
|
|
766
|
-
|
|
767
|
-
var getSiteColour = () => {
|
|
768
|
-
try {
|
|
769
|
-
return Container.get(SITE_COLOUR);
|
|
770
|
-
} catch {
|
|
771
|
-
setSiteColour(defaultSiteColour);
|
|
772
|
-
return defaultSiteColour;
|
|
773
|
-
}
|
|
791
|
+
var setContainerTokenLazy = (token, value) => {
|
|
792
|
+
rootContainer.register(token, value);
|
|
774
793
|
};
|
|
775
|
-
var setContainerToken = (id, value) => Container.set({ id, value });
|
|
776
|
-
var getCommonConfig = () => Container.get(CommonConfigService);
|
|
777
|
-
var getLog = () => Container.get(LogService);
|
|
778
794
|
|
|
779
795
|
// src/helpers/arrayHelper.ts
|
|
780
796
|
var makeArrayOrDefault = (propsVal, defaultValue = []) => {
|
|
@@ -1092,152 +1108,226 @@ var getPayloadFromJwt = (token) => {
|
|
|
1092
1108
|
|
|
1093
1109
|
// src/assets/meta.json
|
|
1094
1110
|
var meta_default = {
|
|
1095
|
-
packageVersion: "0.
|
|
1096
|
-
date: "2026-01-
|
|
1097
|
-
gitCommitHash: "
|
|
1111
|
+
packageVersion: "0.25.0",
|
|
1112
|
+
date: "2026-01-26",
|
|
1113
|
+
gitCommitHash: "fb1940793706b71221c87d3673ae00d590387af8"
|
|
1098
1114
|
};
|
|
1099
1115
|
|
|
1100
1116
|
// src/assets/packagesUsed.json
|
|
1101
1117
|
var packagesUsed_default = {
|
|
1102
|
-
generatedDate: "2026-01-
|
|
1103
|
-
generatedDateFormat: "2026-01-
|
|
1104
|
-
list:
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1118
|
+
generatedDate: "2026-01-26T15:46:26.560Z",
|
|
1119
|
+
generatedDateFormat: "2026-01-26",
|
|
1120
|
+
list: {
|
|
1121
|
+
dependencies: [],
|
|
1122
|
+
peerDependencies: [
|
|
1123
|
+
{
|
|
1124
|
+
name: "@hcaptcha/types",
|
|
1125
|
+
version: "1.0.4",
|
|
1126
|
+
licenseType: "MIT",
|
|
1127
|
+
repoUrl: "https://www.npmjs.com/package/@hcaptcha/types"
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
name: "@tolgee/format-icu",
|
|
1131
|
+
version: "6.2.6",
|
|
1132
|
+
licenseType: "MIT",
|
|
1133
|
+
repoUrl: "https://github.com/tolgee/tolgee-js",
|
|
1134
|
+
licenceUrl: "https://github.com/tolgee/tolgee-js/blob/master/LICENSE"
|
|
1135
|
+
},
|
|
1136
|
+
{
|
|
1137
|
+
name: "@tolgee/web",
|
|
1138
|
+
version: "6.2.6",
|
|
1139
|
+
licenseType: "BSD-3-Clause",
|
|
1140
|
+
repoUrl: "https://github.com/tolgee/tolgee-js.git",
|
|
1141
|
+
licenceUrl: "https://github.com/tolgee/tolgee-js/blob/master/LICENSE"
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
name: "classnames",
|
|
1145
|
+
version: "2.5.1",
|
|
1146
|
+
licenseType: "MIT",
|
|
1147
|
+
repoUrl: "https://github.com/JedWatson/classnames.git",
|
|
1148
|
+
licenceUrl: "https://github.com/JedWatson/classnames/blob/master/LICENSE"
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
name: "dayjs",
|
|
1152
|
+
version: "1.11.13",
|
|
1153
|
+
licenseType: "MIT",
|
|
1154
|
+
repoUrl: "https://github.com/iamkun/dayjs.git",
|
|
1155
|
+
licenceUrl: "https://github.com/iamkun/dayjs/blob/master/LICENSE"
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
name: "favicons",
|
|
1159
|
+
version: "7.2.0",
|
|
1160
|
+
licenseType: "MIT",
|
|
1161
|
+
repoUrl: "https://github.com/itgalaxy/favicons.git",
|
|
1162
|
+
licenceUrl: "https://github.com/itgalaxy/favicons/blob/master/LICENSE"
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
name: "jwt-decode",
|
|
1166
|
+
version: "4.0.0",
|
|
1167
|
+
licenseType: "MIT",
|
|
1168
|
+
repoUrl: "git://github.com/auth0/jwt-decode",
|
|
1169
|
+
licenceUrl: "https://github.com/auth0/jwt-decode/blob/master/LICENSE"
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
name: "solid-js",
|
|
1173
|
+
version: "1.9.7",
|
|
1174
|
+
licenseType: "MIT",
|
|
1175
|
+
repoUrl: "https://github.com/solidjs/solid",
|
|
1176
|
+
licenceUrl: "https://github.com/solidjs/solid/blob/master/LICENSE"
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
name: "solid-toast",
|
|
1180
|
+
version: "0.5.0",
|
|
1181
|
+
licenseType: "MIT",
|
|
1182
|
+
repoUrl: "https://github.com/ardeora/solid-toast.git",
|
|
1183
|
+
licenceUrl: "https://github.com/ardeora/solid-toast/blob/master/LICENSE"
|
|
1184
|
+
}
|
|
1185
|
+
],
|
|
1186
|
+
devDependencies: [
|
|
1187
|
+
{
|
|
1188
|
+
name: "@chromatic-com/storybook",
|
|
1189
|
+
version: "5.0.0",
|
|
1190
|
+
licenseType: "MIT",
|
|
1191
|
+
repoUrl: "https://github.com/chromaui/addon-visual-tests.git",
|
|
1192
|
+
licenceUrl: "https://github.com/chromaui/addon-visual-tests/blob/master/LICENSE"
|
|
1193
|
+
},
|
|
1194
|
+
{
|
|
1195
|
+
name: "@storybook/addon-a11y",
|
|
1196
|
+
version: "10.2.0",
|
|
1197
|
+
licenseType: "MIT",
|
|
1198
|
+
repoUrl: "https://github.com/storybookjs/storybook.git"
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
name: "@storybook/addon-docs",
|
|
1202
|
+
version: "10.2.0",
|
|
1203
|
+
licenseType: "MIT",
|
|
1204
|
+
repoUrl: "https://github.com/storybookjs/storybook.git"
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
name: "@storybook/addon-links",
|
|
1208
|
+
version: "10.2.0",
|
|
1209
|
+
licenseType: "MIT",
|
|
1210
|
+
repoUrl: "https://github.com/storybookjs/storybook.git"
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
name: "@storybook/addon-onboarding",
|
|
1214
|
+
version: "10.2.0",
|
|
1215
|
+
licenseType: "MIT",
|
|
1216
|
+
repoUrl: "https://github.com/storybookjs/storybook.git"
|
|
1217
|
+
},
|
|
1218
|
+
{
|
|
1219
|
+
name: "@storybook/addon-vitest",
|
|
1220
|
+
version: "10.2.0",
|
|
1221
|
+
licenseType: "MIT",
|
|
1222
|
+
repoUrl: "https://github.com/storybookjs/storybook.git"
|
|
1223
|
+
},
|
|
1224
|
+
{
|
|
1225
|
+
name: "@types/node",
|
|
1226
|
+
version: "25.0.9",
|
|
1227
|
+
licenseType: "MIT",
|
|
1228
|
+
repoUrl: "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
|
1229
|
+
licenceUrl: "https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/LICENSE"
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
name: "@vitest/browser",
|
|
1233
|
+
version: "4.0.17",
|
|
1234
|
+
licenseType: "MIT",
|
|
1235
|
+
repoUrl: "https://github.com/vitest-dev/vitest.git",
|
|
1236
|
+
licenceUrl: "https://github.com/vitest-dev/vitest/blob/master/LICENSE"
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
name: "@vitest/coverage-v8",
|
|
1240
|
+
version: "4.0.17",
|
|
1241
|
+
licenseType: "MIT",
|
|
1242
|
+
repoUrl: "https://github.com/vitest-dev/vitest.git",
|
|
1243
|
+
licenceUrl: "https://github.com/vitest-dev/vitest/blob/master/LICENSE"
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
name: "@vitest/ui",
|
|
1247
|
+
version: "4.0.17",
|
|
1248
|
+
licenseType: "MIT",
|
|
1249
|
+
repoUrl: "https://github.com/vitest-dev/vitest.git",
|
|
1250
|
+
licenceUrl: "https://github.com/vitest-dev/vitest/blob/master/LICENSE"
|
|
1251
|
+
},
|
|
1252
|
+
{
|
|
1253
|
+
name: "dotenv-cli",
|
|
1254
|
+
version: "11.0.0",
|
|
1255
|
+
licenseType: "MIT",
|
|
1256
|
+
repoUrl: "https://www.npmjs.com/package/dotenv-cli"
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
name: "jsdom",
|
|
1260
|
+
version: "27.4.0",
|
|
1261
|
+
licenseType: "MIT",
|
|
1262
|
+
repoUrl: "https://github.com/jsdom/jsdom.git"
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
name: "node-html-parser",
|
|
1266
|
+
version: "7.0.2",
|
|
1267
|
+
licenseType: "MIT",
|
|
1268
|
+
repoUrl: "https://github.com/taoqf/node-fast-html-parser.git",
|
|
1269
|
+
licenceUrl: "https://github.com/taoqf/node-fast-html-parser/blob/master/LICENSE"
|
|
1270
|
+
},
|
|
1271
|
+
{
|
|
1272
|
+
name: "sass",
|
|
1273
|
+
version: "1.97.2",
|
|
1274
|
+
licenseType: "MIT",
|
|
1275
|
+
repoUrl: "https://github.com/sass/dart-sass",
|
|
1276
|
+
licenceUrl: "https://github.com/sass/dart-sass/blob/master/LICENSE"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
name: "storybook",
|
|
1280
|
+
version: "10.2.0",
|
|
1281
|
+
licenseType: "MIT",
|
|
1282
|
+
repoUrl: "https://github.com/storybookjs/storybook.git"
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
name: "storybook-solidjs-vite",
|
|
1286
|
+
version: "10.0.9",
|
|
1287
|
+
licenseType: "MIT",
|
|
1288
|
+
repoUrl: "https://github.com/solidjs-community/storybook.git",
|
|
1289
|
+
licenceUrl: "https://github.com/solidjs-community/storybook/blob/master/LICENSE"
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
name: "tsup",
|
|
1293
|
+
version: "8.5.1",
|
|
1294
|
+
licenseType: "MIT",
|
|
1295
|
+
repoUrl: "https://github.com/egoist/tsup.git",
|
|
1296
|
+
licenceUrl: "https://github.com/egoist/tsup/blob/master/LICENSE"
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
name: "tsup-preset-solid",
|
|
1300
|
+
version: "2.2.0",
|
|
1301
|
+
licenseType: "MIT",
|
|
1302
|
+
repoUrl: "https://github.com/solidjs-community/tsup-preset-solid.git",
|
|
1303
|
+
licenceUrl: "https://github.com/solidjs-community/tsup-preset-solid/blob/master/LICENSE"
|
|
1304
|
+
},
|
|
1305
|
+
{
|
|
1306
|
+
name: "typescript",
|
|
1307
|
+
version: "5.9.3",
|
|
1308
|
+
licenseType: "Apache-2.0",
|
|
1309
|
+
repoUrl: "https://github.com/microsoft/TypeScript.git"
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
name: "vite",
|
|
1313
|
+
version: "7.3.1",
|
|
1314
|
+
licenseType: "MIT",
|
|
1315
|
+
repoUrl: "https://github.com/vitejs/vite.git"
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
name: "vite-plugin-solid",
|
|
1319
|
+
version: "2.11.10",
|
|
1320
|
+
licenseType: "MIT",
|
|
1321
|
+
repoUrl: "https://github.com/solidjs/vite-plugin-solid.git"
|
|
1322
|
+
},
|
|
1323
|
+
{
|
|
1324
|
+
name: "vitest",
|
|
1325
|
+
version: "4.0.17",
|
|
1326
|
+
licenseType: "MIT",
|
|
1327
|
+
repoUrl: "https://github.com/vitest-dev/vitest.git"
|
|
1328
|
+
}
|
|
1329
|
+
]
|
|
1330
|
+
}
|
|
1241
1331
|
};
|
|
1242
1332
|
|
|
1243
1333
|
// src/helpers/metaHelper.ts
|
|
@@ -1370,6 +1460,57 @@ var urlRef = (url) => {
|
|
|
1370
1460
|
return url + `?ref=${ref}`;
|
|
1371
1461
|
};
|
|
1372
1462
|
|
|
1463
|
+
// src/services/internal/config/colour.config.ts
|
|
1464
|
+
var colourPalette = {
|
|
1465
|
+
nanasBackyard: "#97A571",
|
|
1466
|
+
creamPaw: "#F7F2ED",
|
|
1467
|
+
shadowCollar: "#393834",
|
|
1468
|
+
pineCollar: "#263A38",
|
|
1469
|
+
warmBiscuit: "#C88F65",
|
|
1470
|
+
whiskerWhite: "#ffffff",
|
|
1471
|
+
couchBreather: "#DCE5E3",
|
|
1472
|
+
snoutClay: "#9D8478",
|
|
1473
|
+
pawInk: "#000000",
|
|
1474
|
+
//
|
|
1475
|
+
pineCollar25PercentLighter: "#324644"
|
|
1476
|
+
};
|
|
1477
|
+
var defaultSiteColour = {
|
|
1478
|
+
primary: "#97A571",
|
|
1479
|
+
secondary: "#97A571"
|
|
1480
|
+
};
|
|
1481
|
+
var TranslationService = class {
|
|
1482
|
+
constructor(log, _config) {
|
|
1483
|
+
this._config = _config;
|
|
1484
|
+
this._logger = log.getLogger("TranslationService");
|
|
1485
|
+
}
|
|
1486
|
+
_logger;
|
|
1487
|
+
_tolgee;
|
|
1488
|
+
initialize = async () => {
|
|
1489
|
+
if (this._tolgee != null) return;
|
|
1490
|
+
this._tolgee = Tolgee().use(DevTools()).use(FormatIcu()).use(
|
|
1491
|
+
BackendFetch({
|
|
1492
|
+
prefix: "/assets/i18n",
|
|
1493
|
+
fallbackOnFail: true
|
|
1494
|
+
})
|
|
1495
|
+
).init({
|
|
1496
|
+
defaultLanguage: "en",
|
|
1497
|
+
observerType: "text",
|
|
1498
|
+
observerOptions: { inputPrefix: "{{", inputSuffix: "}}" },
|
|
1499
|
+
// Dev mode only 👇
|
|
1500
|
+
apiKey: this._config.getTolgeeApiKey(),
|
|
1501
|
+
apiUrl: this._config.getTolgeeApiUrl(),
|
|
1502
|
+
projectId: this._config.getTolgeeProjectId()
|
|
1503
|
+
});
|
|
1504
|
+
await this._tolgee.run();
|
|
1505
|
+
this._logger.d("Tolgee initialised!");
|
|
1506
|
+
};
|
|
1507
|
+
instance = () => this._tolgee;
|
|
1508
|
+
t = (key, defaultValue, options) => (
|
|
1509
|
+
// this._tolgee.t(key, defaultValue, options);
|
|
1510
|
+
this._tolgee?.t?.(key, defaultValue, options) ?? defaultValue ?? key
|
|
1511
|
+
);
|
|
1512
|
+
};
|
|
1513
|
+
|
|
1373
1514
|
// src/validation/arrayValidation.ts
|
|
1374
1515
|
var minItems = (minLength2) => (values) => {
|
|
1375
1516
|
const safeArr = makeArrayOrDefault(values);
|
|
@@ -1565,4 +1706,4 @@ var shouldBeYoutubeUrl = (value) => {
|
|
|
1565
1706
|
};
|
|
1566
1707
|
};
|
|
1567
1708
|
|
|
1568
|
-
export {
|
|
1709
|
+
export { APP_TYPE_TOKEN, ActivityRestriction, ActivityType, AddressLinkType, AddressRestriction, AnswerLinkType, AnswerRestriction, AppType, BOT_PATH_TOKEN, BookingAddonRestriction, BookingAddonType, BookingRestriction, BookingStatusType, CommentLinkType, CommentRestriction, CommonConfigService, DependencyInjectionContainer, DrivingRouteRestriction, LogService, MembershipStatus, MembershipType, MouseButton, NetworkState, OrderDirectionType, PermissionRestriction, PermissionType, PetRestriction, PetSexType, PetStatusType, PetType, QuestionForType, QuestionRestriction, QuestionType, SITE_CONFIG_TOKEN, SearchableColumnType, TranslationService, UnavailabilityRestriction, UploadLinkType, UploadRestriction, UploadType, UserAccountFlagType, UserRestriction, UserType, addDays, addMinutes, addMonths, addSeconds, addSpacesForEnum, addToParallelTasks, anyObject, apiRoute, apiRouteParam, arrayContains, arrayOfNLength, capitalizeFirstLetter, changeMonth, colourPalette, convertToDate, convertToFullDateSelection, createToken, cyrb53, dateDiffInDays, debounceLeading, defaultSiteColour, fakePromise, formatDate, formatFileSize, formatForBookingDate, formatForDateDropdown, formatForDateLocal, formatForDateLocalDetailed, formatForDateOfBirth, formatForDateWithTime, getAgeInYears, getAllPetQuestionForType, getAppType, getArrFromEnum, getBotPath, getCalendarDropdownDisplayValue, getCalendarDropdownForDateOfBirthDisplayValue, getCommonConfig, getDayClassObject, getDayElements, getDayHeadingElements, getImageParams, getLog, getMeta, getMimeTypeFromExtension, getPackagesUsed, getPayloadFromJwt, getPerformanceTimer, getPetAvatarUrl, getSiteColour, getSiteConfig, getUserAvatarUrl, getUsersName, getWeekNumber, hasRequiredPermissions, isBefore, isDateAfterStart, isDateBeforeEnd, isDateDisabledByDisabledDays, isDateEnabledByEnabledDays, isNumber, isSameDay, isWebApp, lowercaseFirstLetter, makeArrayOrDefault, maxDate, maxItems, maxLength, mimeTypeLookup, minDate, minItems, minLength, minUrlLength, monthTranslationKeyOrder, multiValidation, nameof, noValidation, notNull, onlyUnique, portalGlyphLength, promiseFromValue, randomIntFromRange, randomItemFromArray, rootContainer, rootDependencyInjectionSetup, searchColumns, selectedItemsExist, selectedOptionIsInEnum, separateValidation, setContainerToken, setContainerTokenLazy, setSiteConfig, shouldBeUrl, shouldBeYoutubeUrl, showSecondCalendar, timeout, tryParseNumber, uploadsThatNeedEncryption, urlRef, uuidv4, validUuidChars, validateForEach, webAppTypes, weekdayTranslationKeyOrder };
|