@pumpkin-tech/pumpkin-tech-ng 0.2.17 → 0.2.18

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.
@@ -5216,22 +5216,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
5216
5216
 
5217
5217
  class ProfileMenuComponent {
5218
5218
  icon = 'account_circle';
5219
+ flagCode;
5220
+ flagSize = 20;
5221
+ flagSquared = false;
5222
+ flagAriaLabel;
5219
5223
  displayName = '';
5220
5224
  items = [];
5221
5225
  handle(item) {
5222
5226
  item.action();
5223
5227
  }
5224
5228
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ProfileMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5225
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: ProfileMenuComponent, isStandalone: true, selector: "ptech-profile-menu", inputs: { icon: "icon", displayName: "displayName", items: "items" }, ngImport: i0, template: `
5229
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: ProfileMenuComponent, isStandalone: true, selector: "ptech-profile-menu", inputs: { icon: "icon", flagCode: "flagCode", flagSize: "flagSize", flagSquared: "flagSquared", flagAriaLabel: "flagAriaLabel", displayName: "displayName", items: "items" }, ngImport: i0, template: `
5226
5230
  <div class="profile-menu" [matMenuTriggerFor]="menu" aria-label="Profile menu">
5227
- <mat-icon aria-hidden="true"> {{ icon }}</mat-icon>
5231
+ <ptech-flag
5232
+ *ngIf="flagCode; else triggerIcon"
5233
+ class="profile-trigger-flag"
5234
+ [code]="flagCode"
5235
+ [size]="flagSize"
5236
+ [squared]="flagSquared"
5237
+ [ariaLabel]="flagAriaLabel || 'Profile menu flag'"
5238
+ ></ptech-flag>
5239
+ <ng-template #triggerIcon>
5240
+ <mat-icon aria-hidden="true"> {{ icon }}</mat-icon>
5241
+ </ng-template>
5228
5242
  <span class="hide-on-mobile">{{ displayName | getFirstStringBeforeSpace }}</span>
5229
5243
  <mat-icon>arrow_drop_down</mat-icon>
5230
5244
  </div>
5231
5245
 
5232
5246
  <mat-menu #menu="matMenu" class="ptech-profile-menu-panel">
5233
5247
  <button mat-menu-item class="show-on-mobile user-item" disabled>
5234
- <mat-icon aria-hidden="true"> {{ icon }}</mat-icon>
5248
+ <ptech-flag
5249
+ *ngIf="flagCode; else mobileUserIcon"
5250
+ class="profile-menu-flag"
5251
+ [code]="flagCode"
5252
+ [size]="flagSize"
5253
+ [squared]="flagSquared"
5254
+ [ariaLabel]="flagAriaLabel || 'Profile menu flag'"
5255
+ ></ptech-flag>
5256
+ <ng-template #mobileUserIcon>
5257
+ <mat-icon aria-hidden="true"> {{ icon }}</mat-icon>
5258
+ </ng-template>
5235
5259
  <span>{{ displayName | getFirstStringBeforeSpace }}</span>
5236
5260
  </button>
5237
5261
  <mat-divider class="show-on-mobile"></mat-divider>
@@ -5256,20 +5280,40 @@ class ProfileMenuComponent {
5256
5280
 
5257
5281
  <ng-content select="[extra-items]"></ng-content>
5258
5282
  </mat-menu>
5259
- `, isInline: true, styles: [".profile-menu{display:flex;align-items:center;cursor:pointer;position:relative}.profile-menu mat-icon{margin-right:8px;color:var(--ptech-profile-trigger-text, var(--ptech-header-icon-color, var(--app-text-on-accent, #fff)))}.profile-menu span{color:var(--ptech-profile-trigger-text, var(--ptech-header-icon-color, var(--app-text-on-accent, #fff)));font-weight:700;margin-right:4px}.profile-menu mat-icon:last-child{margin-right:0}.mat-divider{margin:0!important}.hide-on-mobile{display:inline}.show-on-mobile{display:none}@media (max-width: 599px){.hide-on-mobile{display:none}.show-on-mobile{display:flex}}.user-item span{font-weight:700}::ng-deep .ptech-profile-menu-panel,::ng-deep .ptech-profile-menu-panel.mat-mdc-menu-panel{background-color:var(--ptech-menu-bg, var(--app-surface, #fff))!important;color:var(--ptech-menu-text, var(--app-text, inherit))!important}::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-content{background-color:var(--ptech-menu-bg, var(--app-surface, #fff))!important;color:var(--ptech-menu-text, var(--app-text, inherit))!important}::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item .mat-icon,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item .mdc-list-item__primary-text,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item span{color:var(--ptech-menu-text, var(--app-text, inherit))!important}::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item:hover,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item.cdk-program-focused,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item.cdk-focused{background-color:var(--ptech-menu-hover, var(--app-chip-bg, rgba(0,0,0,.06)))!important}::ng-deep .ptech-profile-menu-panel .mat-divider,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item+.mat-divider{border-top-color:var(--ptech-menu-divider, var(--app-border-color, rgba(0,0,0,.12)))!important}::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item[disabled],::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item[disabled] .mat-icon,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item[disabled] span{color:var(--ptech-menu-disabled, var(--app-muted, #9ca3af))!important;opacity:1!important}::ng-deep .ptech-profile-menu-panel .profile-menu-flag{width:var(--mat-menu-item-leading-spacing, 24px);min-width:var(--mat-menu-item-leading-spacing, 24px);margin-right:var(--mat-menu-item-spacing, 16px);justify-content:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: CoreMaterialModule }, { kind: "component", type: i5$2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i4$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: FlagComponent, selector: "ptech-flag", inputs: ["code", "size", "squared", "tooltip", "label", "ariaLabel", "clickable", "col"], outputs: ["flagClick"] }, { kind: "pipe", type: GetFirstStringBeforeSpacePipe, name: "getFirstStringBeforeSpace" }] });
5283
+ `, isInline: true, styles: [".profile-menu{display:flex;align-items:center;cursor:pointer;position:relative}.profile-menu mat-icon{margin-right:8px;color:var(--ptech-profile-trigger-text, var(--ptech-header-icon-color, var(--app-text-on-accent, #fff)))}.profile-menu span{color:var(--ptech-profile-trigger-text, var(--ptech-header-icon-color, var(--app-text-on-accent, #fff)));font-weight:700;margin-right:4px}.profile-menu mat-icon:last-child{margin-right:0}.profile-trigger-flag{margin-right:8px;justify-content:center}.mat-divider{margin:0!important}.hide-on-mobile{display:inline}.show-on-mobile{display:none}@media (max-width: 599px){.hide-on-mobile{display:none}.show-on-mobile{display:flex}}.user-item span{font-weight:700}::ng-deep .ptech-profile-menu-panel,::ng-deep .ptech-profile-menu-panel.mat-mdc-menu-panel{background-color:var(--ptech-menu-bg, var(--app-surface, #fff))!important;color:var(--ptech-menu-text, var(--app-text, inherit))!important}::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-content{background-color:var(--ptech-menu-bg, var(--app-surface, #fff))!important;color:var(--ptech-menu-text, var(--app-text, inherit))!important}::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item .mat-icon,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item .mdc-list-item__primary-text,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item span{color:var(--ptech-menu-text, var(--app-text, inherit))!important}::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item:hover,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item.cdk-program-focused,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item.cdk-focused{background-color:var(--ptech-menu-hover, var(--app-chip-bg, rgba(0,0,0,.06)))!important}::ng-deep .ptech-profile-menu-panel .mat-divider,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item+.mat-divider{border-top-color:var(--ptech-menu-divider, var(--app-border-color, rgba(0,0,0,.12)))!important}::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item[disabled],::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item[disabled] .mat-icon,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item[disabled] span{color:var(--ptech-menu-disabled, var(--app-muted, #9ca3af))!important;opacity:1!important}::ng-deep .ptech-profile-menu-panel .profile-menu-flag{width:var(--mat-menu-item-leading-spacing, 24px);min-width:var(--mat-menu-item-leading-spacing, 24px);margin-right:var(--mat-menu-item-spacing, 16px);justify-content:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: CoreMaterialModule }, { kind: "component", type: i5$2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i4$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: FlagComponent, selector: "ptech-flag", inputs: ["code", "size", "squared", "tooltip", "label", "ariaLabel", "clickable", "col"], outputs: ["flagClick"] }, { kind: "pipe", type: GetFirstStringBeforeSpacePipe, name: "getFirstStringBeforeSpace" }] });
5260
5284
  }
5261
5285
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ProfileMenuComponent, decorators: [{
5262
5286
  type: Component,
5263
5287
  args: [{ selector: 'ptech-profile-menu', imports: [CommonModule, CoreMaterialModule, GetFirstStringBeforeSpacePipe, FlagComponent], template: `
5264
5288
  <div class="profile-menu" [matMenuTriggerFor]="menu" aria-label="Profile menu">
5265
- <mat-icon aria-hidden="true"> {{ icon }}</mat-icon>
5289
+ <ptech-flag
5290
+ *ngIf="flagCode; else triggerIcon"
5291
+ class="profile-trigger-flag"
5292
+ [code]="flagCode"
5293
+ [size]="flagSize"
5294
+ [squared]="flagSquared"
5295
+ [ariaLabel]="flagAriaLabel || 'Profile menu flag'"
5296
+ ></ptech-flag>
5297
+ <ng-template #triggerIcon>
5298
+ <mat-icon aria-hidden="true"> {{ icon }}</mat-icon>
5299
+ </ng-template>
5266
5300
  <span class="hide-on-mobile">{{ displayName | getFirstStringBeforeSpace }}</span>
5267
5301
  <mat-icon>arrow_drop_down</mat-icon>
5268
5302
  </div>
5269
5303
 
5270
5304
  <mat-menu #menu="matMenu" class="ptech-profile-menu-panel">
5271
5305
  <button mat-menu-item class="show-on-mobile user-item" disabled>
5272
- <mat-icon aria-hidden="true"> {{ icon }}</mat-icon>
5306
+ <ptech-flag
5307
+ *ngIf="flagCode; else mobileUserIcon"
5308
+ class="profile-menu-flag"
5309
+ [code]="flagCode"
5310
+ [size]="flagSize"
5311
+ [squared]="flagSquared"
5312
+ [ariaLabel]="flagAriaLabel || 'Profile menu flag'"
5313
+ ></ptech-flag>
5314
+ <ng-template #mobileUserIcon>
5315
+ <mat-icon aria-hidden="true"> {{ icon }}</mat-icon>
5316
+ </ng-template>
5273
5317
  <span>{{ displayName | getFirstStringBeforeSpace }}</span>
5274
5318
  </button>
5275
5319
  <mat-divider class="show-on-mobile"></mat-divider>
@@ -5294,9 +5338,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
5294
5338
 
5295
5339
  <ng-content select="[extra-items]"></ng-content>
5296
5340
  </mat-menu>
5297
- `, styles: [".profile-menu{display:flex;align-items:center;cursor:pointer;position:relative}.profile-menu mat-icon{margin-right:8px;color:var(--ptech-profile-trigger-text, var(--ptech-header-icon-color, var(--app-text-on-accent, #fff)))}.profile-menu span{color:var(--ptech-profile-trigger-text, var(--ptech-header-icon-color, var(--app-text-on-accent, #fff)));font-weight:700;margin-right:4px}.profile-menu mat-icon:last-child{margin-right:0}.mat-divider{margin:0!important}.hide-on-mobile{display:inline}.show-on-mobile{display:none}@media (max-width: 599px){.hide-on-mobile{display:none}.show-on-mobile{display:flex}}.user-item span{font-weight:700}::ng-deep .ptech-profile-menu-panel,::ng-deep .ptech-profile-menu-panel.mat-mdc-menu-panel{background-color:var(--ptech-menu-bg, var(--app-surface, #fff))!important;color:var(--ptech-menu-text, var(--app-text, inherit))!important}::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-content{background-color:var(--ptech-menu-bg, var(--app-surface, #fff))!important;color:var(--ptech-menu-text, var(--app-text, inherit))!important}::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item .mat-icon,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item .mdc-list-item__primary-text,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item span{color:var(--ptech-menu-text, var(--app-text, inherit))!important}::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item:hover,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item.cdk-program-focused,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item.cdk-focused{background-color:var(--ptech-menu-hover, var(--app-chip-bg, rgba(0,0,0,.06)))!important}::ng-deep .ptech-profile-menu-panel .mat-divider,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item+.mat-divider{border-top-color:var(--ptech-menu-divider, var(--app-border-color, rgba(0,0,0,.12)))!important}::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item[disabled],::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item[disabled] .mat-icon,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item[disabled] span{color:var(--ptech-menu-disabled, var(--app-muted, #9ca3af))!important;opacity:1!important}::ng-deep .ptech-profile-menu-panel .profile-menu-flag{width:var(--mat-menu-item-leading-spacing, 24px);min-width:var(--mat-menu-item-leading-spacing, 24px);margin-right:var(--mat-menu-item-spacing, 16px);justify-content:center}\n"] }]
5341
+ `, styles: [".profile-menu{display:flex;align-items:center;cursor:pointer;position:relative}.profile-menu mat-icon{margin-right:8px;color:var(--ptech-profile-trigger-text, var(--ptech-header-icon-color, var(--app-text-on-accent, #fff)))}.profile-menu span{color:var(--ptech-profile-trigger-text, var(--ptech-header-icon-color, var(--app-text-on-accent, #fff)));font-weight:700;margin-right:4px}.profile-menu mat-icon:last-child{margin-right:0}.profile-trigger-flag{margin-right:8px;justify-content:center}.mat-divider{margin:0!important}.hide-on-mobile{display:inline}.show-on-mobile{display:none}@media (max-width: 599px){.hide-on-mobile{display:none}.show-on-mobile{display:flex}}.user-item span{font-weight:700}::ng-deep .ptech-profile-menu-panel,::ng-deep .ptech-profile-menu-panel.mat-mdc-menu-panel{background-color:var(--ptech-menu-bg, var(--app-surface, #fff))!important;color:var(--ptech-menu-text, var(--app-text, inherit))!important}::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-content{background-color:var(--ptech-menu-bg, var(--app-surface, #fff))!important;color:var(--ptech-menu-text, var(--app-text, inherit))!important}::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item .mat-icon,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item .mdc-list-item__primary-text,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item span{color:var(--ptech-menu-text, var(--app-text, inherit))!important}::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item:hover,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item.cdk-program-focused,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item.cdk-focused{background-color:var(--ptech-menu-hover, var(--app-chip-bg, rgba(0,0,0,.06)))!important}::ng-deep .ptech-profile-menu-panel .mat-divider,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item+.mat-divider{border-top-color:var(--ptech-menu-divider, var(--app-border-color, rgba(0,0,0,.12)))!important}::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item[disabled],::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item[disabled] .mat-icon,::ng-deep .ptech-profile-menu-panel .mat-mdc-menu-item[disabled] span{color:var(--ptech-menu-disabled, var(--app-muted, #9ca3af))!important;opacity:1!important}::ng-deep .ptech-profile-menu-panel .profile-menu-flag{width:var(--mat-menu-item-leading-spacing, 24px);min-width:var(--mat-menu-item-leading-spacing, 24px);margin-right:var(--mat-menu-item-spacing, 16px);justify-content:center}\n"] }]
5298
5342
  }], propDecorators: { icon: [{
5299
5343
  type: Input
5344
+ }], flagCode: [{
5345
+ type: Input
5346
+ }], flagSize: [{
5347
+ type: Input
5348
+ }], flagSquared: [{
5349
+ type: Input
5350
+ }], flagAriaLabel: [{
5351
+ type: Input
5300
5352
  }], displayName: [{
5301
5353
  type: Input
5302
5354
  }], items: [{