@six-group/ui-library-angular 0.0.0-insider.bc75fdf → 0.0.0-insider.ccdf415

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.
@@ -1,11 +1,13 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, Injectable, inject, Directive, HostListener, Input, EventEmitter, Output, APP_INITIALIZER, NgModule } from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, Injectable, inject, Directive, HostListener, Input, EventEmitter, Output, Optional, APP_INITIALIZER, NgModule } from '@angular/core';
3
3
  import { __decorate } from 'tslib';
4
4
  import { fromEvent } from 'rxjs';
5
5
  import { defineCustomElements } from '@six-group/ui-library/loader';
6
6
  import * as i1 from '@angular/forms';
7
7
  import { NgControl, NG_VALUE_ACCESSOR, FormControl, FormGroup, FormArray, NG_VALIDATORS, Validators } from '@angular/forms';
8
8
  import { getErrorMessage } from '@six-group/ui-library';
9
+ import * as i1$1 from '@angular/common';
10
+ import * as i2 from '@angular/router';
9
11
 
10
12
  /* eslint-disable */
11
13
  /* tslint:disable */
@@ -19,6 +21,14 @@ const proxyInputs = (Cmp, inputs) => {
19
21
  set(val) {
20
22
  this.z.runOutsideAngular(() => (this.el[item] = val));
21
23
  },
24
+ /**
25
+ * In the event that proxyInputs is called
26
+ * multiple times re-defining these inputs
27
+ * will cause an error to be thrown. As a result
28
+ * we set configurable: true to indicate these
29
+ * properties can be changed.
30
+ */
31
+ configurable: true,
22
32
  });
23
33
  });
24
34
  };
@@ -1050,10 +1060,10 @@ let SixSidebarItem = class SixSidebarItem {
1050
1060
  }
1051
1061
  };
1052
1062
  SixSidebarItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixSidebarItem, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
1053
- SixSidebarItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixSidebarItem, selector: "six-sidebar-item", inputs: { disabled: "disabled", selected: "selected", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1063
+ SixSidebarItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixSidebarItem, selector: "six-sidebar-item", inputs: { disabled: "disabled", href: "href", selected: "selected", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1054
1064
  SixSidebarItem = __decorate([
1055
1065
  ProxyCmp({
1056
- inputs: ['disabled', 'selected', 'value']
1066
+ inputs: ['disabled', 'href', 'selected', 'value']
1057
1067
  })
1058
1068
  ], SixSidebarItem);
1059
1069
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixSidebarItem, decorators: [{
@@ -1063,7 +1073,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1063
1073
  changeDetection: ChangeDetectionStrategy.OnPush,
1064
1074
  template: '<ng-content></ng-content>',
1065
1075
  // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
1066
- inputs: ['disabled', 'selected', 'value'],
1076
+ inputs: ['disabled', 'href', 'selected', 'value'],
1067
1077
  }]
1068
1078
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
1069
1079
  let SixSidebarItemGroup = class SixSidebarItemGroup {
@@ -1074,10 +1084,10 @@ let SixSidebarItemGroup = class SixSidebarItemGroup {
1074
1084
  }
1075
1085
  };
1076
1086
  SixSidebarItemGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixSidebarItemGroup, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
1077
- SixSidebarItemGroup.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixSidebarItemGroup, selector: "six-sidebar-item-group", inputs: { icon: "icon", name: "name", open: "open", summaryIcon: "summaryIcon", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1087
+ SixSidebarItemGroup.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SixSidebarItemGroup, selector: "six-sidebar-item-group", inputs: { href: "href", icon: "icon", name: "name", open: "open", summaryIcon: "summaryIcon", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1078
1088
  SixSidebarItemGroup = __decorate([
1079
1089
  ProxyCmp({
1080
- inputs: ['icon', 'name', 'open', 'summaryIcon', 'value']
1090
+ inputs: ['href', 'icon', 'name', 'open', 'summaryIcon', 'value']
1081
1091
  })
1082
1092
  ], SixSidebarItemGroup);
1083
1093
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixSidebarItemGroup, decorators: [{
@@ -1087,7 +1097,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1087
1097
  changeDetection: ChangeDetectionStrategy.OnPush,
1088
1098
  template: '<ng-content></ng-content>',
1089
1099
  // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
1090
- inputs: ['icon', 'name', 'open', 'summaryIcon', 'value'],
1100
+ inputs: ['href', 'icon', 'name', 'open', 'summaryIcon', 'value'],
1091
1101
  }]
1092
1102
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
1093
1103
  let SixSpinner = class SixSpinner {
@@ -2162,6 +2172,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2162
2172
  args: ['change', ['$event.target']]
2163
2173
  }] } });
2164
2174
 
2175
+ /**
2176
+ * Forked from https://github.com/ionic-team/ionic-framework/blob/main/packages/angular/common/src/directives/navigation/router-link-delegate.ts.
2177
+ */
2178
+ class SixRouterLinkDirective {
2179
+ constructor(locationStrategy, elementRef, router, routerLinkDirective) {
2180
+ this.locationStrategy = locationStrategy;
2181
+ this.elementRef = elementRef;
2182
+ this.router = router;
2183
+ this.routerLinkDirective = routerLinkDirective;
2184
+ }
2185
+ ngOnInit() {
2186
+ this.updateTargetUrlAndHref();
2187
+ }
2188
+ ngOnChanges() {
2189
+ this.updateTargetUrlAndHref();
2190
+ }
2191
+ updateTargetUrlAndHref() {
2192
+ if (this.routerLinkDirective?.urlTree) {
2193
+ this.elementRef.nativeElement.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.routerLinkDirective.urlTree));
2194
+ }
2195
+ }
2196
+ }
2197
+ SixRouterLinkDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixRouterLinkDirective, deps: [{ token: i1$1.LocationStrategy }, { token: i0.ElementRef }, { token: i2.Router }, { token: i2.RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
2198
+ SixRouterLinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SixRouterLinkDirective, selector: "six-sidebar-item[routerLink],six-sidebar-item-group[routerLink],six-button[routerLink]", inputs: { routerLink: "routerLink", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", relativeTo: "relativeTo" }, usesOnChanges: true, ngImport: i0 });
2199
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SixRouterLinkDirective, decorators: [{
2200
+ type: Directive,
2201
+ args: [{
2202
+ selector: 'six-sidebar-item[routerLink],six-sidebar-item-group[routerLink],six-button[routerLink]',
2203
+ }]
2204
+ }], ctorParameters: function () { return [{ type: i1$1.LocationStrategy }, { type: i0.ElementRef }, { type: i2.Router }, { type: i2.RouterLink, decorators: [{
2205
+ type: Optional
2206
+ }] }]; }, propDecorators: { routerLink: [{
2207
+ type: Input
2208
+ }], queryParams: [{
2209
+ type: Input
2210
+ }], fragment: [{
2211
+ type: Input
2212
+ }], queryParamsHandling: [{
2213
+ type: Input
2214
+ }], relativeTo: [{
2215
+ type: Input
2216
+ }] } });
2217
+
2165
2218
  class UiLibraryAngularModule {
2166
2219
  static forRoot(customValidationMessagesService) {
2167
2220
  return {
@@ -2197,7 +2250,9 @@ UiLibraryAngularModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
2197
2250
  AllowedDatesValidator,
2198
2251
  // form helpers
2199
2252
  SixFormDirective,
2200
- SixFormUtilDirective], exports: [SetAttributes, SixAlert, SixAvatar, SixBadge, SixButton, SixCard, SixCheckbox, SixDatepicker, SixDetails, SixDialog, SixDrawer, SixDropdown, SixError, SixErrorPage, SixFileList, SixFileListItem, SixFileUpload, SixFooter, SixGroupLabel, SixHeader, SixIcon, SixIconButton, SixInput, SixItemPicker, SixLanguageSwitcher, SixLayoutGrid, SixMainContainer, SixMenu, SixMenuDivider, SixMenuItem, SixMenuLabel, SixPicto, SixProgressBar, SixProgressRing, SixRadio, SixRange, SixRoot, SixSearchField, SixSelect, SixSidebar, SixSidebarItem, SixSidebarItemGroup, SixSpinner, SixStageIndicator, SixSwitch, SixTab, SixTabGroup, SixTabPanel, SixTag, SixTextarea, SixTile, SixTimepicker, SixTooltip,
2253
+ SixFormUtilDirective,
2254
+ // router link directive
2255
+ SixRouterLinkDirective], exports: [SetAttributes, SixAlert, SixAvatar, SixBadge, SixButton, SixCard, SixCheckbox, SixDatepicker, SixDetails, SixDialog, SixDrawer, SixDropdown, SixError, SixErrorPage, SixFileList, SixFileListItem, SixFileUpload, SixFooter, SixGroupLabel, SixHeader, SixIcon, SixIconButton, SixInput, SixItemPicker, SixLanguageSwitcher, SixLayoutGrid, SixMainContainer, SixMenu, SixMenuDivider, SixMenuItem, SixMenuLabel, SixPicto, SixProgressBar, SixProgressRing, SixRadio, SixRange, SixRoot, SixSearchField, SixSelect, SixSidebar, SixSidebarItem, SixSidebarItemGroup, SixSpinner, SixStageIndicator, SixSwitch, SixTab, SixTabGroup, SixTabPanel, SixTag, SixTextarea, SixTile, SixTimepicker, SixTooltip,
2201
2256
  // value accessors
2202
2257
  TextValueAccessor,
2203
2258
  NumericValueAccessor,
@@ -2216,7 +2271,9 @@ UiLibraryAngularModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
2216
2271
  AllowedDatesValidator,
2217
2272
  // form helpers
2218
2273
  SixFormDirective,
2219
- SixFormUtilDirective] });
2274
+ SixFormUtilDirective,
2275
+ // router link directive
2276
+ SixRouterLinkDirective] });
2220
2277
  UiLibraryAngularModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UiLibraryAngularModule });
2221
2278
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UiLibraryAngularModule, decorators: [{
2222
2279
  type: NgModule,
@@ -2243,6 +2300,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2243
2300
  // form helpers
2244
2301
  SixFormDirective,
2245
2302
  SixFormUtilDirective,
2303
+ // router link directive
2304
+ SixRouterLinkDirective,
2246
2305
  ],
2247
2306
  imports: [],
2248
2307
  exports: [
@@ -2267,6 +2326,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2267
2326
  // form helpers
2268
2327
  SixFormDirective,
2269
2328
  SixFormUtilDirective,
2329
+ // router link directive
2330
+ SixRouterLinkDirective,
2270
2331
  ],
2271
2332
  }]
2272
2333
  }] });
@@ -2279,5 +2340,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2279
2340
  * Generated bundle index. Do not edit.
2280
2341
  */
2281
2342
 
2282
- export { AllowedDatesValidator, CheckboxValueAccessor, DIRECTIVES, DatepickerValueAccessor, MaxDateValidator, MaxValidator, MinDateValidator, MinValidator, NumericValueAccessor, RadioValueAccessor, RangeValueAccessor, SelectValueAccessor, SetAttributes, SixAlert, SixAvatar, SixBadge, SixButton, SixCard, SixCheckbox, SixDatepicker, SixDetails, SixDialog, SixDrawer, SixDropdown, SixError, SixErrorPage, SixFileList, SixFileListItem, SixFileUpload, SixFooter, SixFormDirective, SixFormUtilDirective, SixGroupLabel, SixHeader, SixIcon, SixIconButton, SixInput, SixItemPicker, SixLanguageSwitcher, SixLayoutGrid, SixMainContainer, SixMenu, SixMenuDivider, SixMenuItem, SixMenuLabel, SixPicto, SixProgressBar, SixProgressRing, SixRadio, SixRange, SixRoot, SixSearchField, SixSelect, SixSidebar, SixSidebarItem, SixSidebarItemGroup, SixSpinner, SixStageIndicator, SixSwitch, SixTab, SixTabGroup, SixTabPanel, SixTag, SixTextarea, SixTile, SixTimepicker, SixTooltip, SixUiLibraryValidators, SwitchValueAccessor, TextValueAccessor, TimepickerValueAccessor, UiLibraryAngularModule, ValidationMessagesService, ValueAccessor };
2343
+ export { AllowedDatesValidator, CheckboxValueAccessor, DIRECTIVES, DatepickerValueAccessor, MaxDateValidator, MaxValidator, MinDateValidator, MinValidator, NumericValueAccessor, RadioValueAccessor, RangeValueAccessor, SelectValueAccessor, SetAttributes, SixAlert, SixAvatar, SixBadge, SixButton, SixCard, SixCheckbox, SixDatepicker, SixDetails, SixDialog, SixDrawer, SixDropdown, SixError, SixErrorPage, SixFileList, SixFileListItem, SixFileUpload, SixFooter, SixFormDirective, SixFormUtilDirective, SixGroupLabel, SixHeader, SixIcon, SixIconButton, SixInput, SixItemPicker, SixLanguageSwitcher, SixLayoutGrid, SixMainContainer, SixMenu, SixMenuDivider, SixMenuItem, SixMenuLabel, SixPicto, SixProgressBar, SixProgressRing, SixRadio, SixRange, SixRoot, SixRouterLinkDirective, SixSearchField, SixSelect, SixSidebar, SixSidebarItem, SixSidebarItemGroup, SixSpinner, SixStageIndicator, SixSwitch, SixTab, SixTabGroup, SixTabPanel, SixTag, SixTextarea, SixTile, SixTimepicker, SixTooltip, SixUiLibraryValidators, SwitchValueAccessor, TextValueAccessor, TimepickerValueAccessor, UiLibraryAngularModule, ValidationMessagesService, ValueAccessor };
2283
2344
  //# sourceMappingURL=six-group-ui-library-angular.mjs.map