@inspark/inspark-components 19.0.22 → 19.0.23

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,9 +1,10 @@
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';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class DropdownComponent implements ControlValueAccessor, AfterContentInit {
6
- templates: QueryList<TemplateRef<any>>;
7
+ templates: QueryList<PrimeTemplate>;
7
8
  itemTemplate: TemplateRef<any> | null;
8
9
  selectedItemTemplate: TemplateRef<any> | null;
9
10
  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,qBAaa,iBAAkB,YAAW,oBAAoB,EAAE,gBAAgB;IAEhD,SAAS,EAAE,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;IAGrE,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,M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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,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;IAalB,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;yCApGF,iBAAiB;2CAAjB,iBAAiB;CAwG7B"}
@@ -2,9 +2,10 @@ 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";
5
6
  export declare class DropdownComponentModule {
6
7
  static ɵfac: i0.ɵɵFactoryDeclaration<DropdownComponentModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<DropdownComponentModule, [typeof i1.DropdownComponent], [typeof i2.SharedUiModule, typeof i3.SelectModule], [typeof i1.DropdownComponent]>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DropdownComponentModule, [typeof i1.DropdownComponent], [typeof i2.SharedUiModule, typeof i3.SelectModule, typeof i4.SharedModule], [typeof i1.DropdownComponent, typeof i4.SharedModule]>;
8
9
  static ɵinj: i0.ɵɵInjectorDeclaration<DropdownComponentModule>;
9
10
  }
10
11
  //# 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":";;;;AAQA,qBAYa,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":";;;;;AASA,qBAca,uBAAuB;yCAAvB,uBAAuB;0CAAvB,uBAAuB;0CAAvB,uBAAuB;CAAG"}
@@ -1,11 +1,12 @@
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, TemplateRef, CUSTOM_ELEMENTS_SCHEMA } 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';
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';
9
10
  export { SharedModule } from 'primeng/api';
10
11
  import * as i1$4 from 'primeng/dynamicdialog';
11
12
  import { DynamicDialogRef, DynamicDialogComponent } from 'primeng/dynamicdialog';
@@ -6222,7 +6223,6 @@ function DropdownComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
6222
6223
  } }
6223
6224
  class DropdownComponent {
6224
6225
  constructor() {
6225
- // Хранилище для найденных шаблонов
6226
6226
  this.itemTemplate = null;
6227
6227
  this.selectedItemTemplate = null;
6228
6228
  this.options = [];
@@ -6255,41 +6255,14 @@ class DropdownComponent {
6255
6255
  return this.filterBy ?? this.optionLabel;
6256
6256
  }
6257
6257
  ngAfterContentInit() {
6258
- this.templates.forEach((template, index) => {
6259
- const templateRef = template;
6260
- const tContainer = templateRef._declarationTContainer;
6261
- const attrs = tContainer?.attrs;
6262
- if (attrs && Array.isArray(attrs)) {
6263
- for (let i = 0; i < attrs.length; i++) {
6264
- if (attrs[i] === 'pTemplate' && attrs[i + 1]) {
6265
- const templateName = attrs[i + 1];
6266
- if (templateName === 'item') {
6267
- this.itemTemplate = template;
6268
- }
6269
- else if (templateName === 'selectedItem') {
6270
- this.selectedItemTemplate = template;
6271
- }
6272
- break;
6273
- }
6274
- }
6275
- }
6276
- else {
6277
- const viewContainer = templateRef;
6278
- if (viewContainer._declarationTContainer?.value?.attrs) {
6279
- const valueAttrs = viewContainer._declarationTContainer.value.attrs;
6280
- for (let i = 0; i < valueAttrs.length; i++) {
6281
- if (valueAttrs[i]?.name === 'pTemplate' && valueAttrs[i]?.value) {
6282
- const templateName = valueAttrs[i].value;
6283
- if (templateName === 'item') {
6284
- this.itemTemplate = template;
6285
- }
6286
- else if (templateName === 'selectedItem') {
6287
- this.selectedItemTemplate = template;
6288
- }
6289
- break;
6290
- }
6291
- }
6292
- }
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;
6293
6266
  }
6294
6267
  });
6295
6268
  }
@@ -6332,7 +6305,7 @@ class DropdownComponent {
6332
6305
  }
6333
6306
  static { this.ɵfac = function DropdownComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DropdownComponent)(); }; }
6334
6307
  static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DropdownComponent, selectors: [["in-dropdown"]], contentQueries: function DropdownComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
6335
- i0.ɵɵcontentQuery(dirIndex, TemplateRef, 4);
6308
+ i0.ɵɵcontentQuery(dirIndex, PrimeTemplate, 4);
6336
6309
  } if (rf & 2) {
6337
6310
  let _t;
6338
6311
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templates = _t);
@@ -6370,7 +6343,7 @@ class DropdownComponent {
6370
6343
  ], 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"] }]
6371
6344
  }], null, { templates: [{
6372
6345
  type: ContentChildren,
6373
- args: [TemplateRef]
6346
+ args: [PrimeTemplate]
6374
6347
  }], dropdown: [{
6375
6348
  type: ViewChild,
6376
6349
  args: ['dropdown']
@@ -6423,13 +6396,14 @@ class DropdownComponent {
6423
6396
  }], onBlur: [{
6424
6397
  type: Output
6425
6398
  }] }); })();
6426
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DropdownComponent, { className: "DropdownComponent", filePath: "components/dropdown/dropdown.component.ts", lineNumber: 38 }); })();
6399
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DropdownComponent, { className: "DropdownComponent", filePath: "components/dropdown/dropdown.component.ts", lineNumber: 40 }); })();
6427
6400
 
6428
6401
  class DropdownComponentModule {
6429
6402
  static { this.ɵfac = function DropdownComponentModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DropdownComponentModule)(); }; }
6430
6403
  static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: DropdownComponentModule }); }
6431
6404
  static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [SharedUiModule,
6432
- SelectModule] }); }
6405
+ SelectModule,
6406
+ SharedModule, SharedModule] }); }
6433
6407
  }
6434
6408
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DropdownComponentModule, [{
6435
6409
  type: NgModule,
@@ -6439,15 +6413,19 @@ class DropdownComponentModule {
6439
6413
  ],
6440
6414
  imports: [
6441
6415
  SharedUiModule,
6442
- SelectModule
6416
+ SelectModule,
6417
+ SharedModule
6443
6418
  ],
6444
6419
  exports: [
6445
- DropdownComponent
6420
+ DropdownComponent,
6421
+ SharedModule
6446
6422
  ]
6447
6423
  }]
6448
6424
  }], null, null); })();
6449
6425
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(DropdownComponentModule, { declarations: [DropdownComponent], imports: [SharedUiModule,
6450
- SelectModule], exports: [DropdownComponent] }); })();
6426
+ SelectModule,
6427
+ SharedModule], exports: [DropdownComponent,
6428
+ SharedModule] }); })();
6451
6429
 
6452
6430
  class InsparkComponentsModule {
6453
6431
  static { this.ɵfac = function InsparkComponentsModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || InsparkComponentsModule)(); }; }