@smartsoft001/angular 2.89.0 → 2.91.0

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.
@@ -19,19 +19,17 @@ import { toSignal, toObservable } from '@angular/core/rxjs-interop';
19
19
  import { __decorate, __metadata } from 'tslib';
20
20
  import { Memoize } from 'lodash-decorators';
21
21
  import { getModelFieldOptions, SYMBOL_MODEL, SYMBOL_FIELD, getModelFieldsWithOptions, FieldType, getModelOptions } from '@smartsoft001/models';
22
- import { DOCUMENT, isPlatformBrowser, NgTemplateOutlet, AsyncPipe, NgComponentOutlet, NgClass, Location, CommonModule, NgOptimizedImage } from '@angular/common';
22
+ import { DOCUMENT, isPlatformBrowser, NgTemplateOutlet, AsyncPipe, NgComponentOutlet, NgClass, Location, NgOptimizedImage, CommonModule } from '@angular/common';
23
23
  import 'reflect-metadata';
24
24
  import * as _ from 'lodash';
25
25
  import { ColorPickerDirective } from 'ngx-color-picker';
26
26
  import { DynamicIoDirective, DynamicComponent, DynamicModule } from 'ng-dynamic-component';
27
27
  import { Editor, NgxEditorMenuComponent, NgxEditorComponent } from 'ngx-editor';
28
- import { CdkTableModule, CdkTable, CdkHeaderCell, CdkCell, CdkHeaderRow, CdkRow } from '@angular/cdk/table';
28
+ import { CdkTable, CdkHeaderCell, CdkCell, CdkHeaderRow, CdkRow, CdkTableModule } from '@angular/cdk/table';
29
29
  import * as i1$2 from 'ng-lazyload-image';
30
30
  import { LazyLoadImageModule } from 'ng-lazyload-image';
31
31
  import { DragDropModule } from '@angular/cdk/drag-drop';
32
- import * as i1$3 from '@ngrx/effects';
33
- import { createEffect, EffectsModule } from '@ngrx/effects';
34
- import * as i1$4 from '@ngrx/store';
32
+ import * as i1$3 from '@ngrx/store';
35
33
  import { Guid } from 'guid-typescript';
36
34
 
37
35
  var PaginationMode;
@@ -6123,384 +6121,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImpor
6123
6121
  `, changeDetection: ChangeDetectionStrategy.OnPush, imports: [TranslatePipe], styles: [":host{width:100%}\n"] }]
6124
6122
  }] });
6125
6123
 
6126
- class DetailsPage {
6127
- modalService = inject(ModalService);
6128
- styleService = inject(StyleService);
6129
- elementRef = inject(ElementRef);
6130
- // navParams: NavParams, //TODO: to be injected
6131
- pageOptions = signal({
6132
- title: 'details',
6133
- hideMenuButton: true,
6134
- }, ...(ngDevMode ? [{ debugName: "pageOptions" }] : []));
6135
- detailsOptions;
6136
- constructor() {
6137
- this.detailsOptions = /*navParams.get('value')*/ {};
6138
- this.initTitle();
6139
- this.initButtons();
6140
- }
6141
- ngOnInit() {
6142
- this.styleService.init(this.elementRef);
6143
- }
6144
- initTitle() {
6145
- this.pageOptions.update((options) => {
6146
- if (this.detailsOptions.title) {
6147
- return {
6148
- ...options,
6149
- title: this.detailsOptions.title,
6150
- };
6151
- }
6152
- return options;
6153
- });
6154
- }
6155
- initButtons() {
6156
- const buttons = [];
6157
- if (this.detailsOptions.removeHandler) {
6158
- buttons.push({
6159
- handler: () => {
6160
- computed(() => {
6161
- const item = this.detailsOptions.item();
6162
- this.detailsOptions?.removeHandler?.(item);
6163
- this.modalService.dismiss();
6164
- });
6165
- },
6166
- icon: 'trash',
6167
- });
6168
- }
6169
- if (this.detailsOptions.itemHandler) {
6170
- buttons.push({
6171
- handler: () => {
6172
- computed(() => {
6173
- const item = this.detailsOptions.item();
6174
- this.detailsOptions?.removeHandler?.(item);
6175
- this.modalService.dismiss();
6176
- });
6177
- },
6178
- icon: 'arrow-forward-outline',
6179
- });
6180
- }
6181
- this.pageOptions.update((options) => ({ ...options, endButtons: buttons }));
6182
- }
6183
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: DetailsPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
6184
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.0", type: DetailsPage, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<smart-page [options]=\"pageOptions()\">\n <smart-details #smartDetails [options]=\"detailsOptions\"></smart-details>\n</smart-page>\n", styles: [":host{width:100%}\n"], dependencies: [{ kind: "component", type: PageComponent, selector: "smart-page", inputs: ["options"] }, { kind: "component", type: DetailsComponent, selector: "smart-details", inputs: ["options"] }] });
6185
- }
6186
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: DetailsPage, decorators: [{
6187
- type: Component,
6188
- args: [{ imports: [PageComponent, DetailsComponent], template: "<smart-page [options]=\"pageOptions()\">\n <smart-details #smartDetails [options]=\"detailsOptions\"></smart-details>\n</smart-page>\n", styles: [":host{width:100%}\n"] }]
6189
- }], ctorParameters: () => [] });
6190
-
6191
- const ACCORDION_COMPONENTS = [
6192
- AccordionComponent,
6193
- AccordionHeaderComponent,
6194
- AccordionBodyComponent,
6195
- ];
6196
- const BUTTON_COMPONENTS = [ButtonComponent, ButtonStandardComponent];
6197
- const CARD_COMPONENTS = [CardComponent];
6198
- const DETAILS_COMPONENTS = [DetailsComponent, DetailsStandardComponent];
6199
- const DETAIL_COMPONENTS = [
6200
- DetailComponent,
6201
- DetailTextComponent,
6202
- DetailFlagComponent,
6203
- DetailEnumComponent,
6204
- DetailEmailComponent,
6205
- DetailAddressComponent,
6206
- DetailObjectComponent,
6207
- DetailColorComponent,
6208
- DetailLogoComponent,
6209
- DetailArrayComponent,
6210
- DetailPdfComponent,
6211
- DetailVideoComponent,
6212
- DetailAttachmentComponent,
6213
- DetailDateRangeComponent,
6214
- DetailImageComponent,
6215
- DetailPhoneNumberPlComponent,
6216
- ];
6217
- const FORM_COMPONENTS = [
6218
- FormStandardComponent,
6219
- FormComponent,
6220
- ];
6221
- const INPUT_COMPONENTS = [
6222
- InputComponent,
6223
- InputIntComponent,
6224
- InputErrorComponent,
6225
- InputTextComponent,
6226
- InputPasswordComponent,
6227
- InputFlagComponent,
6228
- InputEnumComponent,
6229
- InputEmailComponent,
6230
- InputCurrencyComponent,
6231
- InputDateComponent,
6232
- InputDateWithEditComponent,
6233
- InputFileComponent,
6234
- InputRadioComponent,
6235
- InputNipComponent,
6236
- InputStringsComponent,
6237
- InputLongTextComponent,
6238
- InputAddressComponent,
6239
- InputObjectComponent,
6240
- InputColorComponent,
6241
- InputLogoComponent,
6242
- InputCheckComponent,
6243
- InputIntsComponent,
6244
- InputPhoneNumberComponent,
6245
- InputPhoneNumberPlComponent,
6246
- InputPeselComponent,
6247
- InputArrayComponent,
6248
- InputPdfComponent,
6249
- InputVideoComponent,
6250
- InputAttachmentComponent,
6251
- InputDateRangeComponent,
6252
- InputImageComponent,
6253
- InputFloatComponent,
6254
- ];
6255
- const LIST_COMPONENTS = [
6256
- ListComponent,
6257
- ListMobileComponent,
6258
- ListDesktopComponent,
6259
- ListMasonryGridComponent,
6260
- ];
6261
- const LOADER_COMPONENTS = [LoaderComponent];
6262
- const PAGE_COMPONENTS = [PageStandardComponent, PageComponent];
6263
- const INFO_COMPONENTS = [InfoComponent, InfoModalComponent];
6264
- const DATE_RANGE_COMPONENTS = [
6265
- DateRangeComponent,
6266
- DateRangeModalComponent,
6267
- ];
6268
- const DATE_EDIT_COMPONENTS = [DateEditComponent];
6269
- const DYNAMIC_COMPONENTS = [DynamicComponent];
6270
- const COMPONENTS$1 = [
6271
- ...FORM_COMPONENTS,
6272
- ...INPUT_COMPONENTS,
6273
- ...PAGE_COMPONENTS,
6274
- ...ACCORDION_COMPONENTS,
6275
- ...DATE_RANGE_COMPONENTS,
6276
- ...DATE_EDIT_COMPONENTS,
6277
- ...BUTTON_COMPONENTS,
6278
- ...CARD_COMPONENTS,
6279
- ...LIST_COMPONENTS,
6280
- ...LOADER_COMPONENTS,
6281
- ...DETAIL_COMPONENTS,
6282
- ...DETAILS_COMPONENTS,
6283
- ...DYNAMIC_COMPONENTS,
6284
- ...INFO_COMPONENTS,
6285
- ExportComponent,
6286
- ImportComponent,
6287
- PasswordStrengthComponent,
6288
- ];
6289
- const IMPORTS = [
6290
- CommonModule,
6291
- ReactiveFormsModule,
6292
- FormsModule,
6293
- TranslateModule,
6294
- RouterModule,
6295
- SharedPipesModule,
6296
- SharedDirectivesModule,
6297
- HttpClientModule,
6298
- LazyLoadImageModule,
6299
- DragDropModule,
6300
- CdkTableModule,
6301
- DynamicModule,
6302
- ];
6303
- class SharedComponentsModule {
6304
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: SharedComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6305
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.0", ngImport: i0, type: SharedComponentsModule, imports: [CommonModule,
6306
- ReactiveFormsModule,
6307
- FormsModule,
6308
- TranslateModule,
6309
- RouterModule,
6310
- SharedPipesModule,
6311
- SharedDirectivesModule,
6312
- HttpClientModule,
6313
- LazyLoadImageModule,
6314
- DragDropModule,
6315
- CdkTableModule,
6316
- DynamicModule, FormStandardComponent,
6317
- FormComponent, InputComponent,
6318
- InputIntComponent,
6319
- InputErrorComponent,
6320
- InputTextComponent,
6321
- InputPasswordComponent,
6322
- InputFlagComponent,
6323
- InputEnumComponent,
6324
- InputEmailComponent,
6325
- InputCurrencyComponent,
6326
- InputDateComponent,
6327
- InputDateWithEditComponent,
6328
- InputFileComponent,
6329
- InputRadioComponent,
6330
- InputNipComponent,
6331
- InputStringsComponent,
6332
- InputLongTextComponent,
6333
- InputAddressComponent,
6334
- InputObjectComponent,
6335
- InputColorComponent,
6336
- InputLogoComponent,
6337
- InputCheckComponent,
6338
- InputIntsComponent,
6339
- InputPhoneNumberComponent,
6340
- InputPhoneNumberPlComponent,
6341
- InputPeselComponent,
6342
- InputArrayComponent,
6343
- InputPdfComponent,
6344
- InputVideoComponent,
6345
- InputAttachmentComponent,
6346
- InputDateRangeComponent,
6347
- InputImageComponent,
6348
- InputFloatComponent, PageStandardComponent, PageComponent, AccordionComponent,
6349
- AccordionHeaderComponent,
6350
- AccordionBodyComponent, DateRangeComponent,
6351
- DateRangeModalComponent, DateEditComponent, ButtonComponent, ButtonStandardComponent, CardComponent, ListComponent,
6352
- ListMobileComponent,
6353
- ListDesktopComponent,
6354
- ListMasonryGridComponent, LoaderComponent, DetailComponent,
6355
- DetailTextComponent,
6356
- DetailFlagComponent,
6357
- DetailEnumComponent,
6358
- DetailEmailComponent,
6359
- DetailAddressComponent,
6360
- DetailObjectComponent,
6361
- DetailColorComponent,
6362
- DetailLogoComponent,
6363
- DetailArrayComponent,
6364
- DetailPdfComponent,
6365
- DetailVideoComponent,
6366
- DetailAttachmentComponent,
6367
- DetailDateRangeComponent,
6368
- DetailImageComponent,
6369
- DetailPhoneNumberPlComponent, DetailsComponent, DetailsStandardComponent, DynamicComponent, InfoComponent, InfoModalComponent, ExportComponent,
6370
- ImportComponent,
6371
- PasswordStrengthComponent], exports: [FormStandardComponent,
6372
- FormComponent, InputComponent,
6373
- InputIntComponent,
6374
- InputErrorComponent,
6375
- InputTextComponent,
6376
- InputPasswordComponent,
6377
- InputFlagComponent,
6378
- InputEnumComponent,
6379
- InputEmailComponent,
6380
- InputCurrencyComponent,
6381
- InputDateComponent,
6382
- InputDateWithEditComponent,
6383
- InputFileComponent,
6384
- InputRadioComponent,
6385
- InputNipComponent,
6386
- InputStringsComponent,
6387
- InputLongTextComponent,
6388
- InputAddressComponent,
6389
- InputObjectComponent,
6390
- InputColorComponent,
6391
- InputLogoComponent,
6392
- InputCheckComponent,
6393
- InputIntsComponent,
6394
- InputPhoneNumberComponent,
6395
- InputPhoneNumberPlComponent,
6396
- InputPeselComponent,
6397
- InputArrayComponent,
6398
- InputPdfComponent,
6399
- InputVideoComponent,
6400
- InputAttachmentComponent,
6401
- InputDateRangeComponent,
6402
- InputImageComponent,
6403
- InputFloatComponent, PageStandardComponent, PageComponent, AccordionComponent,
6404
- AccordionHeaderComponent,
6405
- AccordionBodyComponent, DateRangeComponent,
6406
- DateRangeModalComponent, DateEditComponent, ButtonComponent, ButtonStandardComponent, CardComponent, ListComponent,
6407
- ListMobileComponent,
6408
- ListDesktopComponent,
6409
- ListMasonryGridComponent, LoaderComponent, DetailComponent,
6410
- DetailTextComponent,
6411
- DetailFlagComponent,
6412
- DetailEnumComponent,
6413
- DetailEmailComponent,
6414
- DetailAddressComponent,
6415
- DetailObjectComponent,
6416
- DetailColorComponent,
6417
- DetailLogoComponent,
6418
- DetailArrayComponent,
6419
- DetailPdfComponent,
6420
- DetailVideoComponent,
6421
- DetailAttachmentComponent,
6422
- DetailDateRangeComponent,
6423
- DetailImageComponent,
6424
- DetailPhoneNumberPlComponent, DetailsComponent, DetailsStandardComponent, DynamicComponent, InfoComponent, InfoModalComponent, ExportComponent,
6425
- ImportComponent,
6426
- PasswordStrengthComponent] });
6427
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: SharedComponentsModule, providers: [
6428
- {
6429
- provide: FORM_COMPONENT_TOKEN,
6430
- useValue: FormComponent,
6431
- },
6432
- {
6433
- provide: DETAILS_COMPONENT_TOKEN,
6434
- useValue: DetailsComponent,
6435
- },
6436
- ], imports: [IMPORTS, FormStandardComponent,
6437
- FormComponent, InputComponent,
6438
- InputIntComponent,
6439
- InputTextComponent,
6440
- InputPasswordComponent,
6441
- InputFlagComponent,
6442
- InputEmailComponent,
6443
- InputCurrencyComponent,
6444
- InputDateComponent,
6445
- InputDateWithEditComponent,
6446
- InputRadioComponent,
6447
- InputNipComponent,
6448
- InputStringsComponent,
6449
- InputLongTextComponent,
6450
- InputAddressComponent,
6451
- InputCheckComponent,
6452
- InputIntsComponent,
6453
- InputPhoneNumberComponent,
6454
- InputPhoneNumberPlComponent,
6455
- InputPeselComponent,
6456
- InputFloatComponent, PageStandardComponent, PageComponent, DateEditComponent, ListComponent,
6457
- ListMobileComponent,
6458
- ListDesktopComponent, DynamicComponent] });
6459
- }
6460
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: SharedComponentsModule, decorators: [{
6461
- type: NgModule,
6462
- args: [{
6463
- declarations: [],
6464
- exports: [...COMPONENTS$1],
6465
- providers: [
6466
- {
6467
- provide: FORM_COMPONENT_TOKEN,
6468
- useValue: FormComponent,
6469
- },
6470
- {
6471
- provide: DETAILS_COMPONENT_TOKEN,
6472
- useValue: DetailsComponent,
6473
- },
6474
- ],
6475
- imports: [...IMPORTS, ...COMPONENTS$1],
6476
- }]
6477
- }] });
6478
-
6479
- const COMPONENTS = [DetailsPage];
6480
- class SharedPagesModule {
6481
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: SharedPagesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6482
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.0", ngImport: i0, type: SharedPagesModule, imports: [SharedServicesModule,
6483
- SharedComponentsModule,
6484
- SharedDirectivesModule, DetailsPage], exports: [DetailsPage] });
6485
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: SharedPagesModule, imports: [SharedServicesModule,
6486
- SharedComponentsModule,
6487
- SharedDirectivesModule,
6488
- COMPONENTS] });
6489
- }
6490
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: SharedPagesModule, decorators: [{
6491
- type: NgModule,
6492
- args: [{
6493
- imports: [
6494
- SharedServicesModule,
6495
- SharedComponentsModule,
6496
- SharedDirectivesModule,
6497
- COMPONENTS,
6498
- ],
6499
- declarations: [],
6500
- exports: [...COMPONENTS],
6501
- }]
6502
- }] });
6503
-
6504
6124
  class ListBaseComponent {
6505
6125
  static smartType = 'list';
6506
6126
  _fields;
@@ -6592,7 +6212,9 @@ class ListBaseComponent {
6592
6212
  if (options.details) {
6593
6213
  if (!details?.provider)
6594
6214
  throw Error('Must set details provider');
6595
- this.detailsComponent = DetailsPage;
6215
+ if (!details?.component)
6216
+ throw Error('Must set details component');
6217
+ this.detailsComponent = details.component;
6596
6218
  this.detailsComponentProps = {
6597
6219
  item: details?.provider.item,
6598
6220
  type: options.type,
@@ -6752,154 +6374,532 @@ class ListDesktopComponent extends ListBaseComponent {
6752
6374
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ListDesktopComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
6753
6375
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.0", type: ListDesktopComponent, isStandalone: true, selector: "smart-list-desktop", viewQueries: [{ propertyName: "topTpl", first: true, predicate: ["topTpl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div #topTpl></div>\n\n<!--<ion-content>-->\n<div class=\"w-full overflow-y-auto\">\n <table\n cdk-table\n [dataSource]=\"list() ?? []\"\n [trackBy]=\"myTrackById\"\n class=\"w-full overflow-y-auto\"\n >\n @for (key of desktopKeys; track key) {\n @let last = $last;\n <ng-container class=\"col-sm text-left\">\n <div>\n @switch (key) {\n @case ('selectMulti') {\n <th cdk-header-cell class=\"w-5\" *matHeaderCellDef></th>\n <td cdk-cell>\n @let list = desktopList();\n @if (list) {\n <!-- <ion-checkbox-->\n <!-- style=\"margin-right: 15px\"-->\n <!-- (ionChange)=\"-->\n <!-- onChangeMultiselect(-->\n <!-- $event.detail.checked,-->\n <!-- element,-->\n <!-- list-->\n <!-- )-->\n <!-- \"-->\n <!-- ></ion-checkbox>-->\n }\n </td>\n }\n @case ('removeAction') {\n <th cdk-header-cell class=\"w-5\" *matHeaderCellDef>\n <ng-container *ngTemplateOutlet=\"pagination\"></ng-container>\n </th>\n <td cdk-cell *matCellDef=\"let element\">\n @if (!checkRemoveHandler || checkRemoveHandler(element)) {\n <!-- <ion-button (click)=\"removeHandler?.(element)\">-->\n <!-- <ion-icon slot=\"icon-only\" name=\"trash\"></ion-icon>-->\n <!-- </ion-button>-->\n }\n </td>\n }\n @case ('detailsAction') {\n <th cdk-header-cell class=\"w-5\" *matHeaderCellDef>\n <ng-container *ngTemplateOutlet=\"pagination\"></ng-container>\n </th>\n <td cdk-cell *matCellDef=\"let element\">\n <!-- <ion-button-->\n <!-- (click)=\"detailsButtonOptions.click()\"-->\n <!-- [smartDetails]=\"{-->\n <!-- component: detailsComponent,-->\n <!-- params: detailsComponentProps,-->\n <!-- mode: 'bottom',-->\n <!-- }\"-->\n <!-- (smartDetailsShowed)=\"select(element.id)\"-->\n <!-- >-->\n <!-- <ion-icon-->\n <!-- slot=\"icon-only\"-->\n <!-- name=\"ellipsis-vertical-outline\"-->\n <!-- ></ion-icon>-->\n <!-- </ion-button>-->\n </td>\n }\n @case ('itemAction') {\n <th cdk-header-cell class=\"w-5\">\n <ng-container *ngTemplateOutlet=\"pagination\"></ng-container>\n </th>\n <td cdk-cell *matCellDef=\"let element\">\n <!-- <ion-button (click)=\"itemHandler?.(element.id)\">-->\n <!-- <ion-icon-->\n <!-- slot=\"icon-only\"-->\n <!-- name=\"arrow-forward-outline\"-->\n <!-- ></ion-icon>-->\n <!-- </ion-button>-->\n </td>\n }\n @default {\n <th cdk-header-cell>\n {{ (list() | smartListHeader: key : type)() }}\n <ng-container *ngTemplateOutlet=\"pagination\"></ng-container>\n </th>\n <ng-container *matCellDef=\"let element\">\n @let cell = element | smartListCell: key : cellPipe : type;\n @if (cell) {\n <td\n cdk-cell\n [attr.smart-item-key]=\"key\"\n [style.width.px]=\"cell.type === FieldType.image ? 60 : null\"\n [style.textAlign]=\"\n cell.type === FieldType.image ? 'center' : null\n \"\n >\n @if (cell.type === FieldType.image) {\n <img\n height=\"50\"\n [lazyLoad]=\"cell.value | smartFileUrl\"\n alt=\"\"\n src=\"\"\n />\n } @else {\n <div\n class=\"min-h-8 pt-1.5\"\n [innerHTML]=\"cell.value\"\n ></div>\n }\n </td>\n } @else {\n <td cdk-cell></td>\n }\n </ng-container>\n }\n }\n </div>\n\n <ng-template #pagination>\n @if (last && loadNextPage && totalPages()) {\n <div style=\"float: right\">\n <!-- <ion-chip>-->\n {{ 'page' | translate }}:\n <b>{{ page() }}/{{ totalPages() }}</b>\n <!-- </ion-chip>-->\n </div>\n }\n </ng-template>\n </ng-container>\n }\n\n <tr cdk-header-row *matHeaderRowDef=\"desktopKeys ?? []; sticky: true\"></tr>\n <tr cdk-row *matRowDef=\"let row; columns: desktopKeys ?? []\"></tr>\n </table>\n</div>\n\n@if (\n loadNextPage &&\n Object.keys(list() ?? [])?.length &&\n options().pagination?.mode !== PaginationMode.singlePage\n) {\n <!-- <ion-infinite-scroll threshold=\"100px\" (ionInfinite)=\"loadNextPage($event)\">-->\n <!-- <ion-infinite-scroll-content-->\n <!-- loadingSpinner=\"circles\"-->\n <!-- ></ion-infinite-scroll-content>-->\n <!-- </ion-infinite-scroll>-->\n}\n<!--</ion-content>-->\n\n@if (options()?.pagination?.mode === PaginationMode.singlePage) {\n <smart-paging\n [page]=\"page()\"\n [totalPages]=\"totalPages()\"\n (prevPage)=\"loadPrevPage?.()\"\n (nextPage)=\"loadNextPage?.()\"\n ></smart-paging>\n}\n", styles: ["table .mat-row,table .mat-header-row{background:#fff;min-width:1200px}.wrapper{height:100%}.mat-row,.mat-header-row{min-width:1200px}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: LazyLoadImageModule }, { kind: "directive", type: i1$2.LazyLoadImageDirective, selector: "[lazyLoad]", inputs: ["lazyLoad", "defaultImage", "errorImage", "scrollTarget", "customObservable", "offset", "useSrcset", "decode", "debug"], outputs: ["onStateChange"] }, { kind: "component", type: PagingComponent, selector: "smart-paging", inputs: ["page", "totalPages"], outputs: ["nextPage", "prevPage"] }, { kind: "component", type: CdkTable, selector: "cdk-table, table[cdk-table]", inputs: ["trackBy", "dataSource", "multiTemplateDataRows", "fixedLayout"], outputs: ["contentChanged"], exportAs: ["cdkTable"] }, { kind: "directive", type: CdkHeaderCell, selector: "cdk-header-cell, th[cdk-header-cell]" }, { kind: "directive", type: CdkCell, selector: "cdk-cell, td[cdk-cell]" }, { kind: "component", type: CdkHeaderRow, selector: "cdk-header-row, tr[cdk-header-row]" }, { kind: "component", type: CdkRow, selector: "cdk-row, tr[cdk-row]" }, { kind: "pipe", type: ListHeaderPipe, name: "smartListHeader" }, { kind: "pipe", type: ListCellPipe, name: "smartListCell" }, { kind: "pipe", type: FileUrlPipe, name: "smartFileUrl" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
6754
6376
  }
6755
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ListDesktopComponent, decorators: [{
6377
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ListDesktopComponent, decorators: [{
6378
+ type: Component,
6379
+ args: [{ selector: 'smart-list-desktop', imports: [
6380
+ NgTemplateOutlet,
6381
+ ListHeaderPipe,
6382
+ ListCellPipe,
6383
+ LazyLoadImageModule,
6384
+ FileUrlPipe,
6385
+ TranslatePipe,
6386
+ PagingComponent,
6387
+ CdkTable,
6388
+ CdkHeaderCell,
6389
+ CdkCell,
6390
+ CdkHeaderRow,
6391
+ CdkRow,
6392
+ ], template: "<div #topTpl></div>\n\n<!--<ion-content>-->\n<div class=\"w-full overflow-y-auto\">\n <table\n cdk-table\n [dataSource]=\"list() ?? []\"\n [trackBy]=\"myTrackById\"\n class=\"w-full overflow-y-auto\"\n >\n @for (key of desktopKeys; track key) {\n @let last = $last;\n <ng-container class=\"col-sm text-left\">\n <div>\n @switch (key) {\n @case ('selectMulti') {\n <th cdk-header-cell class=\"w-5\" *matHeaderCellDef></th>\n <td cdk-cell>\n @let list = desktopList();\n @if (list) {\n <!-- <ion-checkbox-->\n <!-- style=\"margin-right: 15px\"-->\n <!-- (ionChange)=\"-->\n <!-- onChangeMultiselect(-->\n <!-- $event.detail.checked,-->\n <!-- element,-->\n <!-- list-->\n <!-- )-->\n <!-- \"-->\n <!-- ></ion-checkbox>-->\n }\n </td>\n }\n @case ('removeAction') {\n <th cdk-header-cell class=\"w-5\" *matHeaderCellDef>\n <ng-container *ngTemplateOutlet=\"pagination\"></ng-container>\n </th>\n <td cdk-cell *matCellDef=\"let element\">\n @if (!checkRemoveHandler || checkRemoveHandler(element)) {\n <!-- <ion-button (click)=\"removeHandler?.(element)\">-->\n <!-- <ion-icon slot=\"icon-only\" name=\"trash\"></ion-icon>-->\n <!-- </ion-button>-->\n }\n </td>\n }\n @case ('detailsAction') {\n <th cdk-header-cell class=\"w-5\" *matHeaderCellDef>\n <ng-container *ngTemplateOutlet=\"pagination\"></ng-container>\n </th>\n <td cdk-cell *matCellDef=\"let element\">\n <!-- <ion-button-->\n <!-- (click)=\"detailsButtonOptions.click()\"-->\n <!-- [smartDetails]=\"{-->\n <!-- component: detailsComponent,-->\n <!-- params: detailsComponentProps,-->\n <!-- mode: 'bottom',-->\n <!-- }\"-->\n <!-- (smartDetailsShowed)=\"select(element.id)\"-->\n <!-- >-->\n <!-- <ion-icon-->\n <!-- slot=\"icon-only\"-->\n <!-- name=\"ellipsis-vertical-outline\"-->\n <!-- ></ion-icon>-->\n <!-- </ion-button>-->\n </td>\n }\n @case ('itemAction') {\n <th cdk-header-cell class=\"w-5\">\n <ng-container *ngTemplateOutlet=\"pagination\"></ng-container>\n </th>\n <td cdk-cell *matCellDef=\"let element\">\n <!-- <ion-button (click)=\"itemHandler?.(element.id)\">-->\n <!-- <ion-icon-->\n <!-- slot=\"icon-only\"-->\n <!-- name=\"arrow-forward-outline\"-->\n <!-- ></ion-icon>-->\n <!-- </ion-button>-->\n </td>\n }\n @default {\n <th cdk-header-cell>\n {{ (list() | smartListHeader: key : type)() }}\n <ng-container *ngTemplateOutlet=\"pagination\"></ng-container>\n </th>\n <ng-container *matCellDef=\"let element\">\n @let cell = element | smartListCell: key : cellPipe : type;\n @if (cell) {\n <td\n cdk-cell\n [attr.smart-item-key]=\"key\"\n [style.width.px]=\"cell.type === FieldType.image ? 60 : null\"\n [style.textAlign]=\"\n cell.type === FieldType.image ? 'center' : null\n \"\n >\n @if (cell.type === FieldType.image) {\n <img\n height=\"50\"\n [lazyLoad]=\"cell.value | smartFileUrl\"\n alt=\"\"\n src=\"\"\n />\n } @else {\n <div\n class=\"min-h-8 pt-1.5\"\n [innerHTML]=\"cell.value\"\n ></div>\n }\n </td>\n } @else {\n <td cdk-cell></td>\n }\n </ng-container>\n }\n }\n </div>\n\n <ng-template #pagination>\n @if (last && loadNextPage && totalPages()) {\n <div style=\"float: right\">\n <!-- <ion-chip>-->\n {{ 'page' | translate }}:\n <b>{{ page() }}/{{ totalPages() }}</b>\n <!-- </ion-chip>-->\n </div>\n }\n </ng-template>\n </ng-container>\n }\n\n <tr cdk-header-row *matHeaderRowDef=\"desktopKeys ?? []; sticky: true\"></tr>\n <tr cdk-row *matRowDef=\"let row; columns: desktopKeys ?? []\"></tr>\n </table>\n</div>\n\n@if (\n loadNextPage &&\n Object.keys(list() ?? [])?.length &&\n options().pagination?.mode !== PaginationMode.singlePage\n) {\n <!-- <ion-infinite-scroll threshold=\"100px\" (ionInfinite)=\"loadNextPage($event)\">-->\n <!-- <ion-infinite-scroll-content-->\n <!-- loadingSpinner=\"circles\"-->\n <!-- ></ion-infinite-scroll-content>-->\n <!-- </ion-infinite-scroll>-->\n}\n<!--</ion-content>-->\n\n@if (options()?.pagination?.mode === PaginationMode.singlePage) {\n <smart-paging\n [page]=\"page()\"\n [totalPages]=\"totalPages()\"\n (prevPage)=\"loadPrevPage?.()\"\n (nextPage)=\"loadNextPage?.()\"\n ></smart-paging>\n}\n", styles: ["table .mat-row,table .mat-header-row{background:#fff;min-width:1200px}.wrapper{height:100%}.mat-row,.mat-header-row{min-width:1200px}\n"] }]
6393
+ }] });
6394
+
6395
+ class ListMasonryGridComponent extends ListBaseComponent {
6396
+ componentFactories = null;
6397
+ listWithImages;
6398
+ topTpl = viewChild('topTpl', ...(ngDevMode ? [{ debugName: "topTpl" }] : []));
6399
+ ngAfterViewInit() {
6400
+ this.generateDynamicComponents();
6401
+ }
6402
+ afterInitOptions() {
6403
+ const fieldOptions = getModelFieldsWithOptions(new this.type());
6404
+ const imageFieldOptions = fieldOptions.find((item) => item.options.type === FieldType.image);
6405
+ this.listWithImages = computed(() => {
6406
+ const list = this.list();
6407
+ if (!list)
6408
+ return null;
6409
+ return list.map((item) => {
6410
+ return {
6411
+ data: item,
6412
+ image: item[imageFieldOptions?.key ?? ''],
6413
+ };
6414
+ });
6415
+ }, ...(ngDevMode ? [{ debugName: "listWithImages" }] : []));
6416
+ }
6417
+ initList(val) {
6418
+ super.initList(val);
6419
+ this.componentFactories = val?.componentFactories ?? null;
6420
+ this.generateDynamicComponents();
6421
+ }
6422
+ generateDynamicComponents() {
6423
+ if (!this.componentFactories)
6424
+ return;
6425
+ if (this.componentFactories.top && this.topTpl()) {
6426
+ if (!this.topTpl()?.get(0)) {
6427
+ this.topTpl()?.createComponent(this.componentFactories.top);
6428
+ }
6429
+ }
6430
+ }
6431
+ Object = Object;
6432
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ListMasonryGridComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
6433
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.0", type: ListMasonryGridComponent, isStandalone: true, selector: "smart-list-masonry-grid", viewQueries: [{ propertyName: "topTpl", first: true, predicate: ["topTpl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div #topTpl></div>\n\n<div class=\"ion-padding\">\n <div class=\"gap-3\">\n @for (item of listWithImages(); track item) {\n <!-- <ion-card class=\"w-full my-2.5 break-inside-avoid border border-gray-100\" (click)=\"unselect?.()\">-->\n @if (item.image) {\n <img [ngSrc]=\"item.image | smartFileUrl\" alt=\"\" fill />\n }\n\n <!-- <ion-card-content class=\"overflow-hidden after:block after:w-full after:bg-gradient-to-r after:from-transparent after:to-white after:absolute after:bottom-0\">-->\n @for (key of keys; track key) {\n @let cell = item.data | smartListCell: key : cellPipe : type;\n @if (cell && cell.value != item.image) {\n @if ($index < 2) {\n <h3\n [attr.smart-item-key]=\"key\"\n class=\"text-gray-800\"\n [innerHTML]=\"cell.value\"\n ></h3>\n } @else {\n <p\n [attr.smart-item-key]=\"key\"\n class=\"text-gray-500\"\n [innerHTML]=\"cell.value\"\n ></p>\n }\n }\n }\n <!-- </ion-card-content>-->\n\n <!-- <ion-row>-->\n @if (removeHandler) {\n <!-- <ion-col size=\"auto\">-->\n @if (!checkRemoveHandler || checkRemoveHandler(item.data)) {\n <!-- <ion-button (click)=\"removeHandler?.(item.data)\">-->\n <!-- <ion-icon slot=\"icon-only\" name=\"trash\"></ion-icon>-->\n <!-- </ion-button>-->\n }\n <!-- </ion-col>-->\n }\n <!-- <ion-col></ion-col>-->\n @if (itemHandler) {\n <!-- <ion-col size=\"auto\">-->\n <!-- <ion-button (click)=\"itemHandler?.(item.data.id)\">-->\n <!-- <ion-icon-->\n <!-- slot=\"icon-only\"-->\n <!-- name=\"arrow-forward-outline\"-->\n <!-- ></ion-icon>-->\n <!-- </ion-button>-->\n <!-- </ion-col>-->\n }\n <!-- </ion-row>-->\n <!-- </ion-card>-->\n }\n </div>\n</div>\n\n@if (\n loadNextPage &&\n Object.keys(list() ?? [])?.length &&\n options().pagination?.mode !== PaginationMode.singlePage\n) {\n <!-- <ion-infinite-scroll threshold=\"100px\" (ionInfinite)=\"loadNextPage?.($event)\">-->\n <!-- <ion-infinite-scroll-content loadingSpinner=\"circles\">-->\n <!-- </ion-infinite-scroll-content>-->\n <!-- </ion-infinite-scroll>-->\n}\n\n@if (options()?.pagination?.mode === PaginationMode.singlePage) {\n <smart-paging\n [page]=\"page()\"\n [totalPages]=\"totalPages()\"\n (prevPage)=\"loadPrevPage?.()\"\n (nextPage)=\"loadNextPage?.()\"\n ></smart-paging>\n}\n", dependencies: [{ kind: "component", type: PagingComponent, selector: "smart-paging", inputs: ["page", "totalPages"], outputs: ["nextPage", "prevPage"] }, { kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "decoding", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }, { kind: "pipe", type: FileUrlPipe, name: "smartFileUrl" }, { kind: "pipe", type: ListCellPipe, name: "smartListCell" }] });
6434
+ }
6435
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ListMasonryGridComponent, decorators: [{
6436
+ type: Component,
6437
+ args: [{ selector: 'smart-list-masonry-grid', imports: [PagingComponent, FileUrlPipe, NgOptimizedImage, ListCellPipe], template: "<div #topTpl></div>\n\n<div class=\"ion-padding\">\n <div class=\"gap-3\">\n @for (item of listWithImages(); track item) {\n <!-- <ion-card class=\"w-full my-2.5 break-inside-avoid border border-gray-100\" (click)=\"unselect?.()\">-->\n @if (item.image) {\n <img [ngSrc]=\"item.image | smartFileUrl\" alt=\"\" fill />\n }\n\n <!-- <ion-card-content class=\"overflow-hidden after:block after:w-full after:bg-gradient-to-r after:from-transparent after:to-white after:absolute after:bottom-0\">-->\n @for (key of keys; track key) {\n @let cell = item.data | smartListCell: key : cellPipe : type;\n @if (cell && cell.value != item.image) {\n @if ($index < 2) {\n <h3\n [attr.smart-item-key]=\"key\"\n class=\"text-gray-800\"\n [innerHTML]=\"cell.value\"\n ></h3>\n } @else {\n <p\n [attr.smart-item-key]=\"key\"\n class=\"text-gray-500\"\n [innerHTML]=\"cell.value\"\n ></p>\n }\n }\n }\n <!-- </ion-card-content>-->\n\n <!-- <ion-row>-->\n @if (removeHandler) {\n <!-- <ion-col size=\"auto\">-->\n @if (!checkRemoveHandler || checkRemoveHandler(item.data)) {\n <!-- <ion-button (click)=\"removeHandler?.(item.data)\">-->\n <!-- <ion-icon slot=\"icon-only\" name=\"trash\"></ion-icon>-->\n <!-- </ion-button>-->\n }\n <!-- </ion-col>-->\n }\n <!-- <ion-col></ion-col>-->\n @if (itemHandler) {\n <!-- <ion-col size=\"auto\">-->\n <!-- <ion-button (click)=\"itemHandler?.(item.data.id)\">-->\n <!-- <ion-icon-->\n <!-- slot=\"icon-only\"-->\n <!-- name=\"arrow-forward-outline\"-->\n <!-- ></ion-icon>-->\n <!-- </ion-button>-->\n <!-- </ion-col>-->\n }\n <!-- </ion-row>-->\n <!-- </ion-card>-->\n }\n </div>\n</div>\n\n@if (\n loadNextPage &&\n Object.keys(list() ?? [])?.length &&\n options().pagination?.mode !== PaginationMode.singlePage\n) {\n <!-- <ion-infinite-scroll threshold=\"100px\" (ionInfinite)=\"loadNextPage?.($event)\">-->\n <!-- <ion-infinite-scroll-content loadingSpinner=\"circles\">-->\n <!-- </ion-infinite-scroll-content>-->\n <!-- </ion-infinite-scroll>-->\n}\n\n@if (options()?.pagination?.mode === PaginationMode.singlePage) {\n <smart-paging\n [page]=\"page()\"\n [totalPages]=\"totalPages()\"\n (prevPage)=\"loadPrevPage?.()\"\n (nextPage)=\"loadNextPage?.()\"\n ></smart-paging>\n}\n" }]
6438
+ }] });
6439
+
6440
+ class ListMobileComponent extends ListBaseComponent {
6441
+ listMobile = this.list;
6442
+ componentFactories = null;
6443
+ topTpl = viewChild('topTpl', ...(ngDevMode ? [{ debugName: "topTpl" }] : []));
6444
+ initList(val) {
6445
+ super.initList(val);
6446
+ this.componentFactories = val.componentFactories ?? null;
6447
+ this.generateDynamicComponents();
6448
+ }
6449
+ ngAfterViewInit() {
6450
+ this.generateDynamicComponents();
6451
+ }
6452
+ generateDynamicComponents() {
6453
+ if (!this.componentFactories)
6454
+ return;
6455
+ if (this.componentFactories.top && this.topTpl()) {
6456
+ if (!this.topTpl()?.get(0)) {
6457
+ this.topTpl()?.createComponent(this.componentFactories.top);
6458
+ }
6459
+ }
6460
+ }
6461
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ListMobileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
6462
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.0", type: ListMobileComponent, isStandalone: true, selector: "smart-list-mobile", viewQueries: [{ propertyName: "topTpl", first: true, predicate: ["topTpl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div #topTpl></div>\n\n@let list = listMobile();\n@if (list) {\n <!-- <ion-list>-->\n @for (item of list; track item.id) {\n <!-- <ion-item-sliding>-->\n @if (removeHandler && (!checkRemoveHandler || checkRemoveHandler(item))) {\n <!-- <ion-item-options side=\"start\" (ionSwipe)=\"removeHandler?.(item)\">-->\n <!-- <ion-item-option-->\n <!-- color=\"danger\"-->\n <!-- expandable-->\n <!-- (click)=\"removeHandler?.(item)\"-->\n <!-- >-->\n {{ 'delete' | translate }}\n <!-- </ion-item-option>-->\n <!-- </ion-item-options>-->\n }\n\n <!-- <ion-item class=\"pl-5\" (click)=\"itemHandler ? itemHandler(item.id) : unselect()\">-->\n <!-- <ion-label>-->\n @for (key of keys; track key) {\n @let cell = item | smartListCell: key : cellPipe : type;\n @if (cell) {\n @if (cell.type === FieldType.image) {\n <img\n [attr.smart-item-key]=\"key\"\n height=\"100\"\n [lazyLoad]=\"cell.value | smartFileUrl\"\n alt=\"\"\n src=\"\"\n />\n } @else if ($first) {\n <h2 [attr.smart-item-key]=\"key\" [innerHTML]=\"cell.value\"></h2>\n } @else {\n <p [attr.smart-item-key]=\"key\" [innerHTML]=\"cell.value\"></p>\n }\n }\n }\n <!-- </ion-label>-->\n <!-- </ion-item>-->\n <!-- </ion-item-sliding>-->\n }\n <!-- </ion-list>-->\n}\n\n@if (\n loadNextPage &&\n list?.length &&\n options().pagination?.mode !== PaginationMode.singlePage\n) {\n <!-- <ion-infinite-scroll threshold=\"100px\" (ionInfinite)=\"loadNextPage?.($event)\">-->\n <!-- <ion-infinite-scroll-content-->\n <!-- loadingSpinner=\"circles\"-->\n <!-- ></ion-infinite-scroll-content>-->\n <!-- </ion-infinite-scroll>-->\n}\n\n@if (options()?.pagination?.mode === PaginationMode.singlePage) {\n <smart-paging\n [page]=\"page()\"\n [totalPages]=\"totalPages()\"\n (prevPage)=\"loadPrevPage?.()\"\n (nextPage)=\"loadNextPage?.()\"\n ></smart-paging>\n}\n", dependencies: [{ kind: "ngmodule", type: LazyLoadImageModule }, { kind: "directive", type: i1$2.LazyLoadImageDirective, selector: "[lazyLoad]", inputs: ["lazyLoad", "defaultImage", "errorImage", "scrollTarget", "customObservable", "offset", "useSrcset", "decode", "debug"], outputs: ["onStateChange"] }, { kind: "component", type: PagingComponent, selector: "smart-paging", inputs: ["page", "totalPages"], outputs: ["nextPage", "prevPage"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: FileUrlPipe, name: "smartFileUrl" }, { kind: "pipe", type: ListCellPipe, name: "smartListCell" }] });
6463
+ }
6464
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ListMobileComponent, decorators: [{
6465
+ type: Component,
6466
+ args: [{ selector: 'smart-list-mobile', imports: [
6467
+ TranslatePipe,
6468
+ FileUrlPipe,
6469
+ LazyLoadImageModule,
6470
+ PagingComponent,
6471
+ ListCellPipe,
6472
+ ], template: "<div #topTpl></div>\n\n@let list = listMobile();\n@if (list) {\n <!-- <ion-list>-->\n @for (item of list; track item.id) {\n <!-- <ion-item-sliding>-->\n @if (removeHandler && (!checkRemoveHandler || checkRemoveHandler(item))) {\n <!-- <ion-item-options side=\"start\" (ionSwipe)=\"removeHandler?.(item)\">-->\n <!-- <ion-item-option-->\n <!-- color=\"danger\"-->\n <!-- expandable-->\n <!-- (click)=\"removeHandler?.(item)\"-->\n <!-- >-->\n {{ 'delete' | translate }}\n <!-- </ion-item-option>-->\n <!-- </ion-item-options>-->\n }\n\n <!-- <ion-item class=\"pl-5\" (click)=\"itemHandler ? itemHandler(item.id) : unselect()\">-->\n <!-- <ion-label>-->\n @for (key of keys; track key) {\n @let cell = item | smartListCell: key : cellPipe : type;\n @if (cell) {\n @if (cell.type === FieldType.image) {\n <img\n [attr.smart-item-key]=\"key\"\n height=\"100\"\n [lazyLoad]=\"cell.value | smartFileUrl\"\n alt=\"\"\n src=\"\"\n />\n } @else if ($first) {\n <h2 [attr.smart-item-key]=\"key\" [innerHTML]=\"cell.value\"></h2>\n } @else {\n <p [attr.smart-item-key]=\"key\" [innerHTML]=\"cell.value\"></p>\n }\n }\n }\n <!-- </ion-label>-->\n <!-- </ion-item>-->\n <!-- </ion-item-sliding>-->\n }\n <!-- </ion-list>-->\n}\n\n@if (\n loadNextPage &&\n list?.length &&\n options().pagination?.mode !== PaginationMode.singlePage\n) {\n <!-- <ion-infinite-scroll threshold=\"100px\" (ionInfinite)=\"loadNextPage?.($event)\">-->\n <!-- <ion-infinite-scroll-content-->\n <!-- loadingSpinner=\"circles\"-->\n <!-- ></ion-infinite-scroll-content>-->\n <!-- </ion-infinite-scroll>-->\n}\n\n@if (options()?.pagination?.mode === PaginationMode.singlePage) {\n <smart-paging\n [page]=\"page()\"\n [totalPages]=\"totalPages()\"\n (prevPage)=\"loadPrevPage?.()\"\n (nextPage)=\"loadNextPage?.()\"\n ></smart-paging>\n}\n" }]
6473
+ }] });
6474
+
6475
+ class ListComponent extends CreateDynamicComponent('list') {
6476
+ _options;
6477
+ hardwareService = inject(HardwareService);
6478
+ mode = signal(ListMode.desktop, ...(ngDevMode ? [{ debugName: "mode" }] : []));
6479
+ ListMode = ListMode;
6480
+ options = input.required(...(ngDevMode ? [{ debugName: "options" }] : []));
6481
+ get internalOptions() {
6482
+ return this._options();
6483
+ }
6484
+ contentTpl = viewChild('contentTpl', ...(ngDevMode ? [{ debugName: "contentTpl" }] : []));
6485
+ dynamicContents = viewChildren(DynamicContentDirective, ...(ngDevMode ? [{ debugName: "dynamicContents" }] : []));
6486
+ constructor() {
6487
+ super();
6488
+ effect(() => {
6489
+ this._options.set(this.options());
6490
+ this.initFields();
6491
+ this.initModel();
6492
+ this.refreshDynamicInstance();
6493
+ });
6494
+ }
6495
+ refreshProperties() {
6496
+ this.baseComponentRef.setInput('options', this._options());
6497
+ }
6498
+ initFields() {
6499
+ this._options.update((options) => {
6500
+ return {
6501
+ ...options,
6502
+ fields: _.sortBy(getModelFieldsWithOptions(new (this._options().type)()).filter((item) => item?.options?.list), (item) => (item?.options?.list).order),
6503
+ };
6504
+ });
6505
+ }
6506
+ initModel() {
6507
+ this.mode = computed(() => this._options()?.mode ??
6508
+ (this.hardwareService.isMobile ? ListMode.mobile : ListMode.desktop), ...(ngDevMode ? [{ debugName: "mode" }] : []));
6509
+ }
6510
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6511
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.0", type: ListComponent, isStandalone: true, selector: "smart-list", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "contentTpl", first: true, predicate: ["contentTpl"], descendants: true, isSignal: true }, { propertyName: "dynamicContents", predicate: DynamicContentDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (template() === 'default') {\n @switch (mode()) {\n @case (ListMode.desktop) {\n <smart-list-desktop [options]=\"internalOptions\"></smart-list-desktop>\n }\n @case (ListMode.mobile) {\n <smart-list-mobile [options]=\"internalOptions\"></smart-list-mobile>\n }\n @case (ListMode.masonryGrid) {\n <smart-list-masonry-grid\n [options]=\"internalOptions\"\n ></smart-list-masonry-grid>\n }\n }\n\n <!-- <ion-row>-->\n <!-- <ion-col></ion-col>-->\n <!-- <ion-col size=\"auto\">-->\n @let loading = internalOptions?.provider?.loading();\n <smart-loader [show]=\"loading ?? false\"></smart-loader>\n @if (!loading && !internalOptions.provider.list()?.length) {\n <h2>\n <br />\n {{ 'noResults' | translate }}\n </h2>\n }\n <!-- </ion-col>-->\n <!-- <ion-col></ion-col>-->\n <!-- </ion-row>-->\n\n <ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n}\n\n<ng-template #contentTpl>\n <ng-content></ng-content>\n</ng-template>\n<div class=\"dynamic-content\"></div>\n", dependencies: [{ kind: "component", type: ListDesktopComponent, selector: "smart-list-desktop" }, { kind: "component", type: ListMobileComponent, selector: "smart-list-mobile" }, { kind: "component", type: ListMasonryGridComponent, selector: "smart-list-masonry-grid" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LoaderComponent, selector: "smart-loader", inputs: ["show", "height"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
6512
+ }
6513
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ListComponent, decorators: [{
6756
6514
  type: Component,
6757
- args: [{ selector: 'smart-list-desktop', imports: [
6758
- NgTemplateOutlet,
6759
- ListHeaderPipe,
6760
- ListCellPipe,
6761
- LazyLoadImageModule,
6762
- FileUrlPipe,
6515
+ args: [{ selector: 'smart-list', encapsulation: ViewEncapsulation.None, imports: [
6516
+ ListDesktopComponent,
6517
+ ListMobileComponent,
6518
+ ListMasonryGridComponent,
6763
6519
  TranslatePipe,
6764
- PagingComponent,
6765
- CdkTable,
6766
- CdkHeaderCell,
6767
- CdkCell,
6768
- CdkHeaderRow,
6769
- CdkRow,
6770
- ], template: "<div #topTpl></div>\n\n<!--<ion-content>-->\n<div class=\"w-full overflow-y-auto\">\n <table\n cdk-table\n [dataSource]=\"list() ?? []\"\n [trackBy]=\"myTrackById\"\n class=\"w-full overflow-y-auto\"\n >\n @for (key of desktopKeys; track key) {\n @let last = $last;\n <ng-container class=\"col-sm text-left\">\n <div>\n @switch (key) {\n @case ('selectMulti') {\n <th cdk-header-cell class=\"w-5\" *matHeaderCellDef></th>\n <td cdk-cell>\n @let list = desktopList();\n @if (list) {\n <!-- <ion-checkbox-->\n <!-- style=\"margin-right: 15px\"-->\n <!-- (ionChange)=\"-->\n <!-- onChangeMultiselect(-->\n <!-- $event.detail.checked,-->\n <!-- element,-->\n <!-- list-->\n <!-- )-->\n <!-- \"-->\n <!-- ></ion-checkbox>-->\n }\n </td>\n }\n @case ('removeAction') {\n <th cdk-header-cell class=\"w-5\" *matHeaderCellDef>\n <ng-container *ngTemplateOutlet=\"pagination\"></ng-container>\n </th>\n <td cdk-cell *matCellDef=\"let element\">\n @if (!checkRemoveHandler || checkRemoveHandler(element)) {\n <!-- <ion-button (click)=\"removeHandler?.(element)\">-->\n <!-- <ion-icon slot=\"icon-only\" name=\"trash\"></ion-icon>-->\n <!-- </ion-button>-->\n }\n </td>\n }\n @case ('detailsAction') {\n <th cdk-header-cell class=\"w-5\" *matHeaderCellDef>\n <ng-container *ngTemplateOutlet=\"pagination\"></ng-container>\n </th>\n <td cdk-cell *matCellDef=\"let element\">\n <!-- <ion-button-->\n <!-- (click)=\"detailsButtonOptions.click()\"-->\n <!-- [smartDetails]=\"{-->\n <!-- component: detailsComponent,-->\n <!-- params: detailsComponentProps,-->\n <!-- mode: 'bottom',-->\n <!-- }\"-->\n <!-- (smartDetailsShowed)=\"select(element.id)\"-->\n <!-- >-->\n <!-- <ion-icon-->\n <!-- slot=\"icon-only\"-->\n <!-- name=\"ellipsis-vertical-outline\"-->\n <!-- ></ion-icon>-->\n <!-- </ion-button>-->\n </td>\n }\n @case ('itemAction') {\n <th cdk-header-cell class=\"w-5\">\n <ng-container *ngTemplateOutlet=\"pagination\"></ng-container>\n </th>\n <td cdk-cell *matCellDef=\"let element\">\n <!-- <ion-button (click)=\"itemHandler?.(element.id)\">-->\n <!-- <ion-icon-->\n <!-- slot=\"icon-only\"-->\n <!-- name=\"arrow-forward-outline\"-->\n <!-- ></ion-icon>-->\n <!-- </ion-button>-->\n </td>\n }\n @default {\n <th cdk-header-cell>\n {{ (list() | smartListHeader: key : type)() }}\n <ng-container *ngTemplateOutlet=\"pagination\"></ng-container>\n </th>\n <ng-container *matCellDef=\"let element\">\n @let cell = element | smartListCell: key : cellPipe : type;\n @if (cell) {\n <td\n cdk-cell\n [attr.smart-item-key]=\"key\"\n [style.width.px]=\"cell.type === FieldType.image ? 60 : null\"\n [style.textAlign]=\"\n cell.type === FieldType.image ? 'center' : null\n \"\n >\n @if (cell.type === FieldType.image) {\n <img\n height=\"50\"\n [lazyLoad]=\"cell.value | smartFileUrl\"\n alt=\"\"\n src=\"\"\n />\n } @else {\n <div\n class=\"min-h-8 pt-1.5\"\n [innerHTML]=\"cell.value\"\n ></div>\n }\n </td>\n } @else {\n <td cdk-cell></td>\n }\n </ng-container>\n }\n }\n </div>\n\n <ng-template #pagination>\n @if (last && loadNextPage && totalPages()) {\n <div style=\"float: right\">\n <!-- <ion-chip>-->\n {{ 'page' | translate }}:\n <b>{{ page() }}/{{ totalPages() }}</b>\n <!-- </ion-chip>-->\n </div>\n }\n </ng-template>\n </ng-container>\n }\n\n <tr cdk-header-row *matHeaderRowDef=\"desktopKeys ?? []; sticky: true\"></tr>\n <tr cdk-row *matRowDef=\"let row; columns: desktopKeys ?? []\"></tr>\n </table>\n</div>\n\n@if (\n loadNextPage &&\n Object.keys(list() ?? [])?.length &&\n options().pagination?.mode !== PaginationMode.singlePage\n) {\n <!-- <ion-infinite-scroll threshold=\"100px\" (ionInfinite)=\"loadNextPage($event)\">-->\n <!-- <ion-infinite-scroll-content-->\n <!-- loadingSpinner=\"circles\"-->\n <!-- ></ion-infinite-scroll-content>-->\n <!-- </ion-infinite-scroll>-->\n}\n<!--</ion-content>-->\n\n@if (options()?.pagination?.mode === PaginationMode.singlePage) {\n <smart-paging\n [page]=\"page()\"\n [totalPages]=\"totalPages()\"\n (prevPage)=\"loadPrevPage?.()\"\n (nextPage)=\"loadNextPage?.()\"\n ></smart-paging>\n}\n", styles: ["table .mat-row,table .mat-header-row{background:#fff;min-width:1200px}.wrapper{height:100%}.mat-row,.mat-header-row{min-width:1200px}\n"] }]
6771
- }] });
6520
+ NgTemplateOutlet,
6521
+ LoaderComponent,
6522
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (template() === 'default') {\n @switch (mode()) {\n @case (ListMode.desktop) {\n <smart-list-desktop [options]=\"internalOptions\"></smart-list-desktop>\n }\n @case (ListMode.mobile) {\n <smart-list-mobile [options]=\"internalOptions\"></smart-list-mobile>\n }\n @case (ListMode.masonryGrid) {\n <smart-list-masonry-grid\n [options]=\"internalOptions\"\n ></smart-list-masonry-grid>\n }\n }\n\n <!-- <ion-row>-->\n <!-- <ion-col></ion-col>-->\n <!-- <ion-col size=\"auto\">-->\n @let loading = internalOptions?.provider?.loading();\n <smart-loader [show]=\"loading ?? false\"></smart-loader>\n @if (!loading && !internalOptions.provider.list()?.length) {\n <h2>\n <br />\n {{ 'noResults' | translate }}\n </h2>\n }\n <!-- </ion-col>-->\n <!-- <ion-col></ion-col>-->\n <!-- </ion-row>-->\n\n <ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n}\n\n<ng-template #contentTpl>\n <ng-content></ng-content>\n</ng-template>\n<div class=\"dynamic-content\"></div>\n" }]
6523
+ }], ctorParameters: () => [] });
6772
6524
 
6773
- class ListMasonryGridComponent extends ListBaseComponent {
6774
- componentFactories = null;
6775
- listWithImages;
6776
- topTpl = viewChild('topTpl', ...(ngDevMode ? [{ debugName: "topTpl" }] : []));
6777
- ngAfterViewInit() {
6778
- this.generateDynamicComponents();
6525
+ class DetailsPage {
6526
+ modalService = inject(ModalService);
6527
+ styleService = inject(StyleService);
6528
+ elementRef = inject(ElementRef);
6529
+ // navParams: NavParams, //TODO: to be injected
6530
+ pageOptions = signal({
6531
+ title: 'details',
6532
+ hideMenuButton: true,
6533
+ }, ...(ngDevMode ? [{ debugName: "pageOptions" }] : []));
6534
+ detailsOptions;
6535
+ constructor() {
6536
+ this.detailsOptions = /*navParams.get('value')*/ {};
6537
+ this.initTitle();
6538
+ this.initButtons();
6779
6539
  }
6780
- afterInitOptions() {
6781
- const fieldOptions = getModelFieldsWithOptions(new this.type());
6782
- const imageFieldOptions = fieldOptions.find((item) => item.options.type === FieldType.image);
6783
- this.listWithImages = computed(() => {
6784
- const list = this.list();
6785
- if (!list)
6786
- return null;
6787
- return list.map((item) => {
6540
+ ngOnInit() {
6541
+ this.styleService.init(this.elementRef);
6542
+ }
6543
+ initTitle() {
6544
+ this.pageOptions.update((options) => {
6545
+ if (this.detailsOptions.title) {
6788
6546
  return {
6789
- data: item,
6790
- image: item[imageFieldOptions?.key ?? ''],
6547
+ ...options,
6548
+ title: this.detailsOptions.title,
6791
6549
  };
6792
- });
6793
- }, ...(ngDevMode ? [{ debugName: "listWithImages" }] : []));
6794
- }
6795
- initList(val) {
6796
- super.initList(val);
6797
- this.componentFactories = val?.componentFactories ?? null;
6798
- this.generateDynamicComponents();
6799
- }
6800
- generateDynamicComponents() {
6801
- if (!this.componentFactories)
6802
- return;
6803
- if (this.componentFactories.top && this.topTpl()) {
6804
- if (!this.topTpl()?.get(0)) {
6805
- this.topTpl()?.createComponent(this.componentFactories.top);
6806
6550
  }
6551
+ return options;
6552
+ });
6553
+ }
6554
+ initButtons() {
6555
+ const buttons = [];
6556
+ if (this.detailsOptions.removeHandler) {
6557
+ buttons.push({
6558
+ handler: () => {
6559
+ computed(() => {
6560
+ const item = this.detailsOptions.item();
6561
+ this.detailsOptions?.removeHandler?.(item);
6562
+ this.modalService.dismiss();
6563
+ });
6564
+ },
6565
+ icon: 'trash',
6566
+ });
6567
+ }
6568
+ if (this.detailsOptions.itemHandler) {
6569
+ buttons.push({
6570
+ handler: () => {
6571
+ computed(() => {
6572
+ const item = this.detailsOptions.item();
6573
+ this.detailsOptions?.removeHandler?.(item);
6574
+ this.modalService.dismiss();
6575
+ });
6576
+ },
6577
+ icon: 'arrow-forward-outline',
6578
+ });
6807
6579
  }
6580
+ this.pageOptions.update((options) => ({ ...options, endButtons: buttons }));
6808
6581
  }
6809
- Object = Object;
6810
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ListMasonryGridComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
6811
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.0", type: ListMasonryGridComponent, isStandalone: true, selector: "smart-list-masonry-grid", viewQueries: [{ propertyName: "topTpl", first: true, predicate: ["topTpl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div #topTpl></div>\n\n<div class=\"ion-padding\">\n <div class=\"gap-3\">\n @for (item of listWithImages(); track item) {\n <!-- <ion-card class=\"w-full my-2.5 break-inside-avoid border border-gray-100\" (click)=\"unselect?.()\">-->\n @if (item.image) {\n <img [ngSrc]=\"item.image | smartFileUrl\" alt=\"\" fill />\n }\n\n <!-- <ion-card-content class=\"overflow-hidden after:block after:w-full after:bg-gradient-to-r after:from-transparent after:to-white after:absolute after:bottom-0\">-->\n @for (key of keys; track key) {\n @let cell = item.data | smartListCell: key : cellPipe : type;\n @if (cell && cell.value != item.image) {\n @if ($index < 2) {\n <h3\n [attr.smart-item-key]=\"key\"\n class=\"text-gray-800\"\n [innerHTML]=\"cell.value\"\n ></h3>\n } @else {\n <p\n [attr.smart-item-key]=\"key\"\n class=\"text-gray-500\"\n [innerHTML]=\"cell.value\"\n ></p>\n }\n }\n }\n <!-- </ion-card-content>-->\n\n <!-- <ion-row>-->\n @if (removeHandler) {\n <!-- <ion-col size=\"auto\">-->\n @if (!checkRemoveHandler || checkRemoveHandler(item.data)) {\n <!-- <ion-button (click)=\"removeHandler?.(item.data)\">-->\n <!-- <ion-icon slot=\"icon-only\" name=\"trash\"></ion-icon>-->\n <!-- </ion-button>-->\n }\n <!-- </ion-col>-->\n }\n <!-- <ion-col></ion-col>-->\n @if (itemHandler) {\n <!-- <ion-col size=\"auto\">-->\n <!-- <ion-button (click)=\"itemHandler?.(item.data.id)\">-->\n <!-- <ion-icon-->\n <!-- slot=\"icon-only\"-->\n <!-- name=\"arrow-forward-outline\"-->\n <!-- ></ion-icon>-->\n <!-- </ion-button>-->\n <!-- </ion-col>-->\n }\n <!-- </ion-row>-->\n <!-- </ion-card>-->\n }\n </div>\n</div>\n\n@if (\n loadNextPage &&\n Object.keys(list() ?? [])?.length &&\n options().pagination?.mode !== PaginationMode.singlePage\n) {\n <!-- <ion-infinite-scroll threshold=\"100px\" (ionInfinite)=\"loadNextPage?.($event)\">-->\n <!-- <ion-infinite-scroll-content loadingSpinner=\"circles\">-->\n <!-- </ion-infinite-scroll-content>-->\n <!-- </ion-infinite-scroll>-->\n}\n\n@if (options()?.pagination?.mode === PaginationMode.singlePage) {\n <smart-paging\n [page]=\"page()\"\n [totalPages]=\"totalPages()\"\n (prevPage)=\"loadPrevPage?.()\"\n (nextPage)=\"loadNextPage?.()\"\n ></smart-paging>\n}\n", dependencies: [{ kind: "component", type: PagingComponent, selector: "smart-paging", inputs: ["page", "totalPages"], outputs: ["nextPage", "prevPage"] }, { kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "decoding", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }, { kind: "pipe", type: FileUrlPipe, name: "smartFileUrl" }, { kind: "pipe", type: ListCellPipe, name: "smartListCell" }] });
6582
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: DetailsPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
6583
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.0", type: DetailsPage, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<smart-page [options]=\"pageOptions()\">\n <smart-details #smartDetails [options]=\"detailsOptions\"></smart-details>\n</smart-page>\n", styles: [":host{width:100%}\n"], dependencies: [{ kind: "component", type: PageComponent, selector: "smart-page", inputs: ["options"] }, { kind: "component", type: DetailsComponent, selector: "smart-details", inputs: ["options"] }] });
6584
+ }
6585
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: DetailsPage, decorators: [{
6586
+ type: Component,
6587
+ args: [{ imports: [PageComponent, DetailsComponent], template: "<smart-page [options]=\"pageOptions()\">\n <smart-details #smartDetails [options]=\"detailsOptions\"></smart-details>\n</smart-page>\n", styles: [":host{width:100%}\n"] }]
6588
+ }], ctorParameters: () => [] });
6589
+
6590
+ const ACCORDION_COMPONENTS = [
6591
+ AccordionComponent,
6592
+ AccordionHeaderComponent,
6593
+ AccordionBodyComponent,
6594
+ ];
6595
+ const BUTTON_COMPONENTS = [ButtonComponent, ButtonStandardComponent];
6596
+ const CARD_COMPONENTS = [CardComponent];
6597
+ const DETAILS_COMPONENTS = [DetailsComponent, DetailsStandardComponent];
6598
+ const DETAIL_COMPONENTS = [
6599
+ DetailComponent,
6600
+ DetailTextComponent,
6601
+ DetailFlagComponent,
6602
+ DetailEnumComponent,
6603
+ DetailEmailComponent,
6604
+ DetailAddressComponent,
6605
+ DetailObjectComponent,
6606
+ DetailColorComponent,
6607
+ DetailLogoComponent,
6608
+ DetailArrayComponent,
6609
+ DetailPdfComponent,
6610
+ DetailVideoComponent,
6611
+ DetailAttachmentComponent,
6612
+ DetailDateRangeComponent,
6613
+ DetailImageComponent,
6614
+ DetailPhoneNumberPlComponent,
6615
+ ];
6616
+ const FORM_COMPONENTS = [
6617
+ FormStandardComponent,
6618
+ FormComponent,
6619
+ ];
6620
+ const INPUT_COMPONENTS = [
6621
+ InputComponent,
6622
+ InputIntComponent,
6623
+ InputErrorComponent,
6624
+ InputTextComponent,
6625
+ InputPasswordComponent,
6626
+ InputFlagComponent,
6627
+ InputEnumComponent,
6628
+ InputEmailComponent,
6629
+ InputCurrencyComponent,
6630
+ InputDateComponent,
6631
+ InputDateWithEditComponent,
6632
+ InputFileComponent,
6633
+ InputRadioComponent,
6634
+ InputNipComponent,
6635
+ InputStringsComponent,
6636
+ InputLongTextComponent,
6637
+ InputAddressComponent,
6638
+ InputObjectComponent,
6639
+ InputColorComponent,
6640
+ InputLogoComponent,
6641
+ InputCheckComponent,
6642
+ InputIntsComponent,
6643
+ InputPhoneNumberComponent,
6644
+ InputPhoneNumberPlComponent,
6645
+ InputPeselComponent,
6646
+ InputArrayComponent,
6647
+ InputPdfComponent,
6648
+ InputVideoComponent,
6649
+ InputAttachmentComponent,
6650
+ InputDateRangeComponent,
6651
+ InputImageComponent,
6652
+ InputFloatComponent,
6653
+ ];
6654
+ const LIST_COMPONENTS = [
6655
+ ListComponent,
6656
+ ListMobileComponent,
6657
+ ListDesktopComponent,
6658
+ ListMasonryGridComponent,
6659
+ ];
6660
+ const LOADER_COMPONENTS = [LoaderComponent];
6661
+ const PAGE_COMPONENTS = [PageStandardComponent, PageComponent];
6662
+ const INFO_COMPONENTS = [InfoComponent, InfoModalComponent];
6663
+ const DATE_RANGE_COMPONENTS = [
6664
+ DateRangeComponent,
6665
+ DateRangeModalComponent,
6666
+ ];
6667
+ const DATE_EDIT_COMPONENTS = [DateEditComponent];
6668
+ const DYNAMIC_COMPONENTS = [DynamicComponent];
6669
+ const COMPONENTS$1 = [
6670
+ ...FORM_COMPONENTS,
6671
+ ...INPUT_COMPONENTS,
6672
+ ...PAGE_COMPONENTS,
6673
+ ...ACCORDION_COMPONENTS,
6674
+ ...DATE_RANGE_COMPONENTS,
6675
+ ...DATE_EDIT_COMPONENTS,
6676
+ ...BUTTON_COMPONENTS,
6677
+ ...CARD_COMPONENTS,
6678
+ ...LIST_COMPONENTS,
6679
+ ...LOADER_COMPONENTS,
6680
+ ...DETAIL_COMPONENTS,
6681
+ ...DETAILS_COMPONENTS,
6682
+ ...DYNAMIC_COMPONENTS,
6683
+ ...INFO_COMPONENTS,
6684
+ ExportComponent,
6685
+ ImportComponent,
6686
+ PasswordStrengthComponent,
6687
+ ];
6688
+ const IMPORTS = [
6689
+ CommonModule,
6690
+ ReactiveFormsModule,
6691
+ FormsModule,
6692
+ TranslateModule,
6693
+ RouterModule,
6694
+ SharedPipesModule,
6695
+ SharedDirectivesModule,
6696
+ HttpClientModule,
6697
+ LazyLoadImageModule,
6698
+ DragDropModule,
6699
+ CdkTableModule,
6700
+ DynamicModule,
6701
+ ];
6702
+ class SharedComponentsModule {
6703
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: SharedComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6704
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.0", ngImport: i0, type: SharedComponentsModule, imports: [CommonModule,
6705
+ ReactiveFormsModule,
6706
+ FormsModule,
6707
+ TranslateModule,
6708
+ RouterModule,
6709
+ SharedPipesModule,
6710
+ SharedDirectivesModule,
6711
+ HttpClientModule,
6712
+ LazyLoadImageModule,
6713
+ DragDropModule,
6714
+ CdkTableModule,
6715
+ DynamicModule, FormStandardComponent,
6716
+ FormComponent, InputComponent,
6717
+ InputIntComponent,
6718
+ InputErrorComponent,
6719
+ InputTextComponent,
6720
+ InputPasswordComponent,
6721
+ InputFlagComponent,
6722
+ InputEnumComponent,
6723
+ InputEmailComponent,
6724
+ InputCurrencyComponent,
6725
+ InputDateComponent,
6726
+ InputDateWithEditComponent,
6727
+ InputFileComponent,
6728
+ InputRadioComponent,
6729
+ InputNipComponent,
6730
+ InputStringsComponent,
6731
+ InputLongTextComponent,
6732
+ InputAddressComponent,
6733
+ InputObjectComponent,
6734
+ InputColorComponent,
6735
+ InputLogoComponent,
6736
+ InputCheckComponent,
6737
+ InputIntsComponent,
6738
+ InputPhoneNumberComponent,
6739
+ InputPhoneNumberPlComponent,
6740
+ InputPeselComponent,
6741
+ InputArrayComponent,
6742
+ InputPdfComponent,
6743
+ InputVideoComponent,
6744
+ InputAttachmentComponent,
6745
+ InputDateRangeComponent,
6746
+ InputImageComponent,
6747
+ InputFloatComponent, PageStandardComponent, PageComponent, AccordionComponent,
6748
+ AccordionHeaderComponent,
6749
+ AccordionBodyComponent, DateRangeComponent,
6750
+ DateRangeModalComponent, DateEditComponent, ButtonComponent, ButtonStandardComponent, CardComponent, ListComponent,
6751
+ ListMobileComponent,
6752
+ ListDesktopComponent,
6753
+ ListMasonryGridComponent, LoaderComponent, DetailComponent,
6754
+ DetailTextComponent,
6755
+ DetailFlagComponent,
6756
+ DetailEnumComponent,
6757
+ DetailEmailComponent,
6758
+ DetailAddressComponent,
6759
+ DetailObjectComponent,
6760
+ DetailColorComponent,
6761
+ DetailLogoComponent,
6762
+ DetailArrayComponent,
6763
+ DetailPdfComponent,
6764
+ DetailVideoComponent,
6765
+ DetailAttachmentComponent,
6766
+ DetailDateRangeComponent,
6767
+ DetailImageComponent,
6768
+ DetailPhoneNumberPlComponent, DetailsComponent, DetailsStandardComponent, DynamicComponent, InfoComponent, InfoModalComponent, ExportComponent,
6769
+ ImportComponent,
6770
+ PasswordStrengthComponent], exports: [FormStandardComponent,
6771
+ FormComponent, InputComponent,
6772
+ InputIntComponent,
6773
+ InputErrorComponent,
6774
+ InputTextComponent,
6775
+ InputPasswordComponent,
6776
+ InputFlagComponent,
6777
+ InputEnumComponent,
6778
+ InputEmailComponent,
6779
+ InputCurrencyComponent,
6780
+ InputDateComponent,
6781
+ InputDateWithEditComponent,
6782
+ InputFileComponent,
6783
+ InputRadioComponent,
6784
+ InputNipComponent,
6785
+ InputStringsComponent,
6786
+ InputLongTextComponent,
6787
+ InputAddressComponent,
6788
+ InputObjectComponent,
6789
+ InputColorComponent,
6790
+ InputLogoComponent,
6791
+ InputCheckComponent,
6792
+ InputIntsComponent,
6793
+ InputPhoneNumberComponent,
6794
+ InputPhoneNumberPlComponent,
6795
+ InputPeselComponent,
6796
+ InputArrayComponent,
6797
+ InputPdfComponent,
6798
+ InputVideoComponent,
6799
+ InputAttachmentComponent,
6800
+ InputDateRangeComponent,
6801
+ InputImageComponent,
6802
+ InputFloatComponent, PageStandardComponent, PageComponent, AccordionComponent,
6803
+ AccordionHeaderComponent,
6804
+ AccordionBodyComponent, DateRangeComponent,
6805
+ DateRangeModalComponent, DateEditComponent, ButtonComponent, ButtonStandardComponent, CardComponent, ListComponent,
6806
+ ListMobileComponent,
6807
+ ListDesktopComponent,
6808
+ ListMasonryGridComponent, LoaderComponent, DetailComponent,
6809
+ DetailTextComponent,
6810
+ DetailFlagComponent,
6811
+ DetailEnumComponent,
6812
+ DetailEmailComponent,
6813
+ DetailAddressComponent,
6814
+ DetailObjectComponent,
6815
+ DetailColorComponent,
6816
+ DetailLogoComponent,
6817
+ DetailArrayComponent,
6818
+ DetailPdfComponent,
6819
+ DetailVideoComponent,
6820
+ DetailAttachmentComponent,
6821
+ DetailDateRangeComponent,
6822
+ DetailImageComponent,
6823
+ DetailPhoneNumberPlComponent, DetailsComponent, DetailsStandardComponent, DynamicComponent, InfoComponent, InfoModalComponent, ExportComponent,
6824
+ ImportComponent,
6825
+ PasswordStrengthComponent] });
6826
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: SharedComponentsModule, providers: [
6827
+ {
6828
+ provide: FORM_COMPONENT_TOKEN,
6829
+ useValue: FormComponent,
6830
+ },
6831
+ {
6832
+ provide: DETAILS_COMPONENT_TOKEN,
6833
+ useValue: DetailsComponent,
6834
+ },
6835
+ ], imports: [IMPORTS, FormStandardComponent,
6836
+ FormComponent, InputComponent,
6837
+ InputIntComponent,
6838
+ InputTextComponent,
6839
+ InputPasswordComponent,
6840
+ InputFlagComponent,
6841
+ InputEmailComponent,
6842
+ InputCurrencyComponent,
6843
+ InputDateComponent,
6844
+ InputDateWithEditComponent,
6845
+ InputRadioComponent,
6846
+ InputNipComponent,
6847
+ InputStringsComponent,
6848
+ InputLongTextComponent,
6849
+ InputAddressComponent,
6850
+ InputCheckComponent,
6851
+ InputIntsComponent,
6852
+ InputPhoneNumberComponent,
6853
+ InputPhoneNumberPlComponent,
6854
+ InputPeselComponent,
6855
+ InputFloatComponent, PageStandardComponent, PageComponent, DateEditComponent, ListComponent,
6856
+ ListMobileComponent,
6857
+ ListDesktopComponent, DynamicComponent] });
6812
6858
  }
6813
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ListMasonryGridComponent, decorators: [{
6814
- type: Component,
6815
- args: [{ selector: 'smart-list-masonry-grid', imports: [PagingComponent, FileUrlPipe, NgOptimizedImage, ListCellPipe], template: "<div #topTpl></div>\n\n<div class=\"ion-padding\">\n <div class=\"gap-3\">\n @for (item of listWithImages(); track item) {\n <!-- <ion-card class=\"w-full my-2.5 break-inside-avoid border border-gray-100\" (click)=\"unselect?.()\">-->\n @if (item.image) {\n <img [ngSrc]=\"item.image | smartFileUrl\" alt=\"\" fill />\n }\n\n <!-- <ion-card-content class=\"overflow-hidden after:block after:w-full after:bg-gradient-to-r after:from-transparent after:to-white after:absolute after:bottom-0\">-->\n @for (key of keys; track key) {\n @let cell = item.data | smartListCell: key : cellPipe : type;\n @if (cell && cell.value != item.image) {\n @if ($index < 2) {\n <h3\n [attr.smart-item-key]=\"key\"\n class=\"text-gray-800\"\n [innerHTML]=\"cell.value\"\n ></h3>\n } @else {\n <p\n [attr.smart-item-key]=\"key\"\n class=\"text-gray-500\"\n [innerHTML]=\"cell.value\"\n ></p>\n }\n }\n }\n <!-- </ion-card-content>-->\n\n <!-- <ion-row>-->\n @if (removeHandler) {\n <!-- <ion-col size=\"auto\">-->\n @if (!checkRemoveHandler || checkRemoveHandler(item.data)) {\n <!-- <ion-button (click)=\"removeHandler?.(item.data)\">-->\n <!-- <ion-icon slot=\"icon-only\" name=\"trash\"></ion-icon>-->\n <!-- </ion-button>-->\n }\n <!-- </ion-col>-->\n }\n <!-- <ion-col></ion-col>-->\n @if (itemHandler) {\n <!-- <ion-col size=\"auto\">-->\n <!-- <ion-button (click)=\"itemHandler?.(item.data.id)\">-->\n <!-- <ion-icon-->\n <!-- slot=\"icon-only\"-->\n <!-- name=\"arrow-forward-outline\"-->\n <!-- ></ion-icon>-->\n <!-- </ion-button>-->\n <!-- </ion-col>-->\n }\n <!-- </ion-row>-->\n <!-- </ion-card>-->\n }\n </div>\n</div>\n\n@if (\n loadNextPage &&\n Object.keys(list() ?? [])?.length &&\n options().pagination?.mode !== PaginationMode.singlePage\n) {\n <!-- <ion-infinite-scroll threshold=\"100px\" (ionInfinite)=\"loadNextPage?.($event)\">-->\n <!-- <ion-infinite-scroll-content loadingSpinner=\"circles\">-->\n <!-- </ion-infinite-scroll-content>-->\n <!-- </ion-infinite-scroll>-->\n}\n\n@if (options()?.pagination?.mode === PaginationMode.singlePage) {\n <smart-paging\n [page]=\"page()\"\n [totalPages]=\"totalPages()\"\n (prevPage)=\"loadPrevPage?.()\"\n (nextPage)=\"loadNextPage?.()\"\n ></smart-paging>\n}\n" }]
6859
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: SharedComponentsModule, decorators: [{
6860
+ type: NgModule,
6861
+ args: [{
6862
+ declarations: [],
6863
+ exports: [...COMPONENTS$1],
6864
+ providers: [
6865
+ {
6866
+ provide: FORM_COMPONENT_TOKEN,
6867
+ useValue: FormComponent,
6868
+ },
6869
+ {
6870
+ provide: DETAILS_COMPONENT_TOKEN,
6871
+ useValue: DetailsComponent,
6872
+ },
6873
+ ],
6874
+ imports: [...IMPORTS, ...COMPONENTS$1],
6875
+ }]
6816
6876
  }] });
6817
6877
 
6818
- class ListMobileComponent extends ListBaseComponent {
6819
- listMobile = this.list;
6820
- componentFactories = null;
6821
- topTpl = viewChild('topTpl', ...(ngDevMode ? [{ debugName: "topTpl" }] : []));
6822
- initList(val) {
6823
- super.initList(val);
6824
- this.componentFactories = val.componentFactories ?? null;
6825
- this.generateDynamicComponents();
6826
- }
6827
- ngAfterViewInit() {
6828
- this.generateDynamicComponents();
6829
- }
6830
- generateDynamicComponents() {
6831
- if (!this.componentFactories)
6832
- return;
6833
- if (this.componentFactories.top && this.topTpl()) {
6834
- if (!this.topTpl()?.get(0)) {
6835
- this.topTpl()?.createComponent(this.componentFactories.top);
6836
- }
6837
- }
6838
- }
6839
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ListMobileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
6840
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.0", type: ListMobileComponent, isStandalone: true, selector: "smart-list-mobile", viewQueries: [{ propertyName: "topTpl", first: true, predicate: ["topTpl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div #topTpl></div>\n\n@let list = listMobile();\n@if (list) {\n <!-- <ion-list>-->\n @for (item of list; track item.id) {\n <!-- <ion-item-sliding>-->\n @if (removeHandler && (!checkRemoveHandler || checkRemoveHandler(item))) {\n <!-- <ion-item-options side=\"start\" (ionSwipe)=\"removeHandler?.(item)\">-->\n <!-- <ion-item-option-->\n <!-- color=\"danger\"-->\n <!-- expandable-->\n <!-- (click)=\"removeHandler?.(item)\"-->\n <!-- >-->\n {{ 'delete' | translate }}\n <!-- </ion-item-option>-->\n <!-- </ion-item-options>-->\n }\n\n <!-- <ion-item class=\"pl-5\" (click)=\"itemHandler ? itemHandler(item.id) : unselect()\">-->\n <!-- <ion-label>-->\n @for (key of keys; track key) {\n @let cell = item | smartListCell: key : cellPipe : type;\n @if (cell) {\n @if (cell.type === FieldType.image) {\n <img\n [attr.smart-item-key]=\"key\"\n height=\"100\"\n [lazyLoad]=\"cell.value | smartFileUrl\"\n alt=\"\"\n src=\"\"\n />\n } @else if ($first) {\n <h2 [attr.smart-item-key]=\"key\" [innerHTML]=\"cell.value\"></h2>\n } @else {\n <p [attr.smart-item-key]=\"key\" [innerHTML]=\"cell.value\"></p>\n }\n }\n }\n <!-- </ion-label>-->\n <!-- </ion-item>-->\n <!-- </ion-item-sliding>-->\n }\n <!-- </ion-list>-->\n}\n\n@if (\n loadNextPage &&\n list?.length &&\n options().pagination?.mode !== PaginationMode.singlePage\n) {\n <!-- <ion-infinite-scroll threshold=\"100px\" (ionInfinite)=\"loadNextPage?.($event)\">-->\n <!-- <ion-infinite-scroll-content-->\n <!-- loadingSpinner=\"circles\"-->\n <!-- ></ion-infinite-scroll-content>-->\n <!-- </ion-infinite-scroll>-->\n}\n\n@if (options()?.pagination?.mode === PaginationMode.singlePage) {\n <smart-paging\n [page]=\"page()\"\n [totalPages]=\"totalPages()\"\n (prevPage)=\"loadPrevPage?.()\"\n (nextPage)=\"loadNextPage?.()\"\n ></smart-paging>\n}\n", dependencies: [{ kind: "ngmodule", type: LazyLoadImageModule }, { kind: "directive", type: i1$2.LazyLoadImageDirective, selector: "[lazyLoad]", inputs: ["lazyLoad", "defaultImage", "errorImage", "scrollTarget", "customObservable", "offset", "useSrcset", "decode", "debug"], outputs: ["onStateChange"] }, { kind: "component", type: PagingComponent, selector: "smart-paging", inputs: ["page", "totalPages"], outputs: ["nextPage", "prevPage"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: FileUrlPipe, name: "smartFileUrl" }, { kind: "pipe", type: ListCellPipe, name: "smartListCell" }] });
6878
+ const COMPONENTS = [DetailsPage];
6879
+ class SharedPagesModule {
6880
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: SharedPagesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6881
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.0", ngImport: i0, type: SharedPagesModule, imports: [SharedServicesModule,
6882
+ SharedComponentsModule,
6883
+ SharedDirectivesModule, DetailsPage], exports: [DetailsPage] });
6884
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: SharedPagesModule, imports: [SharedServicesModule,
6885
+ SharedComponentsModule,
6886
+ SharedDirectivesModule,
6887
+ COMPONENTS] });
6841
6888
  }
6842
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ListMobileComponent, decorators: [{
6843
- type: Component,
6844
- args: [{ selector: 'smart-list-mobile', imports: [
6845
- TranslatePipe,
6846
- FileUrlPipe,
6847
- LazyLoadImageModule,
6848
- PagingComponent,
6849
- ListCellPipe,
6850
- ], template: "<div #topTpl></div>\n\n@let list = listMobile();\n@if (list) {\n <!-- <ion-list>-->\n @for (item of list; track item.id) {\n <!-- <ion-item-sliding>-->\n @if (removeHandler && (!checkRemoveHandler || checkRemoveHandler(item))) {\n <!-- <ion-item-options side=\"start\" (ionSwipe)=\"removeHandler?.(item)\">-->\n <!-- <ion-item-option-->\n <!-- color=\"danger\"-->\n <!-- expandable-->\n <!-- (click)=\"removeHandler?.(item)\"-->\n <!-- >-->\n {{ 'delete' | translate }}\n <!-- </ion-item-option>-->\n <!-- </ion-item-options>-->\n }\n\n <!-- <ion-item class=\"pl-5\" (click)=\"itemHandler ? itemHandler(item.id) : unselect()\">-->\n <!-- <ion-label>-->\n @for (key of keys; track key) {\n @let cell = item | smartListCell: key : cellPipe : type;\n @if (cell) {\n @if (cell.type === FieldType.image) {\n <img\n [attr.smart-item-key]=\"key\"\n height=\"100\"\n [lazyLoad]=\"cell.value | smartFileUrl\"\n alt=\"\"\n src=\"\"\n />\n } @else if ($first) {\n <h2 [attr.smart-item-key]=\"key\" [innerHTML]=\"cell.value\"></h2>\n } @else {\n <p [attr.smart-item-key]=\"key\" [innerHTML]=\"cell.value\"></p>\n }\n }\n }\n <!-- </ion-label>-->\n <!-- </ion-item>-->\n <!-- </ion-item-sliding>-->\n }\n <!-- </ion-list>-->\n}\n\n@if (\n loadNextPage &&\n list?.length &&\n options().pagination?.mode !== PaginationMode.singlePage\n) {\n <!-- <ion-infinite-scroll threshold=\"100px\" (ionInfinite)=\"loadNextPage?.($event)\">-->\n <!-- <ion-infinite-scroll-content-->\n <!-- loadingSpinner=\"circles\"-->\n <!-- ></ion-infinite-scroll-content>-->\n <!-- </ion-infinite-scroll>-->\n}\n\n@if (options()?.pagination?.mode === PaginationMode.singlePage) {\n <smart-paging\n [page]=\"page()\"\n [totalPages]=\"totalPages()\"\n (prevPage)=\"loadPrevPage?.()\"\n (nextPage)=\"loadNextPage?.()\"\n ></smart-paging>\n}\n" }]
6889
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: SharedPagesModule, decorators: [{
6890
+ type: NgModule,
6891
+ args: [{
6892
+ imports: [
6893
+ SharedServicesModule,
6894
+ SharedComponentsModule,
6895
+ SharedDirectivesModule,
6896
+ COMPONENTS,
6897
+ ],
6898
+ declarations: [],
6899
+ exports: [...COMPONENTS],
6900
+ }]
6851
6901
  }] });
6852
6902
 
6853
- class ListComponent extends CreateDynamicComponent('list') {
6854
- _options;
6855
- hardwareService = inject(HardwareService);
6856
- mode = signal(ListMode.desktop, ...(ngDevMode ? [{ debugName: "mode" }] : []));
6857
- ListMode = ListMode;
6858
- options = input.required(...(ngDevMode ? [{ debugName: "options" }] : []));
6859
- get internalOptions() {
6860
- return this._options();
6861
- }
6862
- contentTpl = viewChild('contentTpl', ...(ngDevMode ? [{ debugName: "contentTpl" }] : []));
6863
- dynamicContents = viewChildren(DynamicContentDirective, ...(ngDevMode ? [{ debugName: "dynamicContents" }] : []));
6864
- constructor() {
6865
- super();
6866
- effect(() => {
6867
- this._options.set(this.options());
6868
- this.initFields();
6869
- this.initModel();
6870
- this.refreshDynamicInstance();
6871
- });
6872
- }
6873
- refreshProperties() {
6874
- this.baseComponentRef.setInput('options', this._options());
6875
- }
6876
- initFields() {
6877
- this._options.update((options) => {
6878
- return {
6879
- ...options,
6880
- fields: _.sortBy(getModelFieldsWithOptions(new (this._options().type)()).filter((item) => item?.options?.list), (item) => (item?.options?.list).order),
6881
- };
6882
- });
6883
- }
6884
- initModel() {
6885
- this.mode = computed(() => this._options()?.mode ??
6886
- (this.hardwareService.isMobile ? ListMode.mobile : ListMode.desktop), ...(ngDevMode ? [{ debugName: "mode" }] : []));
6887
- }
6888
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6889
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.0", type: ListComponent, isStandalone: true, selector: "smart-list", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "contentTpl", first: true, predicate: ["contentTpl"], descendants: true, isSignal: true }, { propertyName: "dynamicContents", predicate: DynamicContentDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (template() === 'default') {\n @switch (mode()) {\n @case (ListMode.desktop) {\n <smart-list-desktop [options]=\"internalOptions\"></smart-list-desktop>\n }\n @case (ListMode.mobile) {\n <smart-list-mobile [options]=\"internalOptions\"></smart-list-mobile>\n }\n @case (ListMode.masonryGrid) {\n <smart-list-masonry-grid\n [options]=\"internalOptions\"\n ></smart-list-masonry-grid>\n }\n }\n\n <!-- <ion-row>-->\n <!-- <ion-col></ion-col>-->\n <!-- <ion-col size=\"auto\">-->\n @let loading = internalOptions?.provider?.loading();\n <smart-loader [show]=\"loading ?? false\"></smart-loader>\n @if (!loading && !internalOptions.provider.list()?.length) {\n <h2>\n <br />\n {{ 'noResults' | translate }}\n </h2>\n }\n <!-- </ion-col>-->\n <!-- <ion-col></ion-col>-->\n <!-- </ion-row>-->\n\n <ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n}\n\n<ng-template #contentTpl>\n <ng-content></ng-content>\n</ng-template>\n<div class=\"dynamic-content\"></div>\n", dependencies: [{ kind: "component", type: ListDesktopComponent, selector: "smart-list-desktop" }, { kind: "component", type: ListMobileComponent, selector: "smart-list-mobile" }, { kind: "component", type: ListMasonryGridComponent, selector: "smart-list-masonry-grid" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LoaderComponent, selector: "smart-loader", inputs: ["show", "height"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
6890
- }
6891
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ListComponent, decorators: [{
6892
- type: Component,
6893
- args: [{ selector: 'smart-list', encapsulation: ViewEncapsulation.None, imports: [
6894
- ListDesktopComponent,
6895
- ListMobileComponent,
6896
- ListMasonryGridComponent,
6897
- TranslatePipe,
6898
- NgTemplateOutlet,
6899
- LoaderComponent,
6900
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (template() === 'default') {\n @switch (mode()) {\n @case (ListMode.desktop) {\n <smart-list-desktop [options]=\"internalOptions\"></smart-list-desktop>\n }\n @case (ListMode.mobile) {\n <smart-list-mobile [options]=\"internalOptions\"></smart-list-mobile>\n }\n @case (ListMode.masonryGrid) {\n <smart-list-masonry-grid\n [options]=\"internalOptions\"\n ></smart-list-masonry-grid>\n }\n }\n\n <!-- <ion-row>-->\n <!-- <ion-col></ion-col>-->\n <!-- <ion-col size=\"auto\">-->\n @let loading = internalOptions?.provider?.loading();\n <smart-loader [show]=\"loading ?? false\"></smart-loader>\n @if (!loading && !internalOptions.provider.list()?.length) {\n <h2>\n <br />\n {{ 'noResults' | translate }}\n </h2>\n }\n <!-- </ion-col>-->\n <!-- <ion-col></ion-col>-->\n <!-- </ion-row>-->\n\n <ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n}\n\n<ng-template #contentTpl>\n <ng-content></ng-content>\n</ng-template>\n<div class=\"dynamic-content\"></div>\n" }]
6901
- }], ctorParameters: () => [] });
6902
-
6903
6903
  function setDefaultTranslationsAndLang(service) {
6904
6904
  const map = {
6905
6905
  pl: TRANSLATE_DATA_PL,
@@ -7197,40 +7197,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImpor
7197
7197
  }]
7198
7198
  }], ctorParameters: () => [{ type: i1.TranslateService }] });
7199
7199
 
7200
- class ErrorEffects {
7201
- actions$;
7202
- service;
7203
- error$ = createEffect(() => this.actions$.pipe(filter((action) => {
7204
- return action.type.indexOf(' Failure') > -1;
7205
- }), tap((action) => {
7206
- this.service.log(action.error).then();
7207
- })), { dispatch: false });
7208
- constructor(actions$, service) {
7209
- this.actions$ = actions$;
7210
- this.service = service;
7211
- }
7212
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ErrorEffects, deps: [{ token: i1$3.Actions }, { token: ErrorService }], target: i0.ɵɵFactoryTarget.Injectable });
7213
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ErrorEffects });
7214
- }
7215
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ErrorEffects, decorators: [{
7216
- type: Injectable
7217
- }], ctorParameters: () => [{ type: i1$3.Actions }, { type: ErrorService }] });
7218
-
7219
7200
  class NgrxSharedModule {
7220
7201
  constructor(store, storeService) {
7221
7202
  storeService.connect(store);
7222
7203
  }
7223
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: NgrxSharedModule, deps: [{ token: i1$4.Store }, { token: NgrxStoreService }], target: i0.ɵɵFactoryTarget.NgModule });
7224
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.0", ngImport: i0, type: NgrxSharedModule, imports: [SharedModule, i1$3.EffectsFeatureModule] });
7225
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: NgrxSharedModule, providers: [NgrxStoreService], imports: [SharedModule, EffectsModule.forFeature([ErrorEffects])] });
7204
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: NgrxSharedModule, deps: [{ token: i1$3.Store }, { token: NgrxStoreService }], target: i0.ɵɵFactoryTarget.NgModule });
7205
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.0", ngImport: i0, type: NgrxSharedModule, imports: [SharedModule] });
7206
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: NgrxSharedModule, providers: [NgrxStoreService], imports: [SharedModule] });
7226
7207
  }
7227
7208
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: NgrxSharedModule, decorators: [{
7228
7209
  type: NgModule,
7229
7210
  args: [{
7230
7211
  providers: [NgrxStoreService],
7231
- imports: [SharedModule, EffectsModule.forFeature([ErrorEffects])],
7212
+ imports: [
7213
+ SharedModule,
7214
+ //EffectsModule.forFeature([ErrorEffects])
7215
+ ],
7232
7216
  }]
7233
- }], ctorParameters: () => [{ type: i1$4.Store }, { type: NgrxStoreService }] });
7217
+ }], ctorParameters: () => [{ type: i1$3.Store }, { type: NgrxStoreService }] });
7234
7218
 
7235
7219
  const ReduxAction = ReduxActionDecorator;
7236
7220
  function ReduxActionDecorator(options = {}) {