@inspark/inspark-components 19.0.23 → 19.0.25

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,10 +1,9 @@
1
1
  import { EventEmitter, AfterContentInit, TemplateRef, QueryList } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
3
  import { Select, SelectChangeEvent, SelectFilterEvent } from 'primeng/select';
4
- import { PrimeTemplate } from 'primeng/api';
5
4
  import * as i0 from "@angular/core";
6
5
  export declare class DropdownComponent implements ControlValueAccessor, AfterContentInit {
7
- templates: QueryList<PrimeTemplate>;
6
+ templates: QueryList<TemplateRef<any>>;
8
7
  itemTemplate: TemplateRef<any> | null;
9
8
  selectedItemTemplate: TemplateRef<any> | null;
10
9
  dropdown: Select;
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.component.d.ts","sourceRoot":"","sources":["../../../../../projects/inspark-components/src/components/dropdown/dropdown.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAKZ,gBAAgB,EAChB,WAAW,EAEX,SAAS,EACV,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,oBAAoB,EAErB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;;AAE5C,qBAaa,iBAAkB,YAAW,oBAAoB,EAAE,gBAAgB;IAC9C,SAAS,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;IAEpE,YAAY,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI,CAAQ;IAC7C,oBAAoB,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI,CAAQ;IAE9B,QAAQ,EAAG,MAAM,CAAC;IAEhC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,GAAG,EAAE,CAAM;IACpB,WAAW,SAAM;IACjB,W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2CAAjB,iBAAiB;CAwG7B"}
1
+ {"version":3,"file":"dropdown.component.d.ts","sourceRoot":"","sources":["../../../../../projects/inspark-components/src/components/dropdown/dropdown.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAKZ,gBAAgB,EAChB,WAAW,EAEX,SAAS,EACV,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,oBAAoB,EAErB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;;AAExB,qBAaa,iBAAkB,YAAW,oBAAoB,EAAE,gBAAgB;IAChD,SAAS,EAAE,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;IAErE,YAAY,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI,CAAQ;IAC7C,oBAAoB,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI,CAAQ;IAE9B,QAAQ,EAAG,MAAM,CAAC;IAEhC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,GAAG,EAAE,CAAM;IACpB,WAAW,SAAM;IACjB,WAAW,SAAW;IACtB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAa;IAC5C,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM,UAAS;IACf,SAAS,UAAS;IAClB,QAAQ,UAAS;IACjB,QAAQ,EAAE,GAAG,CAAU;IACvB,QAAQ,UAAS;IACjB,aAAa,UAAS;IACtB,qBAAqB,SAAM;IAC3B,OAAO,UAAS;IAChB,gBAAgB,UAAS;IACzB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAa;IAElD,IAAI,iBAAiB,IAAI,MAAM,CAE9B;IAEQ,eAAe,EAAE,QAAQ,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,GAAG,IAAI,GAAG,WAAW,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,CAAc;IACnI,YAAY,SAAsB;IAEjC,QAAQ,oBAA2B;IACnC,QAAQ,oBAA2B;IACnC,MAAM,qBAA4B;IAClC,MAAM,qBAA4B;IAClC,OAAO,oBAA2B;IAClC,MAAM,oBAA2B;IAE3C,KAAK,EAAE,GAAG,CAAQ;IAElB,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,cAAc,CAAY;IAElC,kBAAkB;IAsClB,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI;IAI5B,gBAAgB,CAAC,EAAE,EAAE,GAAG,GAAG,IAAI;IAI/B,iBAAiB,CAAC,EAAE,EAAE,GAAG,GAAG,IAAI;IAIhC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAIzC,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;IAM5C,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;IAI5C,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI;IAK5B,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,IAAI;IAIZ,IAAI,IAAI,IAAI;IAIZ,KAAK,IAAI,IAAI;yCA7HF,iBAAiB;2CAAjB,iBAAiB;CAiI7B"}
@@ -2,10 +2,9 @@ import * as i0 from "@angular/core";
2
2
  import * as i1 from "./dropdown.component";
3
3
  import * as i2 from "../shared/shared-ui.module";
4
4
  import * as i3 from "primeng/select";
5
- import * as i4 from "primeng/api";
6
5
  export declare class DropdownComponentModule {
7
6
  static ɵfac: i0.ɵɵFactoryDeclaration<DropdownComponentModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<DropdownComponentModule, [typeof i1.DropdownComponent], [typeof i2.SharedUiModule, typeof i3.SelectModule, typeof i4.SharedModule], [typeof i1.DropdownComponent, typeof i4.SharedModule]>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DropdownComponentModule, [typeof i1.DropdownComponent], [typeof i2.SharedUiModule, typeof i3.SelectModule], [typeof i1.DropdownComponent]>;
9
8
  static ɵinj: i0.ɵɵInjectorDeclaration<DropdownComponentModule>;
10
9
  }
11
10
  //# sourceMappingURL=dropdown.module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.module.d.ts","sourceRoot":"","sources":["../../../../../projects/inspark-components/src/components/dropdown/dropdown.module.ts"],"names":[],"mappings":";;;;;AASA,qBAca,uBAAuB;yCAAvB,uBAAuB;0CAAvB,uBAAuB;0CAAvB,uBAAuB;CAAG"}
1
+ {"version":3,"file":"dropdown.module.d.ts","sourceRoot":"","sources":["../../../../../projects/inspark-components/src/components/dropdown/dropdown.module.ts"],"names":[],"mappings":";;;;AAQA,qBAYa,uBAAuB;yCAAvB,uBAAuB;0CAAvB,uBAAuB;0CAAvB,uBAAuB;CAAG"}
@@ -1,12 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Pipe, NgModule, Injectable, createComponent, Component, Directive, Input, EventEmitter, HostListener, Output, ChangeDetectionStrategy, ViewChild, ContentChildren, ViewEncapsulation, forwardRef, HostBinding, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2
+ import { Pipe, NgModule, Injectable, createComponent, Component, Directive, Input, EventEmitter, HostListener, Output, ChangeDetectionStrategy, ViewChild, ContentChildren, ViewEncapsulation, forwardRef, HostBinding, TemplateRef, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
3
3
  import * as i1 from '@ngx-translate/core';
4
4
  import { TranslateModule } from '@ngx-translate/core';
5
5
  export { TranslateModule } from '@ngx-translate/core';
6
6
  import * as i1$1 from '@angular/platform-browser';
7
7
  import { marker } from '@biesbjerg/ngx-translate-extract-marker';
8
8
  import * as i2 from 'primeng/api';
9
- import { PrimeTemplate, SharedModule } from 'primeng/api';
10
9
  export { SharedModule } from 'primeng/api';
11
10
  import * as i1$4 from 'primeng/dynamicdialog';
12
11
  import { DynamicDialogRef, DynamicDialogComponent } from 'primeng/dynamicdialog';
@@ -6255,14 +6254,41 @@ class DropdownComponent {
6255
6254
  return this.filterBy ?? this.optionLabel;
6256
6255
  }
6257
6256
  ngAfterContentInit() {
6258
- this.templates.forEach((pt) => {
6259
- switch (pt.getType()) {
6260
- case 'item':
6261
- this.itemTemplate = pt.template;
6262
- break;
6263
- case 'selectedItem':
6264
- this.selectedItemTemplate = pt.template;
6265
- break;
6257
+ this.templates.forEach((template) => {
6258
+ const templateRef = template;
6259
+ const tContainer = templateRef._declarationTContainer;
6260
+ const attrs = tContainer?.attrs;
6261
+ if (attrs && Array.isArray(attrs)) {
6262
+ for (let i = 0; i < attrs.length; i++) {
6263
+ if (attrs[i] === 'pTemplate' && attrs[i + 1]) {
6264
+ const templateName = attrs[i + 1];
6265
+ if (templateName === 'item') {
6266
+ this.itemTemplate = template;
6267
+ }
6268
+ else if (templateName === 'selectedItem') {
6269
+ this.selectedItemTemplate = template;
6270
+ }
6271
+ break;
6272
+ }
6273
+ }
6274
+ }
6275
+ else {
6276
+ const viewContainer = templateRef;
6277
+ if (viewContainer._declarationTContainer?.value?.attrs) {
6278
+ const valueAttrs = viewContainer._declarationTContainer.value.attrs;
6279
+ for (let i = 0; i < valueAttrs.length; i++) {
6280
+ if (valueAttrs[i]?.name === 'pTemplate' && valueAttrs[i]?.value) {
6281
+ const templateName = valueAttrs[i].value;
6282
+ if (templateName === 'item') {
6283
+ this.itemTemplate = template;
6284
+ }
6285
+ else if (templateName === 'selectedItem') {
6286
+ this.selectedItemTemplate = template;
6287
+ }
6288
+ break;
6289
+ }
6290
+ }
6291
+ }
6266
6292
  }
6267
6293
  });
6268
6294
  }
@@ -6305,7 +6331,7 @@ class DropdownComponent {
6305
6331
  }
6306
6332
  static { this.ɵfac = function DropdownComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DropdownComponent)(); }; }
6307
6333
  static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DropdownComponent, selectors: [["in-dropdown"]], contentQueries: function DropdownComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
6308
- i0.ɵɵcontentQuery(dirIndex, PrimeTemplate, 4);
6334
+ i0.ɵɵcontentQuery(dirIndex, TemplateRef, 4);
6309
6335
  } if (rf & 2) {
6310
6336
  let _t;
6311
6337
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templates = _t);
@@ -6343,7 +6369,7 @@ class DropdownComponent {
6343
6369
  ], template: "<p-select\r\n #dropdown\r\n [options]=\"options\"\r\n [placeholder]=\"placeholder\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n [dataKey]=\"dataKey\"\r\n [filter]=\"filter\"\r\n [filterBy]=\"effectiveFilterBy\"\r\n [filterMatchMode]=\"filterMatchMode\"\r\n [showClear]=\"showClear\"\r\n [disabled]=\"disabled\"\r\n [appendTo]=\"appendTo\"\r\n [editable]=\"editable\"\r\n [virtualScroll]=\"virtualScroll\"\r\n [virtualScrollItemSize]=\"virtualScrollItemSize\"\r\n [loading]=\"loading\"\r\n [autoDisplayFirst]=\"autoDisplayFirst\"\r\n [emptyMessage]=\"emptyMessage\"\r\n [styleClass]=\"styleClass\"\r\n [(ngModel)]=\"value\"\r\n (onChange)=\"handleChange($event)\"\r\n (onFilter)=\"handleFilter($event)\"\r\n (onShow)=\"onShow.emit()\"\r\n (onHide)=\"onHide.emit()\"\r\n (onFocus)=\"onFocus.emit($event)\"\r\n (onBlur)=\"handleBlur($event)\"\r\n (onClear)=\"$event.stopPropagation()\"\r\n>\r\n <ng-template pTemplate=\"selectedItem\" let-item>\r\n <ng-container *ngIf=\"selectedItemTemplate; else defaultSelected\">\r\n <ng-container *ngTemplateOutlet=\"selectedItemTemplate; context: {$implicit: item}\"></ng-container>\r\n </ng-container>\r\n <ng-template #defaultSelected>{{ item?.[optionLabel] }}</ng-template>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"item\" let-item>\r\n <ng-container *ngIf=\"itemTemplate; else defaultItem\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: {$implicit: item}\"></ng-container>\r\n </ng-container>\r\n <ng-template #defaultItem>{{ item?.[optionLabel] }}</ng-template>\r\n </ng-template>\r\n</p-select>\r\n", styles: [".in-dropdown{width:100%;margin-bottom:0}\n"] }]
6344
6370
  }], null, { templates: [{
6345
6371
  type: ContentChildren,
6346
- args: [PrimeTemplate]
6372
+ args: [TemplateRef]
6347
6373
  }], dropdown: [{
6348
6374
  type: ViewChild,
6349
6375
  args: ['dropdown']
@@ -6396,14 +6422,13 @@ class DropdownComponent {
6396
6422
  }], onBlur: [{
6397
6423
  type: Output
6398
6424
  }] }); })();
6399
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DropdownComponent, { className: "DropdownComponent", filePath: "components/dropdown/dropdown.component.ts", lineNumber: 40 }); })();
6425
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DropdownComponent, { className: "DropdownComponent", filePath: "components/dropdown/dropdown.component.ts", lineNumber: 38 }); })();
6400
6426
 
6401
6427
  class DropdownComponentModule {
6402
6428
  static { this.ɵfac = function DropdownComponentModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DropdownComponentModule)(); }; }
6403
6429
  static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: DropdownComponentModule }); }
6404
6430
  static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [SharedUiModule,
6405
- SelectModule,
6406
- SharedModule, SharedModule] }); }
6431
+ SelectModule] }); }
6407
6432
  }
6408
6433
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DropdownComponentModule, [{
6409
6434
  type: NgModule,
@@ -6413,19 +6438,15 @@ class DropdownComponentModule {
6413
6438
  ],
6414
6439
  imports: [
6415
6440
  SharedUiModule,
6416
- SelectModule,
6417
- SharedModule
6441
+ SelectModule
6418
6442
  ],
6419
6443
  exports: [
6420
- DropdownComponent,
6421
- SharedModule
6444
+ DropdownComponent
6422
6445
  ]
6423
6446
  }]
6424
6447
  }], null, null); })();
6425
6448
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(DropdownComponentModule, { declarations: [DropdownComponent], imports: [SharedUiModule,
6426
- SelectModule,
6427
- SharedModule], exports: [DropdownComponent,
6428
- SharedModule] }); })();
6449
+ SelectModule], exports: [DropdownComponent] }); })();
6429
6450
 
6430
6451
  class InsparkComponentsModule {
6431
6452
  static { this.ɵfac = function InsparkComponentsModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || InsparkComponentsModule)(); }; }