@valtimo/shared 13.45.1 → 13.47.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/assets/core/en.json +425 -15
- package/assets/core/nl.json +443 -33
- package/fesm2022/valtimo-shared.mjs +60 -2
- package/fesm2022/valtimo-shared.mjs.map +1 -1
- package/lib/generated/generated-backend-types.d.ts +2 -0
- package/lib/generated/generated-backend-types.d.ts.map +1 -1
- package/lib/models/user-settings.model.d.ts +1 -0
- package/lib/models/user-settings.model.d.ts.map +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/kebab-case.utils.d.ts +4 -0
- package/lib/utils/kebab-case.utils.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -328,6 +328,64 @@ const validateBsn = (value) => {
|
|
|
328
328
|
return { isValid: true, errorKey: null };
|
|
329
329
|
};
|
|
330
330
|
|
|
331
|
+
/*
|
|
332
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
333
|
+
*
|
|
334
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
335
|
+
* you may not use this file except in compliance with the License.
|
|
336
|
+
* You may obtain a copy of the License at
|
|
337
|
+
*
|
|
338
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
339
|
+
*
|
|
340
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
341
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
342
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
343
|
+
* See the License for the specific language governing permissions and
|
|
344
|
+
* limitations under the License.
|
|
345
|
+
*/
|
|
346
|
+
const DIACRITIC_MARKS_REGEX = /[\u0300-\u036f]/g;
|
|
347
|
+
const DISALLOWED_REGEX = /[^a-z0-9-_]+|-[^a-z0-9]+/g;
|
|
348
|
+
const DISALLOWED_CHAR_REGEX = /[^a-z0-9-_]/g;
|
|
349
|
+
const WHITESPACE_REGEX = /\s+/g;
|
|
350
|
+
const UNDERSCORE_RUN_REGEX = /_[-_]+/g;
|
|
351
|
+
const LEADING_NON_LETTER_REGEX = /^[^a-z]+/;
|
|
352
|
+
const TRAILING_SEPARATOR_REGEX = /[-_]+$/;
|
|
353
|
+
// Text to key: lowercase, no whitespace, starts with a letter — safe as an XML/BPMN id
|
|
354
|
+
const toKebabCase = (source, maxLength) => {
|
|
355
|
+
if (!source)
|
|
356
|
+
return '';
|
|
357
|
+
const kebab = source
|
|
358
|
+
.normalize('NFD')
|
|
359
|
+
.replace(DIACRITIC_MARKS_REGEX, '')
|
|
360
|
+
.toLowerCase()
|
|
361
|
+
.replace(DISALLOWED_REGEX, '-')
|
|
362
|
+
.replace(UNDERSCORE_RUN_REGEX, '_')
|
|
363
|
+
.replace(LEADING_NON_LETTER_REGEX, '')
|
|
364
|
+
.replace(TRAILING_SEPARATOR_REGEX, '');
|
|
365
|
+
if (!maxLength || kebab.length <= maxLength)
|
|
366
|
+
return kebab;
|
|
367
|
+
return truncateOnWordBoundary(kebab, maxLength);
|
|
368
|
+
};
|
|
369
|
+
const truncateOnWordBoundary = (kebab, maxLength) => {
|
|
370
|
+
const truncated = kebab.slice(0, maxLength);
|
|
371
|
+
const lastSeparator = truncated.lastIndexOf('-');
|
|
372
|
+
// Only cut on a word boundary when it does not swallow most of the text
|
|
373
|
+
const onBoundary = lastSeparator > maxLength / 2;
|
|
374
|
+
return (onBoundary ? truncated.slice(0, lastSeparator) : truncated).replace(TRAILING_SEPARATOR_REGEX, '');
|
|
375
|
+
};
|
|
376
|
+
// Same character rules as toKebabCase, but keeps a separator the user just typed
|
|
377
|
+
const sanitizeKey = (source) => {
|
|
378
|
+
if (!source)
|
|
379
|
+
return '';
|
|
380
|
+
return source
|
|
381
|
+
.normalize('NFD')
|
|
382
|
+
.replace(DIACRITIC_MARKS_REGEX, '')
|
|
383
|
+
.toLowerCase()
|
|
384
|
+
.replace(WHITESPACE_REGEX, '-')
|
|
385
|
+
.replace(DISALLOWED_CHAR_REGEX, '')
|
|
386
|
+
.replace(LEADING_NON_LETTER_REGEX, '');
|
|
387
|
+
};
|
|
388
|
+
|
|
331
389
|
/*
|
|
332
390
|
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
333
391
|
*
|
|
@@ -1253,7 +1311,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1253
1311
|
* limitations under the License.
|
|
1254
1312
|
*/
|
|
1255
1313
|
const VERSIONS = {
|
|
1256
|
-
frontendLibraries: '13.
|
|
1314
|
+
frontendLibraries: '13.47.0',
|
|
1257
1315
|
};
|
|
1258
1316
|
|
|
1259
1317
|
/*
|
|
@@ -2075,5 +2133,5 @@ const zgwFeaturesGuard = () => {
|
|
|
2075
2133
|
* Generated bundle index. Do not edit.
|
|
2076
2134
|
*/
|
|
2077
2135
|
|
|
2078
|
-
export { BUILDING_BLOCK_MANAGEMENT_TAB_TOKEN, BaseApiService, BasicExtensionPoint, CASE_CONFIGURATION_EXTENSIONS_TOKEN, CASE_MANAGEMENT_TAB_TOKEN, CarouselComponent, CaseListTab, ConfigModule, ConfigService, ConfigurationIssueService, CustomMultiTranslateHttpLoader, CustomMultiTranslateHttpLoaderFactory, DEFAULT_NOTIFICATION_PARAMS, DraftVersionService, EditPermissionsService, EnvironmentService, Extension, ExtensionComponent, ExtensionLoader, FORM_VIEW_MODEL_TOKEN, GlobalNotificationComponent, GlobalNotificationService, HttpLoaderFactory, IKO_TOKEN, INITIALIZERS, IncludeFunction, InterceptorSkip, InterceptorSkipHeader, Language, LocalizationService, MenuIncludeService, MockIconService, MockKeycloakService, MockTranslateService, MultiTranslateHttpLoaderFactory, ROLE_ADMIN, ROLE_DEVELOPER, ROLE_USER, RouterUtils, TagColor, TaskListTab, UploadProvider, UrlUtils, UserSettingsService, VALTIMO_CONFIG, VERSIONS, ValtimoUserIdentity, ZGW_DOCUMENTEN_API_DOCUMENTS_COMPONENT_TOKEN, ZGW_OBJECT_TYPE_COMPONENT_TOKEN, getBuildingBlockManagementRouteParams, getCaseManagementRouteParams, getCaseManagementRouteParamsAndContext, getContextObservable, getDisplayTypeParametersView, getNotificationObject, validateBsn, zgwFeaturesGuard };
|
|
2136
|
+
export { BUILDING_BLOCK_MANAGEMENT_TAB_TOKEN, BaseApiService, BasicExtensionPoint, CASE_CONFIGURATION_EXTENSIONS_TOKEN, CASE_MANAGEMENT_TAB_TOKEN, CarouselComponent, CaseListTab, ConfigModule, ConfigService, ConfigurationIssueService, CustomMultiTranslateHttpLoader, CustomMultiTranslateHttpLoaderFactory, DEFAULT_NOTIFICATION_PARAMS, DraftVersionService, EditPermissionsService, EnvironmentService, Extension, ExtensionComponent, ExtensionLoader, FORM_VIEW_MODEL_TOKEN, GlobalNotificationComponent, GlobalNotificationService, HttpLoaderFactory, IKO_TOKEN, INITIALIZERS, IncludeFunction, InterceptorSkip, InterceptorSkipHeader, Language, LocalizationService, MenuIncludeService, MockIconService, MockKeycloakService, MockTranslateService, MultiTranslateHttpLoaderFactory, ROLE_ADMIN, ROLE_DEVELOPER, ROLE_USER, RouterUtils, TagColor, TaskListTab, UploadProvider, UrlUtils, UserSettingsService, VALTIMO_CONFIG, VERSIONS, ValtimoUserIdentity, ZGW_DOCUMENTEN_API_DOCUMENTS_COMPONENT_TOKEN, ZGW_OBJECT_TYPE_COMPONENT_TOKEN, getBuildingBlockManagementRouteParams, getCaseManagementRouteParams, getCaseManagementRouteParamsAndContext, getContextObservable, getDisplayTypeParametersView, getNotificationObject, sanitizeKey, toKebabCase, validateBsn, zgwFeaturesGuard };
|
|
2079
2137
|
//# sourceMappingURL=valtimo-shared.mjs.map
|