@leanix/components 0.4.632 → 0.4.634

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.
@@ -11417,6 +11417,108 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
11417
11417
  }]
11418
11418
  }] });
11419
11419
 
11420
+ /**
11421
+ * A safe version of JSON.stringify that:
11422
+ * 1. replaces circular references (with "[Circular ~]" for a reference to the whole object
11423
+ * or "[Circular ~<path>]" for a reference to a specific entry)
11424
+ * 2. converts BigInt values to strings
11425
+ */
11426
+ function safeStringify(value, replacer, spaces) {
11427
+ return JSON.stringify(value, serializer(replacer), spaces);
11428
+ }
11429
+ // Largely based on https://www.npmjs.com/package/json-stringify-safe, licensed under ISC
11430
+ function serializer(replacer) {
11431
+ const stack = [];
11432
+ const keys = [];
11433
+ return function (key, value) {
11434
+ if (stack.length > 0) {
11435
+ // Insert `this` to stack
11436
+ const thisPos = stack.indexOf(this);
11437
+ if (thisPos > -1) {
11438
+ stack.splice(thisPos + 1);
11439
+ keys.splice(thisPos, Infinity, key);
11440
+ }
11441
+ else {
11442
+ stack.push(this);
11443
+ keys.push(key);
11444
+ }
11445
+ if (stack.indexOf(value) > -1) {
11446
+ // Handle circular references
11447
+ if (stack[0] === value) {
11448
+ value = '[Circular ~]';
11449
+ }
11450
+ else {
11451
+ value = `[Circular ~${keys.slice(0, stack.indexOf(value)).join('.')}]`;
11452
+ }
11453
+ }
11454
+ else if (typeof value === 'bigint') {
11455
+ // Handle BigInt values
11456
+ value = value.toString();
11457
+ }
11458
+ }
11459
+ else {
11460
+ stack.push(value);
11461
+ }
11462
+ return replacer ? replacer.call(this, key, value) : value;
11463
+ };
11464
+ }
11465
+
11466
+ /**
11467
+ * Converts an object of arguments into a string of interpolated template properties.
11468
+ * This works almost the same as `argsToTemplate` from Storybook, but it interpolates
11469
+ * the values of the properties instead of referencing local variables. This is most
11470
+ * useful to make stories copyable by other developers and have them work out of the box
11471
+ * (or with minor adjustments).
11472
+ */
11473
+ function argsToInterpolatedTemplate(args, options) {
11474
+ const includeSet = options?.include ? new Set(options.include) : null;
11475
+ const excludeSet = options?.exclude ? new Set(options.exclude) : null;
11476
+ return Object.entries(args)
11477
+ .filter(([_, value]) => value != null)
11478
+ .filter(([key]) => {
11479
+ if (includeSet)
11480
+ return includeSet.has(key);
11481
+ if (excludeSet)
11482
+ return !excludeSet.has(key);
11483
+ return true;
11484
+ })
11485
+ .map(([key, value]) => typeof value === 'function' ? formatInterpolatedOutputProperty(key) : formatInterpolatedInputProperty(key, value))
11486
+ .join(' ');
11487
+ }
11488
+ function formatInterpolatedOutputProperty(propertyName) {
11489
+ const validPropertyNameExp = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;
11490
+ const formattedPropertyName = validPropertyNameExp.test(propertyName) ? propertyName : `this['${propertyName}']`;
11491
+ return `(${propertyName})="${formattedPropertyName}($event)"`;
11492
+ }
11493
+ function formatInterpolatedInputProperty(propertyName, value) {
11494
+ let interpolatedValue = undefined;
11495
+ switch (typeof value) {
11496
+ case 'string':
11497
+ interpolatedValue = `'${value.replace("'", "\\'")}'`;
11498
+ break;
11499
+ case 'object':
11500
+ interpolatedValue = safeStringify(value)
11501
+ .replace(/'/g, '\u2019')
11502
+ .replace(/\\"/g, '\u201D')
11503
+ .replace(/"([^-"]+)":/g, '$1: ')
11504
+ .replace(/"/g, "'")
11505
+ .replace(/\u2019/g, "\\'")
11506
+ .replace(/\u201D/g, "\\'")
11507
+ .split(',')
11508
+ .join(', ');
11509
+ break;
11510
+ case 'bigint':
11511
+ case 'number':
11512
+ case 'boolean':
11513
+ case 'symbol':
11514
+ case 'undefined':
11515
+ case 'function':
11516
+ default:
11517
+ interpolatedValue = value;
11518
+ }
11519
+ return interpolatedValue != null ? `[${propertyName}]="${interpolatedValue}"` : '';
11520
+ }
11521
+
11420
11522
  /**
11421
11523
  * Key codes that we listen to for
11422
11524
  * user action on our lx-tab-group
@@ -11692,5 +11794,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
11692
11794
  * Generated bundle index. Do not edit.
11693
11795
  */
11694
11796
 
11695
- export { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, AVATAR_COLORS, AVATAR_SIZE_MAPPING, AfterViewInitDirective, AngularNodeViewComponent, AngularNodeViewRenderer, AutocloseDirective, AutocloseGroupService, AutofocusDirective, AvatarComponent, AvatarGroupComponent, BACKSPACE, BadgeComponent, BannerComponent, BaseSelectDirective, BasicDropdownComponent, BasicDropdownItemComponent, BrPipe, BreadcrumbComponent, ButtonComponent, ButtonGroupComponent, CORE_MODULE_EXPORTS, CURRENCY_SYMBOL_MAP, CardComponent, CdkOptionsDropdownComponent, CdkOptionsSubDropdownComponent, CollapsibleComponent, ContenteditableDirective, ContrastColorPipe, CounterComponent, CurrencyInputComponent, CurrencySymbolComponent, CustomDatePipe, DATEPICKER_CONTROL_VALUE_ACCESSOR, DATE_FN_LOCALE, DATE_FORMATS, DEFAULT_IMAGE_ID, DateFormatter, DateInputComponent, DatePickerComponent, DatepickerConfig, DatepickerUiModule, DragAndDropListComponent, DragAndDropListItemComponent, END, ENTER, ESCAPE, EllipsisComponent, EmptyStateComponent, ErrorMessageComponent, FORMS_MODULE_EXPORTS, FORM_CONTROL_ERROR_DISPLAY_STRATEGY, FORM_CONTROL_ERROR_NAMESPACE, FilterSelectionPipe, FilterTermPipe, FocusEditorDirective, FormErrorComponent, FormErrorDirective, FormSubmitDirective, FormatNumberPipe, GLOBAL_TRANSLATION_OPTIONS, HOME, HighlightRangePipe, HighlightTermDirective, HighlightTermPipe, ICON_MAP, IMAGE_READER, IconComponent, IconScaleComponent, InputComponent, KeyboardActionSourceDirective, KeyboardSelectAction, KeyboardSelectDirective, LOCALE_FN, LX_ELLIPSIS_DEBOUNCE_ON_RESIZE, LxCoreUiModule, LxDragAndDropListModule, LxFormsModule, LxIsUuidPipe, LxLinkifyPipe, LxModalModule, LxPopoverUiModule, LxTabUiModule, LxTimeAgo, LxTranslatePipe, LxUnlinkifyPipe, MODAL_CLOSE, MODAL_MODULE_EXPORTS, MarkInvalidDirective, MarkdownPipe, MaxLengthCounterDirective, ModalCloseClickLocation, ModalComponent, ModalContentDirective, ModalFooterComponent, ModalHeaderComponent, MultiSelectComponent, NbspPipe, OptionComponent, OptionGroupComponent, OptionGroupDropdownComponent, OptionsDropdownComponent, OptionsSubDropdownComponent, PageHeaderComponent, PickerComponent, PickerOptionComponent, PickerTriggerDirective, PillItemComponent, PillListComponent, PopoverClickDirective, PopoverComponent, PopoverContentDirective, PopoverHoverDirective, RELEVANCE_SORTING_KEY, RemoveMarkdownPipe, ResizeObserverService, ResponsiveInputComponent, RichTextEditorComponent, SPACE, SelectDropdownDirective, SelectableItemDirective, SelectedOptionDirective, SingleSelectComponent, SkeletonComponent, SortPipe, Sorting, SortingDropdownComponent, SortingDropdownTriggerComponent, SpinnerComponent, StepperComponent, SwitchComponent, TAB, TabComponent, TabGroupComponent, TableComponent, TableHeaderComponent, TinySpinnerComponent, TipTapEditorDirective, TokenComponent, TokenizerComponent, TokenizerOverflowPopoverComponent, TooltipComponent, TooltipDirective, TrackingDirective, TranslationAfterPipe, TranslationBeforePipe, TranslationBetweenPipe, TruncateDirective, UnescapeCurlyBracesPipe, ValidateDateInForeseeableFuture, ValidateStringNotInArray, ValidateStringNotInArrayAsync, getContrastColor, getInitialsUrl, getKeyboardNavigationEvents, getTranslationParts, highlightText, isValidHexColor, isValidX, isValidY, markdownToText, provideFormControlErrorDisplayStrategy, provideFormControlErrorNamespace, shorthandHexHandle, stopKeyboardEventPropagation };
11797
+ export { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, AVATAR_COLORS, AVATAR_SIZE_MAPPING, AfterViewInitDirective, AngularNodeViewComponent, AngularNodeViewRenderer, AutocloseDirective, AutocloseGroupService, AutofocusDirective, AvatarComponent, AvatarGroupComponent, BACKSPACE, BadgeComponent, BannerComponent, BaseSelectDirective, BasicDropdownComponent, BasicDropdownItemComponent, BrPipe, BreadcrumbComponent, ButtonComponent, ButtonGroupComponent, CORE_MODULE_EXPORTS, CURRENCY_SYMBOL_MAP, CardComponent, CdkOptionsDropdownComponent, CdkOptionsSubDropdownComponent, CollapsibleComponent, ContenteditableDirective, ContrastColorPipe, CounterComponent, CurrencyInputComponent, CurrencySymbolComponent, CustomDatePipe, DATEPICKER_CONTROL_VALUE_ACCESSOR, DATE_FN_LOCALE, DATE_FORMATS, DEFAULT_IMAGE_ID, DateFormatter, DateInputComponent, DatePickerComponent, DatepickerConfig, DatepickerUiModule, DragAndDropListComponent, DragAndDropListItemComponent, END, ENTER, ESCAPE, EllipsisComponent, EmptyStateComponent, ErrorMessageComponent, FORMS_MODULE_EXPORTS, FORM_CONTROL_ERROR_DISPLAY_STRATEGY, FORM_CONTROL_ERROR_NAMESPACE, FilterSelectionPipe, FilterTermPipe, FocusEditorDirective, FormErrorComponent, FormErrorDirective, FormSubmitDirective, FormatNumberPipe, GLOBAL_TRANSLATION_OPTIONS, HOME, HighlightRangePipe, HighlightTermDirective, HighlightTermPipe, ICON_MAP, IMAGE_READER, IconComponent, IconScaleComponent, InputComponent, KeyboardActionSourceDirective, KeyboardSelectAction, KeyboardSelectDirective, LOCALE_FN, LX_ELLIPSIS_DEBOUNCE_ON_RESIZE, LxCoreUiModule, LxDragAndDropListModule, LxFormsModule, LxIsUuidPipe, LxLinkifyPipe, LxModalModule, LxPopoverUiModule, LxTabUiModule, LxTimeAgo, LxTranslatePipe, LxUnlinkifyPipe, MODAL_CLOSE, MODAL_MODULE_EXPORTS, MarkInvalidDirective, MarkdownPipe, MaxLengthCounterDirective, ModalCloseClickLocation, ModalComponent, ModalContentDirective, ModalFooterComponent, ModalHeaderComponent, MultiSelectComponent, NbspPipe, OptionComponent, OptionGroupComponent, OptionGroupDropdownComponent, OptionsDropdownComponent, OptionsSubDropdownComponent, PageHeaderComponent, PickerComponent, PickerOptionComponent, PickerTriggerDirective, PillItemComponent, PillListComponent, PopoverClickDirective, PopoverComponent, PopoverContentDirective, PopoverHoverDirective, RELEVANCE_SORTING_KEY, RemoveMarkdownPipe, ResizeObserverService, ResponsiveInputComponent, RichTextEditorComponent, SPACE, SelectDropdownDirective, SelectableItemDirective, SelectedOptionDirective, SingleSelectComponent, SkeletonComponent, SortPipe, Sorting, SortingDropdownComponent, SortingDropdownTriggerComponent, SpinnerComponent, StepperComponent, SwitchComponent, TAB, TabComponent, TabGroupComponent, TableComponent, TableHeaderComponent, TinySpinnerComponent, TipTapEditorDirective, TokenComponent, TokenizerComponent, TokenizerOverflowPopoverComponent, TooltipComponent, TooltipDirective, TrackingDirective, TranslationAfterPipe, TranslationBeforePipe, TranslationBetweenPipe, TruncateDirective, UnescapeCurlyBracesPipe, ValidateDateInForeseeableFuture, ValidateStringNotInArray, ValidateStringNotInArrayAsync, argsToInterpolatedTemplate, getContrastColor, getInitialsUrl, getKeyboardNavigationEvents, getTranslationParts, highlightText, isValidHexColor, isValidX, isValidY, markdownToText, provideFormControlErrorDisplayStrategy, provideFormControlErrorNamespace, shorthandHexHandle, stopKeyboardEventPropagation };
11696
11798
  //# sourceMappingURL=leanix-components.mjs.map