@piying-lib/angular-daisyui 1.1.7 → 1.2.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.
Files changed (86) hide show
  1. package/extension/index.d.ts +104 -2
  2. package/fesm2022/piying-lib-angular-daisyui-extension.mjs +200 -18
  3. package/fesm2022/piying-lib-angular-daisyui-extension.mjs.map +1 -1
  4. package/fesm2022/piying-lib-angular-daisyui-field-control.mjs +77 -2
  5. package/fesm2022/piying-lib-angular-daisyui-field-control.mjs.map +1 -1
  6. package/fesm2022/piying-lib-angular-daisyui-field-group.mjs +23 -15
  7. package/fesm2022/piying-lib-angular-daisyui-field-group.mjs.map +1 -1
  8. package/fesm2022/piying-lib-angular-daisyui-non-field-control.mjs +2 -9
  9. package/fesm2022/piying-lib-angular-daisyui-non-field-control.mjs.map +1 -1
  10. package/fesm2022/piying-lib-angular-daisyui-service.mjs.map +1 -1
  11. package/fesm2022/piying-lib-angular-daisyui-wrapper.mjs +45 -2
  12. package/fesm2022/piying-lib-angular-daisyui-wrapper.mjs.map +1 -1
  13. package/field-control/index.d.ts +36 -4
  14. package/field-group/index.d.ts +6 -4
  15. package/package.json +2 -2
  16. package/preset-css/css/style.css +1 -1
  17. package/preset-css/css/style.split.css +1 -1
  18. package/preset-css/json/manifest.json +747 -851
  19. package/preset-css/ts/accordion.ts +9 -9
  20. package/preset-css/ts/alert.ts +12 -12
  21. package/preset-css/ts/avatar.ts +7 -7
  22. package/preset-css/ts/badge.ts +20 -20
  23. package/preset-css/ts/breadcrumbs.ts +1 -3
  24. package/preset-css/ts/browser-mockup.ts +1 -4
  25. package/preset-css/ts/button.ts +27 -27
  26. package/preset-css/ts/calendar.ts +1 -5
  27. package/preset-css/ts/card.ts +15 -15
  28. package/preset-css/ts/carousel.ts +9 -9
  29. package/preset-css/ts/chat-bubble.ts +17 -17
  30. package/preset-css/ts/checkbox.ts +16 -16
  31. package/preset-css/ts/code-mockup.ts +1 -3
  32. package/preset-css/ts/collapse.ts +9 -9
  33. package/preset-css/ts/countdown.ts +1 -3
  34. package/preset-css/ts/diff.ts +1 -6
  35. package/preset-css/ts/divider.ts +15 -15
  36. package/preset-css/ts/dock.ts +10 -10
  37. package/preset-css/ts/drawer-sidebar.ts +11 -11
  38. package/preset-css/ts/dropdown.ts +14 -14
  39. package/preset-css/ts/fab-speed-dial.ts +1 -6
  40. package/preset-css/ts/fieldset.ts +1 -5
  41. package/preset-css/ts/file-input.ts +17 -17
  42. package/preset-css/ts/filter.ts +1 -4
  43. package/preset-css/ts/footer.ts +7 -7
  44. package/preset-css/ts/hero.ts +1 -5
  45. package/preset-css/ts/hover-3-d-card.ts +1 -3
  46. package/preset-css/ts/hover-gallery.ts +1 -3
  47. package/preset-css/ts/index.ts +1 -1
  48. package/preset-css/ts/indicator.ts +10 -10
  49. package/preset-css/ts/join-group-items.ts +6 -6
  50. package/preset-css/ts/kbd.ts +1 -8
  51. package/preset-css/ts/label.ts +1 -4
  52. package/preset-css/ts/link.ts +12 -12
  53. package/preset-css/ts/list.ts +1 -6
  54. package/preset-css/ts/loading.ts +14 -14
  55. package/preset-css/ts/mask.ts +20 -20
  56. package/preset-css/ts/menu.ts +17 -17
  57. package/preset-css/ts/modal.ts +13 -13
  58. package/preset-css/ts/navbar.ts +1 -6
  59. package/preset-css/ts/pagination.ts +1 -6
  60. package/preset-css/ts/phone-mockup.ts +5 -5
  61. package/preset-css/ts/progress.ts +11 -11
  62. package/preset-css/ts/radial-progress.ts +1 -3
  63. package/preset-css/ts/radio.ts +16 -16
  64. package/preset-css/ts/range-slider.ts +16 -16
  65. package/preset-css/ts/rating.ts +10 -10
  66. package/preset-css/ts/select.ts +17 -17
  67. package/preset-css/ts/skeleton.ts +1 -4
  68. package/preset-css/ts/stack.ts +1 -7
  69. package/preset-css/ts/stat.ts +11 -11
  70. package/preset-css/ts/status.ts +16 -16
  71. package/preset-css/ts/steps.ts +15 -15
  72. package/preset-css/ts/swap.ts +9 -9
  73. package/preset-css/ts/table.ts +11 -11
  74. package/preset-css/ts/tabs.ts +17 -17
  75. package/preset-css/ts/text-input.ts +17 -17
  76. package/preset-css/ts/text-rotate.ts +1 -3
  77. package/preset-css/ts/textarea.ts +17 -17
  78. package/preset-css/ts/theme-controller.ts +1 -3
  79. package/preset-css/ts/timeline.ts +11 -11
  80. package/preset-css/ts/toast.ts +9 -9
  81. package/preset-css/ts/toggle.ts +16 -16
  82. package/preset-css/ts/tooltip.ts +17 -17
  83. package/preset-css/ts/validator.ts +1 -4
  84. package/preset-css/ts/window-mockup.ts +1 -3
  85. package/service/index.d.ts +1 -1
  86. package/wrapper/index.d.ts +22 -1
@@ -404,6 +404,103 @@ declare class ListTemplateNFCC {
404
404
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ListTemplateNFCC, "app-list-template", never, { "template": { "alias": "template"; "required": true; "isSignal": true; }; "list": { "alias": "list"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
405
405
  }
406
406
 
407
+ declare class EditableGroupFGC extends PiyingViewGroupBase {
408
+ #private;
409
+ static __version: number;
410
+ templateRef: _angular_core.Signal<unknown>;
411
+ PiyingView: typeof PiyingView;
412
+ layout: _angular_core.InputSignal<"row" | "columen">;
413
+ disableAdd: _angular_core.InputSignal<boolean>;
414
+ addMode: _angular_core.InputSignal<number>;
415
+ disableRemove: _angular_core.InputSignal<boolean>;
416
+ addPosition: _angular_core.InputSignal<"bottom" | "top">;
417
+ initValue: _angular_core.InputSignal<((index: number | undefined) => any) | undefined>;
418
+ minLength: _angular_core.InputSignal<number>;
419
+ isRecord$$: _angular_core.Signal<boolean>;
420
+ wrapperClass$$: _angular_core.Signal<"flex gap-2 items-center" | "flex flex-col gap-2">;
421
+ parentPyOptions: _angular_core.Signal<Omit<_piying_view_angular_core.SetOptional<Omit<_piying_valibot_visit.ConvertOptions<typeof _piying_view_angular_core.CoreSchemaHandle>, "handle"> & Partial<Pick<_piying_valibot_visit.ConvertOptions<typeof _piying_view_angular_core.CoreSchemaHandle>, "handle">> & {
422
+ builder: typeof _piying_view_angular_core.FormBuilder;
423
+ fieldGlobalConfig?: _piying_view_angular.PiViewConfig;
424
+ }, "handle" | "builder">, "fieldGlobalConfig"> & {
425
+ fieldGlobalConfig?: _piying_view_angular.PiViewConfig;
426
+ }> | null;
427
+ keySchemaOptions$$: _angular_core.Signal<{
428
+ schema: v.BaseSchema<any, any, any> | undefined;
429
+ options: {
430
+ context: any;
431
+ handle?: typeof _piying_view_angular_core.CoreSchemaHandle | undefined;
432
+ environments?: string[] | undefined;
433
+ defaultMetadataActionsGroup?: Record<string, v.BaseMetadata<any>[]> | undefined;
434
+ additionalData?: Record<string, any> | undefined;
435
+ builder?: typeof _piying_view_angular_core.FormBuilder | undefined;
436
+ fieldGlobalConfig?: _piying_view_angular.PiViewConfig;
437
+ };
438
+ selectorless: boolean;
439
+ }>;
440
+ valueSchemaOptions$$: _angular_core.Signal<{
441
+ schema: v.BaseSchema<any, any, any> | undefined;
442
+ options: {
443
+ context: any;
444
+ handle?: typeof _piying_view_angular_core.CoreSchemaHandle | undefined;
445
+ environments?: string[] | undefined;
446
+ defaultMetadataActionsGroup?: Record<string, v.BaseMetadata<any>[]> | undefined;
447
+ additionalData?: Record<string, any> | undefined;
448
+ builder?: typeof _piying_view_angular_core.FormBuilder | undefined;
449
+ fieldGlobalConfig?: _piying_view_angular.PiViewConfig;
450
+ };
451
+ selectorless: boolean;
452
+ }>;
453
+ addNewInputs: (input: Record<string, any>, newValueFn: ((index: number | undefined) => any) | undefined, model: any) => {
454
+ model: any;
455
+ };
456
+ addNew(newValue?: SelectorlessOutlet<PiyingView>, newKey?: SelectorlessOutlet<PiyingView>): void;
457
+ removeItem(key: number): void;
458
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EditableGroupFGC, never>;
459
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EditableGroupFGC, "app-editable-group", never, { "layout": { "alias": "layout"; "required": false; "isSignal": true; }; "disableAdd": { "alias": "disableAdd"; "required": false; "isSignal": true; }; "addMode": { "alias": "addMode"; "required": false; "isSignal": true; }; "disableRemove": { "alias": "disableRemove"; "required": false; "isSignal": true; }; "addPosition": { "alias": "addPosition"; "required": false; "isSignal": true; }; "initValue": { "alias": "initValue"; "required": false; "isSignal": true; }; "minLength": { "alias": "minLength"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
460
+ }
461
+
462
+ interface CheckboxOption {
463
+ value: any;
464
+ inputs?: any;
465
+ props?: any;
466
+ }
467
+ declare class CheckboxListFGC extends PiyingViewGroupBase {
468
+ #private;
469
+ static __version: number;
470
+ templateRef: _angular_core.Signal<unknown>;
471
+ readonly PiyingView: typeof PiyingView;
472
+ options: _angular_core.InputSignal<CheckboxOption[] | undefined>;
473
+ templateSchema$$: _angular_core.Signal<v.BaseSchema<any, any, any>>;
474
+ schemaItemFn: (template: any, input: CheckboxOption) => v.SchemaWithPipe<readonly [v.OptionalSchema<any, undefined>, _piying_valibot_visit.RawConfigAction<"viewRawConfig", any, _piying_view_angular_core.AnyCoreSchemaHandle>, _piying_valibot_visit.RawConfigAction<"viewRawConfig", any, _piying_view_angular_core.AnyCoreSchemaHandle>, _piying_valibot_visit.RawConfigAction<"viewRawConfig", any, _piying_view_angular_core.AnyCoreSchemaHandle>]>;
475
+ schemaOptions$$: (template: any, input: CheckboxOption, value: any[]) => {
476
+ schema: any;
477
+ options: Omit<_piying_view_angular_core.SetOptional<Omit<_piying_valibot_visit.ConvertOptions<typeof _piying_view_angular_core.CoreSchemaHandle>, "handle"> & Partial<Pick<_piying_valibot_visit.ConvertOptions<typeof _piying_view_angular_core.CoreSchemaHandle>, "handle">> & {
478
+ builder: typeof _piying_view_angular_core.FormBuilder;
479
+ fieldGlobalConfig?: _piying_view_angular.PiViewConfig;
480
+ }, "handle" | "builder">, "fieldGlobalConfig"> & {
481
+ fieldGlobalConfig?: _piying_view_angular.PiViewConfig;
482
+ };
483
+ selectorless: boolean;
484
+ model: boolean;
485
+ };
486
+ value$$: _angular_core.Signal<any[]>;
487
+ modelOutput: (booleanValue: any) => {
488
+ modelChange: (value: any) => void;
489
+ };
490
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CheckboxListFGC, never>;
491
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CheckboxListFGC, "app-checkbox-list", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
492
+ }
493
+
494
+ declare class logicGroupFGC extends PiyingViewGroupBase {
495
+ static __version: number;
496
+ templateRef: _angular_core.Signal<unknown>;
497
+ activateChildren$$: _angular_core.Signal<_piying_view_angular_core._PiResolvedCommonViewFieldConfig[]>;
498
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<logicGroupFGC, never>;
499
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<logicGroupFGC, "app-logic-group", never, {}, {}, never, never, true, never>;
500
+ }
501
+
502
+ type component_index_d_CheckboxListFGC = CheckboxListFGC;
503
+ declare const component_index_d_CheckboxListFGC: typeof CheckboxListFGC;
407
504
  type component_index_d_ListTemplateNFCC = ListTemplateNFCC;
408
505
  declare const component_index_d_ListTemplateNFCC: typeof ListTemplateNFCC;
409
506
  type component_index_d_MenuTreeNFCC = MenuTreeNFCC;
@@ -420,8 +517,12 @@ type component_index_d_TableNFCC = TableNFCC;
420
517
  declare const component_index_d_TableNFCC: typeof TableNFCC;
421
518
  type component_index_d_TableRowFGC = TableRowFGC;
422
519
  declare const component_index_d_TableRowFGC: typeof TableRowFGC;
520
+ type component_index_d_logicGroupFGC = logicGroupFGC;
521
+ declare const component_index_d_logicGroupFGC: typeof logicGroupFGC;
423
522
  declare namespace component_index_d {
424
523
  export {
524
+ component_index_d_CheckboxListFGC as CheckboxListFGC,
525
+ EditableGroupFGC as EditableArrayFGC,
425
526
  component_index_d_ListTemplateNFCC as ListTemplateNFCC,
426
527
  component_index_d_MenuTreeNFCC as MenuTreeNFCC,
427
528
  component_index_d_OptionListFCC as OptionListFCC,
@@ -430,6 +531,7 @@ declare namespace component_index_d {
430
531
  component_index_d_TableExpandOneTableCell as TableExpandOneTableCell,
431
532
  component_index_d_TableNFCC as TableNFCC,
432
533
  component_index_d_TableRowFGC as TableRowFGC,
534
+ component_index_d_logicGroupFGC as logicGroupFGC,
433
535
  };
434
536
  }
435
537
 
@@ -464,5 +566,5 @@ declare namespace wrapper_index_d {
464
566
  };
465
567
  }
466
568
 
467
- export { CheckboxService, ExactMatchOptions, ExpandRowDirective, component_index_d as ExtComponentGroup, wrapper_index_d as ExtWrapperGroup, ListTemplateNFCC, MenuTreeNFCC, OptionListFCC, OptionListLocalFilterWC, PaginationNFCC, PickerRefFCC, SortHeaderWC, SortService, SubsetMatchOptions, TableCheckboxAllWC, TableCheckboxOneWC, TableExpandOneTableCell, TableExpandService, TableNFCC, TableResourceService, TableRowFGC, wrapper_index_d$1 as WrapperGroup, createDefaultColDefine, createDefaultColDefineFn, createRowDefine, inputSortDirective };
468
- export type { CheckBoxConfig, DataResolved, ItemCell, ItemCellBase, NavigationItem, NavigationMode, NavigationPosition, RequestFn, SortDirection, SortList, TableItemDefine2 };
569
+ export { CheckboxListFGC, CheckboxService, EditableGroupFGC, ExactMatchOptions, ExpandRowDirective, component_index_d as ExtComponentGroup, wrapper_index_d as ExtWrapperGroup, ListTemplateNFCC, MenuTreeNFCC, OptionListFCC, OptionListLocalFilterWC, PaginationNFCC, PickerRefFCC, SortHeaderWC, SortService, SubsetMatchOptions, TableCheckboxAllWC, TableCheckboxOneWC, TableExpandOneTableCell, TableExpandService, TableNFCC, TableResourceService, TableRowFGC, wrapper_index_d$1 as WrapperGroup, createDefaultColDefine, createDefaultColDefineFn, createRowDefine, inputSortDirective, logicGroupFGC };
570
+ export type { CheckBoxConfig, CheckboxOption, DataResolved, ItemCell, ItemCellBase, NavigationItem, NavigationMode, NavigationPosition, RequestFn, SortDirection, SortList, TableItemDefine2 };
@@ -4,17 +4,17 @@ import { viewChild, input, inject, computed, Component, model, output, Injection
4
4
  import { StrOrTemplateComponent, isSchema, computedWithPrev, DefaultOptionConvert, transformOption } from '@piying-lib/angular-core';
5
5
  import { CssPrefixPipe, MergeClassPipe, TwPrefixPipe } from '@piying-lib/angular-daisyui/pipe';
6
6
  import { ThemeService } from '@piying-lib/angular-daisyui/service';
7
- import { AttributesDirective, PI_VIEW_FIELD_TOKEN, PiyingViewGroupBase, InsertFieldDirective, BaseControl, PiyingView, PI_INPUT_OPTIONS_TOKEN } from '@piying/view-angular';
7
+ import { AttributesDirective, PI_VIEW_FIELD_TOKEN, PiyingViewGroupBase, InsertFieldDirective, BaseControl, PiyingView, PI_INPUT_OPTIONS_TOKEN, EventsDirective } from '@piying/view-angular';
8
8
  import { RouterLink, RouterLinkActive } from '@angular/router';
9
9
  import * as i1 from '@angular/material/icon';
10
- import { MatIconModule, MatIcon } from '@angular/material/icon';
10
+ import { MatIconModule } from '@angular/material/icon';
11
11
  import * as i1$1 from '@angular/forms';
12
12
  import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
13
13
  import { PurePipe } from '@cyia/ngx-common/pipe';
14
14
  import clsx from 'clsx';
15
15
  import { SelectorlessOutlet } from '@cyia/ngx-common/directive';
16
16
  import * as v from 'valibot';
17
- import { setComponent, NFCSchema, actions, PI_VIEW_FIELD_TOKEN as PI_VIEW_FIELD_TOKEN$1 } from '@piying/view-angular-core';
17
+ import { setComponent, NFCSchema, actions, PI_VIEW_FIELD_TOKEN as PI_VIEW_FIELD_TOKEN$1, formConfig } from '@piying/view-angular-core';
18
18
  import { ThWC, TdWC } from '@piying-lib/angular-daisyui/wrapper';
19
19
  import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
20
20
  import { BehaviorSubject, shareReplay, map, filter, Subject, tap, switchMap, Subscription } from 'rxjs';
@@ -361,7 +361,7 @@ class SortService {
361
361
  this.#direction$.next(data);
362
362
  }
363
363
  else {
364
- let data = this.#direction$.value;
364
+ const data = this.#direction$.value;
365
365
  if (direction === 0) {
366
366
  if (key in data) {
367
367
  this.#direction$.next({});
@@ -447,12 +447,11 @@ class SortHeaderWC {
447
447
  return this.props$$()['key'];
448
448
  }, ...(ngDevMode ? [{ debugName: "key$$" }] : []));
449
449
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: SortHeaderWC, deps: [], target: i0.ɵɵFactoryTarget.Component });
450
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.14", type: SortHeaderWC, isStandalone: true, selector: "app-sort-header", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #templateRef let-attr=\"attributes\">\n <div class=\"flex items-center\">\n <ng-container insertField></ng-container>\n\n <label\n [class]=\"'swap swap-rotate' | mergeClass: attr()?.class | cssPrefix\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n >\n <input type=\"checkbox\" inputSort [key]=\"key$$()\" />\n\n <div [class]=\"'swap-indeterminate' | cssPrefix\"></div>\n <div [class]=\"'swap-on' | mergeClass: 'flex' | twPrefix\">\n <mat-icon>arrow_upward</mat-icon>\n </div>\n <div [class]=\"'swap-off' | cssPrefix | mergeClass: 'flex' | twPrefix\">\n <mat-icon>arrow_downward</mat-icon>\n </div>\n </label>\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: AttributesDirective, selector: "[attributes]", inputs: ["attributes", "excludes"] }, { kind: "directive", type: inputSortDirective, selector: "[inputSort]", inputs: ["key"] }, { kind: "directive", type: InsertFieldDirective, selector: "[insertField]", exportAs: ["insertField"] }, { kind: "pipe", type: CssPrefixPipe, name: "cssPrefix" }, { kind: "pipe", type: MergeClassPipe, name: "mergeClass" }, { kind: "pipe", type: TwPrefixPipe, name: "twPrefix" }] });
450
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.14", type: SortHeaderWC, isStandalone: true, selector: "app-sort-header", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #templateRef let-attr=\"attributes\">\n <div class=\"flex items-center\">\n <ng-container insertField></ng-container>\n\n <label\n [class]=\"'swap swap-rotate' | mergeClass: attr()?.class | cssPrefix\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n >\n <input type=\"checkbox\" inputSort [key]=\"key$$()\" />\n\n <div [class]=\"'swap-indeterminate' | cssPrefix\"></div>\n <div [class]=\"'swap-on' | mergeClass: 'flex' | twPrefix\">\n <span class=\"material-icons\">arrow_upward</span>\n </div>\n <div [class]=\"'swap-off' | cssPrefix | mergeClass: 'flex' | twPrefix\">\n <span class=\"material-icons\">arrow_downward</span>\n </div>\n </label>\n </div>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: AttributesDirective, selector: "[attributes]", inputs: ["attributes", "excludes"] }, { kind: "directive", type: inputSortDirective, selector: "[inputSort]", inputs: ["key"] }, { kind: "directive", type: InsertFieldDirective, selector: "[insertField]", exportAs: ["insertField"] }, { kind: "pipe", type: CssPrefixPipe, name: "cssPrefix" }, { kind: "pipe", type: MergeClassPipe, name: "mergeClass" }, { kind: "pipe", type: TwPrefixPipe, name: "twPrefix" }] });
451
451
  }
452
452
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: SortHeaderWC, decorators: [{
453
453
  type: Component,
454
454
  args: [{ selector: 'app-sort-header', imports: [
455
- MatIcon,
456
455
  FormsModule,
457
456
  CssPrefixPipe,
458
457
  MergeClassPipe,
@@ -460,7 +459,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
460
459
  inputSortDirective,
461
460
  InsertFieldDirective,
462
461
  TwPrefixPipe,
463
- ], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div class=\"flex items-center\">\n <ng-container insertField></ng-container>\n\n <label\n [class]=\"'swap swap-rotate' | mergeClass: attr()?.class | cssPrefix\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n >\n <input type=\"checkbox\" inputSort [key]=\"key$$()\" />\n\n <div [class]=\"'swap-indeterminate' | cssPrefix\"></div>\n <div [class]=\"'swap-on' | mergeClass: 'flex' | twPrefix\">\n <mat-icon>arrow_upward</mat-icon>\n </div>\n <div [class]=\"'swap-off' | cssPrefix | mergeClass: 'flex' | twPrefix\">\n <mat-icon>arrow_downward</mat-icon>\n </div>\n </label>\n </div>\n</ng-template>\n" }]
462
+ ], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div class=\"flex items-center\">\n <ng-container insertField></ng-container>\n\n <label\n [class]=\"'swap swap-rotate' | mergeClass: attr()?.class | cssPrefix\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n >\n <input type=\"checkbox\" inputSort [key]=\"key$$()\" />\n\n <div [class]=\"'swap-indeterminate' | cssPrefix\"></div>\n <div [class]=\"'swap-on' | mergeClass: 'flex' | twPrefix\">\n <span class=\"material-icons\">arrow_upward</span>\n </div>\n <div [class]=\"'swap-off' | cssPrefix | mergeClass: 'flex' | twPrefix\">\n <span class=\"material-icons\">arrow_downward</span>\n </div>\n </label>\n </div>\n</ng-template>\n" }]
464
463
  }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }] } });
465
464
 
466
465
  const defaultKey = 'default';
@@ -474,7 +473,7 @@ class CheckboxService {
474
473
  #defaultDataBind(dataChangeClear = false) {
475
474
  effect(() => {
476
475
  const data1 = this.#data$$();
477
- let data2 = Array.isArray(data1) ? data1 : data1?.();
476
+ const data2 = Array.isArray(data1) ? data1 : data1?.();
478
477
  untracked(() => {
479
478
  this.setAllList(() => {
480
479
  return data2;
@@ -524,7 +523,7 @@ class CheckboxService {
524
523
  selectAll(checked, key = defaultKey) {
525
524
  const list = this.#fn();
526
525
  const result = this.#selectModelMap.get(key);
527
- let event$ = this.#allEvent.get(key);
526
+ const event$ = this.#allEvent.get(key);
528
527
  if (checked) {
529
528
  list.forEach((item) => {
530
529
  result.select(item);
@@ -536,7 +535,7 @@ class CheckboxService {
536
535
  event$.next(checked);
537
536
  }
538
537
  listenAllSelect(key = defaultKey) {
539
- let result = this.#allEvent.get(key);
538
+ const result = this.#allEvent.get(key);
540
539
  if (!result) {
541
540
  throw new Error('CheckboxService not call init');
542
541
  }
@@ -681,7 +680,7 @@ class TableResourceService {
681
680
  #data$ = resource({
682
681
  params: computed(() => {
683
682
  const params = this.#queryParams$();
684
- let requestFn = this.#requestFn$();
683
+ const requestFn = this.#requestFn$();
685
684
  return {
686
685
  requestFn,
687
686
  params,
@@ -689,7 +688,7 @@ class TableResourceService {
689
688
  };
690
689
  }),
691
690
  loader: async (res) => {
692
- let needUpdate = res.params.index !== this.#preUpdateIndex$();
691
+ const needUpdate = res.params.index !== this.#preUpdateIndex$();
693
692
  if (needUpdate) {
694
693
  this.#preUpdateIndex$.set(res.params.index);
695
694
  }
@@ -749,11 +748,11 @@ class TableExpandOneTableCell {
749
748
  this.#service.toggleExpand(this.field$$().context['item$']());
750
749
  }
751
750
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TableExpandOneTableCell, deps: [], target: i0.ɵɵFactoryTarget.Component });
752
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: TableExpandOneTableCell, isStandalone: true, selector: "app-table-expand-cell", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #templateRef let-attr=\"attributes\">\n <mat-icon\n [class]=\"'cursor-pointer' | mergeClass: attr()?.class\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n (click)=\"toggle()\"\n >\n @if (isExpand$$()) {\n keyboard_arrow_up\n } @else {\n keyboard_arrow_down\n }\n </mat-icon>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: AttributesDirective, selector: "[attributes]", inputs: ["attributes", "excludes"] }, { kind: "pipe", type: MergeClassPipe, name: "mergeClass" }] });
751
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: TableExpandOneTableCell, isStandalone: true, selector: "app-table-expand-cell", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #templateRef let-attr=\"attributes\">\n <span\n [class]=\"'material-icons cursor-pointer' | mergeClass: attr()?.class\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n (click)=\"toggle()\"\n >\n @if (isExpand$$()) {\n keyboard_arrow_up\n } @else {\n keyboard_arrow_down\n }\n </span>\n</ng-template>\n", dependencies: [{ kind: "directive", type: AttributesDirective, selector: "[attributes]", inputs: ["attributes", "excludes"] }, { kind: "pipe", type: MergeClassPipe, name: "mergeClass" }] });
753
752
  }
754
753
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TableExpandOneTableCell, decorators: [{
755
754
  type: Component,
756
- args: [{ selector: 'app-table-expand-cell', imports: [MatIconModule, MergeClassPipe, AttributesDirective], template: "<ng-template #templateRef let-attr=\"attributes\">\n <mat-icon\n [class]=\"'cursor-pointer' | mergeClass: attr()?.class\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n (click)=\"toggle()\"\n >\n @if (isExpand$$()) {\n keyboard_arrow_up\n } @else {\n keyboard_arrow_down\n }\n </mat-icon>\n</ng-template>\n" }]
755
+ args: [{ selector: 'app-table-expand-cell', imports: [MergeClassPipe, AttributesDirective], template: "<ng-template #templateRef let-attr=\"attributes\">\n <span\n [class]=\"'material-icons cursor-pointer' | mergeClass: attr()?.class\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n (click)=\"toggle()\"\n >\n @if (isExpand$$()) {\n keyboard_arrow_up\n } @else {\n keyboard_arrow_down\n }\n </span>\n</ng-template>\n" }]
757
756
  }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }] } });
758
757
 
759
758
  /**
@@ -1246,15 +1245,197 @@ class ListTemplateNFCC {
1246
1245
  };
1247
1246
  };
1248
1247
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ListTemplateNFCC, deps: [], target: i0.ɵɵFactoryTarget.Component });
1249
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: ListTemplateNFCC, isStandalone: true, selector: "app-list-template", inputs: { template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: true, transformFunction: null }, list: { classPropertyName: "list", publicName: "list", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #templateRef let-attr=\"attributes\">\n @for (child of list(); track $index) {\n <ng-container\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"templateInput$$ | pure: child\"\n ></ng-container>\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: SelectorlessOutlet, selector: "[selectlessOutlet]", inputs: ["selectlessOutlet", "selectlessOutletInputs", "selectlessOutletOutputs", "selectlessOutletDirectives", "selectlessOutletInjector", "selectlessOutletEnvironmentInjector"], exportAs: ["selectlessOutlet"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "pipe", type: PurePipe, name: "pure" }] });
1248
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: ListTemplateNFCC, isStandalone: true, selector: "app-list-template", inputs: { template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: true, transformFunction: null }, list: { classPropertyName: "list", publicName: "list", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #templateRef let-attr=\"attributes\">\n @for (child of list(); track $index) {\n <ng-container\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"templateInput$$ | pure: child\"\n ></ng-container>\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: SelectorlessOutlet, selector: "[selectlessOutlet]", inputs: ["selectlessOutlet", "selectlessOutletInputs", "selectlessOutletOutputs", "selectlessOutletDirectives", "selectlessOutletInjector", "selectlessOutletEnvironmentInjector"], exportAs: ["selectlessOutlet"] }, { kind: "pipe", type: PurePipe, name: "pure" }] });
1250
1249
  }
1251
1250
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ListTemplateNFCC, decorators: [{
1252
1251
  type: Component,
1253
- args: [{ selector: 'app-list-template', imports: [SelectorlessOutlet, MatIconModule, PurePipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n @for (child of list(); track $index) {\n <ng-container\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"templateInput$$ | pure: child\"\n ></ng-container>\n }\n</ng-template>\n" }]
1252
+ args: [{ selector: 'app-list-template', imports: [SelectorlessOutlet, PurePipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n @for (child of list(); track $index) {\n <ng-container\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"templateInput$$ | pure: child\"\n ></ng-container>\n }\n</ng-template>\n" }]
1254
1253
  }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", required: true }] }], list: [{ type: i0.Input, args: [{ isSignal: true, alias: "list", required: false }] }] } });
1255
1254
 
1255
+ class EditableGroupFGC extends PiyingViewGroupBase {
1256
+ static __version = 2;
1257
+ templateRef = viewChild.required('templateRef');
1258
+ PiyingView = PiyingView;
1259
+ layout = input('row', ...(ngDevMode ? [{ debugName: "layout" }] : []));
1260
+ disableAdd = input(false, ...(ngDevMode ? [{ debugName: "disableAdd" }] : []));
1261
+ addMode = input(0, ...(ngDevMode ? [{ debugName: "addMode" }] : []));
1262
+ disableRemove = input(false, ...(ngDevMode ? [{ debugName: "disableRemove" }] : []));
1263
+ addPosition = input('bottom', ...(ngDevMode ? [{ debugName: "addPosition" }] : []));
1264
+ initValue = input(...(ngDevMode ? [undefined, { debugName: "initValue" }] : []));
1265
+ minLength = input(0, ...(ngDevMode ? [{ debugName: "minLength" }] : []));
1266
+ isRecord$$ = computed(() => {
1267
+ return !!this.field$$().form.control.config$().groupKeySchema;
1268
+ }, ...(ngDevMode ? [{ debugName: "isRecord$$" }] : []));
1269
+ wrapperClass$$ = computed(() => {
1270
+ return this.layout() === 'row' ? 'flex gap-2 items-center' : 'flex flex-col gap-2';
1271
+ }, ...(ngDevMode ? [{ debugName: "wrapperClass$$" }] : []));
1272
+ parentPyOptions = inject(PI_INPUT_OPTIONS_TOKEN, { optional: true });
1273
+ #keySchema$$ = computed(() => {
1274
+ return this.field$$().form.control.config$().groupKeySchema;
1275
+ }, ...(ngDevMode ? [{ debugName: "#keySchema$$" }] : []));
1276
+ #valueSchema$$ = computed(() => {
1277
+ return this.field$$().form.control.config$().groupValueSchema;
1278
+ }, ...(ngDevMode ? [{ debugName: "#valueSchema$$" }] : []));
1279
+ keySchemaOptions$$ = computed(() => {
1280
+ return {
1281
+ schema: this.#keySchema$$(),
1282
+ options: {
1283
+ ...this.parentPyOptions(),
1284
+ context: {
1285
+ ...this.parentPyOptions().context,
1286
+ parent: this.parentPyOptions().context,
1287
+ parentField: this.field$$(),
1288
+ },
1289
+ },
1290
+ selectorless: true,
1291
+ };
1292
+ }, ...(ngDevMode ? [{ debugName: "keySchemaOptions$$" }] : []));
1293
+ valueSchemaOptions$$ = computed(() => {
1294
+ return {
1295
+ schema: this.#valueSchema$$(),
1296
+ options: {
1297
+ ...this.parentPyOptions(),
1298
+ context: {
1299
+ ...this.parentPyOptions().context,
1300
+ parent: this.parentPyOptions().context,
1301
+ parentField: this.field$$(),
1302
+ },
1303
+ },
1304
+ selectorless: true,
1305
+ };
1306
+ }, ...(ngDevMode ? [{ debugName: "valueSchemaOptions$$" }] : []));
1307
+ addNewInputs = (input, newValueFn, model) => {
1308
+ return {
1309
+ ...input,
1310
+ model: newValueFn?.(model),
1311
+ };
1312
+ };
1313
+ addNew(newValue, newKey) {
1314
+ if (newKey && newValue) {
1315
+ const keyForm = newKey.componentInstance.form$$();
1316
+ const valueForm = newValue.componentInstance.form$$();
1317
+ this.field$$().action.set(valueForm.value, keyForm.value);
1318
+ keyForm.reset();
1319
+ valueForm.reset();
1320
+ }
1321
+ else if (newValue) {
1322
+ const form = newValue.componentInstance.form$$();
1323
+ this.field$$().action.set(form.value);
1324
+ form.reset();
1325
+ }
1326
+ else {
1327
+ const index = this.field$$().children().length;
1328
+ this.field$$().action.set(this.initValue()?.(index), index);
1329
+ }
1330
+ }
1331
+ removeItem(key) {
1332
+ this.field$$().action.remove(key);
1333
+ }
1334
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: EditableGroupFGC, deps: null, target: i0.ɵɵFactoryTarget.Component });
1335
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: EditableGroupFGC, isStandalone: true, selector: "app-editable-group", inputs: { layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, disableAdd: { classPropertyName: "disableAdd", publicName: "disableAdd", isSignal: true, isRequired: false, transformFunction: null }, addMode: { classPropertyName: "addMode", publicName: "addMode", isSignal: true, isRequired: false, transformFunction: null }, disableRemove: { classPropertyName: "disableRemove", publicName: "disableRemove", isSignal: true, isRequired: false, transformFunction: null }, addPosition: { classPropertyName: "addPosition", publicName: "addPosition", isSignal: true, isRequired: false, transformFunction: null }, initValue: { classPropertyName: "initValue", publicName: "initValue", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #templateRef let-attr=\"attributes\" let-events=\"events\">\n <div\n [class]=\"wrapperClass$$() | cssPrefix | mergeClass: attr()?.class\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [events]=\"events()\"\n >\n @let children = children$$();\n <ng-template #addTemplate>\n @if (!disableAdd()) {\n @if (isRecord$$()) {\n <div class=\"flex items-center gap-2\">\n <div class=\"flex-1 flex items-center gap-2\">\n <ng-container\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"\n addNewInputs | pure: keySchemaOptions$$() : initValue() : children.length\n \"\n #newKey=\"selectlessOutlet\"\n ></ng-container>\n <ng-container\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"\n addNewInputs | pure: valueSchemaOptions$$() : initValue() : children.length\n \"\n #newValue=\"selectlessOutlet\"\n ></ng-container>\n </div>\n @let keyForm = newKey.componentInstance?.form$$();\n @let valueFform = newValue.componentInstance?.form$$();\n <button\n class=\"btn btn-circle\"\n (click)=\"addNew(newValue, newKey)\"\n color=\"primary\"\n [disabled]=\"!valueFform?.valid || !keyForm?.valid\"\n >\n <span class=\"material-icons\">add</span>\n </button>\n </div>\n } @else if (addMode() === 0) {\n <button class=\"btn btn-circle\" (click)=\"addNew()\" color=\"primary\">\n <span class=\"material-icons\">add</span>\n </button>\n } @else {\n <div class=\"flex items-center gap-2\">\n <div class=\"flex-1\">\n <ng-container\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"\n addNewInputs | pure: valueSchemaOptions$$() : initValue() : children.length\n \"\n #newValue=\"selectlessOutlet\"\n ></ng-container>\n </div>\n @let form = newValue.componentInstance?.form$$();\n <button\n class=\"btn btn-circle\"\n (click)=\"addNew(newValue)\"\n color=\"primary\"\n [disabled]=\"!form || form.invalid\"\n >\n <span class=\"material-icons\">add</span>\n </button>\n </div>\n }\n }\n </ng-template>\n @if (addPosition() === 'top') {\n <ng-container *ngTemplateOutlet=\"addTemplate\"></ng-container>\n }\n @for (field of children; track field.id || $index) {\n <div class=\"flex items-center gap-2\">\n @if (isRecord$$()) {\n @let key = field.key!;\n {{ key }}\n }\n <div class=\"flex-1\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: field, injector }\"\n ></ng-container>\n </div>\n\n @if (!disableRemove()) {\n <button\n class=\"btn btn-circle btn-error\"\n (click)=\"removeItem($index)\"\n [disabled]=\"minLength() >= children.length\"\n >\n <span class=\"material-icons\">delete</span>\n </button>\n }\n </div>\n }\n @if (addPosition() === 'bottom') {\n <ng-container *ngTemplateOutlet=\"addTemplate\"></ng-container>\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: AttributesDirective, selector: "[attributes]", inputs: ["attributes", "excludes"] }, { kind: "directive", type: EventsDirective, selector: "[events]", inputs: ["events"] }, { kind: "directive", type: SelectorlessOutlet, selector: "[selectlessOutlet]", inputs: ["selectlessOutlet", "selectlessOutletInputs", "selectlessOutletOutputs", "selectlessOutletDirectives", "selectlessOutletInjector", "selectlessOutletEnvironmentInjector"], exportAs: ["selectlessOutlet"] }, { kind: "pipe", type: MergeClassPipe, name: "mergeClass" }, { kind: "pipe", type: CssPrefixPipe, name: "cssPrefix" }, { kind: "pipe", type: PurePipe, name: "pure" }] });
1336
+ }
1337
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: EditableGroupFGC, decorators: [{
1338
+ type: Component,
1339
+ args: [{ selector: 'app-editable-group', imports: [
1340
+ NgTemplateOutlet,
1341
+ FormsModule,
1342
+ MergeClassPipe,
1343
+ CssPrefixPipe,
1344
+ AttributesDirective,
1345
+ EventsDirective,
1346
+ SelectorlessOutlet,
1347
+ PurePipe,
1348
+ ], template: "<ng-template #templateRef let-attr=\"attributes\" let-events=\"events\">\n <div\n [class]=\"wrapperClass$$() | cssPrefix | mergeClass: attr()?.class\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [events]=\"events()\"\n >\n @let children = children$$();\n <ng-template #addTemplate>\n @if (!disableAdd()) {\n @if (isRecord$$()) {\n <div class=\"flex items-center gap-2\">\n <div class=\"flex-1 flex items-center gap-2\">\n <ng-container\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"\n addNewInputs | pure: keySchemaOptions$$() : initValue() : children.length\n \"\n #newKey=\"selectlessOutlet\"\n ></ng-container>\n <ng-container\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"\n addNewInputs | pure: valueSchemaOptions$$() : initValue() : children.length\n \"\n #newValue=\"selectlessOutlet\"\n ></ng-container>\n </div>\n @let keyForm = newKey.componentInstance?.form$$();\n @let valueFform = newValue.componentInstance?.form$$();\n <button\n class=\"btn btn-circle\"\n (click)=\"addNew(newValue, newKey)\"\n color=\"primary\"\n [disabled]=\"!valueFform?.valid || !keyForm?.valid\"\n >\n <span class=\"material-icons\">add</span>\n </button>\n </div>\n } @else if (addMode() === 0) {\n <button class=\"btn btn-circle\" (click)=\"addNew()\" color=\"primary\">\n <span class=\"material-icons\">add</span>\n </button>\n } @else {\n <div class=\"flex items-center gap-2\">\n <div class=\"flex-1\">\n <ng-container\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"\n addNewInputs | pure: valueSchemaOptions$$() : initValue() : children.length\n \"\n #newValue=\"selectlessOutlet\"\n ></ng-container>\n </div>\n @let form = newValue.componentInstance?.form$$();\n <button\n class=\"btn btn-circle\"\n (click)=\"addNew(newValue)\"\n color=\"primary\"\n [disabled]=\"!form || form.invalid\"\n >\n <span class=\"material-icons\">add</span>\n </button>\n </div>\n }\n }\n </ng-template>\n @if (addPosition() === 'top') {\n <ng-container *ngTemplateOutlet=\"addTemplate\"></ng-container>\n }\n @for (field of children; track field.id || $index) {\n <div class=\"flex items-center gap-2\">\n @if (isRecord$$()) {\n @let key = field.key!;\n {{ key }}\n }\n <div class=\"flex-1\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: field, injector }\"\n ></ng-container>\n </div>\n\n @if (!disableRemove()) {\n <button\n class=\"btn btn-circle btn-error\"\n (click)=\"removeItem($index)\"\n [disabled]=\"minLength() >= children.length\"\n >\n <span class=\"material-icons\">delete</span>\n </button>\n }\n </div>\n }\n @if (addPosition() === 'bottom') {\n <ng-container *ngTemplateOutlet=\"addTemplate\"></ng-container>\n }\n </div>\n</ng-template>\n" }]
1349
+ }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], disableAdd: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableAdd", required: false }] }], addMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "addMode", required: false }] }], disableRemove: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableRemove", required: false }] }], addPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "addPosition", required: false }] }], initValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "initValue", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }] } });
1350
+
1351
+ const Empty_Array = [];
1352
+ class CheckboxListFGC extends PiyingViewGroupBase {
1353
+ static __version = 2;
1354
+ templateRef = viewChild.required('templateRef');
1355
+ PiyingView = PiyingView;
1356
+ options = input(...(ngDevMode ? [undefined, { debugName: "options" }] : []));
1357
+ #parentPyOptions = inject(PI_INPUT_OPTIONS_TOKEN, { optional: true });
1358
+ templateSchema$$ = computed(() => {
1359
+ return this.field$$().form.control.config$().groupValueSchema;
1360
+ }, ...(ngDevMode ? [{ debugName: "templateSchema$$" }] : []));
1361
+ schemaItemFn = (template, input) => {
1362
+ return v.pipe(v.optional(template), formConfig({
1363
+ transfomer: {
1364
+ toModel(value, control) {
1365
+ return value ? input.value : undefined;
1366
+ },
1367
+ toView(value, control) {
1368
+ return !!value;
1369
+ },
1370
+ },
1371
+ }), actions.inputs.patch(input.inputs ?? {}), actions.props.patch(input.props ?? {}));
1372
+ };
1373
+ schemaOptions$$ = (template, input, value) => {
1374
+ return {
1375
+ schema: template,
1376
+ options: this.#parentPyOptions(),
1377
+ selectorless: true,
1378
+ model: value.includes(input.value),
1379
+ };
1380
+ };
1381
+ value$$ = computed(() => {
1382
+ return this.field$$().form.control.value$$() ?? Empty_Array;
1383
+ }, ...(ngDevMode ? [{ debugName: "value$$" }] : []));
1384
+ modelOutput = (booleanValue) => {
1385
+ return {
1386
+ modelChange: (value) => {
1387
+ const list = this.value$$().slice();
1388
+ if (value) {
1389
+ this.field$$().action.set(value);
1390
+ }
1391
+ else {
1392
+ const index = list.findIndex((item) => item === booleanValue);
1393
+ this.field$$().action.remove(index);
1394
+ }
1395
+ },
1396
+ };
1397
+ };
1398
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: CheckboxListFGC, deps: null, target: i0.ɵɵFactoryTarget.Component });
1399
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: CheckboxListFGC, isStandalone: true, selector: "app-checkbox-list", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
1400
+ {
1401
+ provide: NG_VALUE_ACCESSOR,
1402
+ useExisting: forwardRef(() => CheckboxListFGC),
1403
+ multi: true,
1404
+ },
1405
+ ], viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #templateRef let-attr=\"attributes\" let-events=\"events\">\n @for (item of options(); track $index) {\n <ng-container\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"\n schemaOptions$$ | pure: (schemaItemFn | pure: templateSchema$$() : item) : item : value$$()\n \"\n [selectlessOutletOutputs]=\"modelOutput | pure: item.value\"\n ></ng-container>\n }\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: SelectorlessOutlet, selector: "[selectlessOutlet]", inputs: ["selectlessOutlet", "selectlessOutletInputs", "selectlessOutletOutputs", "selectlessOutletDirectives", "selectlessOutletInjector", "selectlessOutletEnvironmentInjector"], exportAs: ["selectlessOutlet"] }, { kind: "pipe", type: PurePipe, name: "pure" }] });
1406
+ }
1407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: CheckboxListFGC, decorators: [{
1408
+ type: Component,
1409
+ args: [{ selector: 'app-checkbox-list', imports: [FormsModule, SelectorlessOutlet, PurePipe], providers: [
1410
+ {
1411
+ provide: NG_VALUE_ACCESSOR,
1412
+ useExisting: forwardRef(() => CheckboxListFGC),
1413
+ multi: true,
1414
+ },
1415
+ ], template: "<ng-template #templateRef let-attr=\"attributes\" let-events=\"events\">\n @for (item of options(); track $index) {\n <ng-container\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"\n schemaOptions$$ | pure: (schemaItemFn | pure: templateSchema$$() : item) : item : value$$()\n \"\n [selectlessOutletOutputs]=\"modelOutput | pure: item.value\"\n ></ng-container>\n }\n</ng-template>\n" }]
1416
+ }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
1417
+
1418
+ class logicGroupFGC extends PiyingViewGroupBase {
1419
+ static __version = 2;
1420
+ templateRef = viewChild.required('templateRef');
1421
+ activateChildren$$ = computed(() => {
1422
+ const control = this.field$$().form.control;
1423
+ return this.field$$().children().filter((config, index1) => {
1424
+ return !!control.activatedChildren().find(([index2]) => index1 === index2);
1425
+ });
1426
+ }, ...(ngDevMode ? [{ debugName: "activateChildren$$" }] : []));
1427
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: logicGroupFGC, deps: null, target: i0.ɵɵFactoryTarget.Component });
1428
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: logicGroupFGC, isStandalone: true, selector: "app-logic-group", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #templateRef let-attr=\"attributes\">\n @for (item of activateChildren$$(); track $index) {\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: item }\"\n ></ng-container>\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
1429
+ }
1430
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: logicGroupFGC, decorators: [{
1431
+ type: Component,
1432
+ args: [{ selector: 'app-logic-group', imports: [NgTemplateOutlet], template: "<ng-template #templateRef let-attr=\"attributes\">\n @for (item of activateChildren$$(); track $index) {\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: item }\"\n ></ng-container>\n }\n</ng-template>\n" }]
1433
+ }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }] } });
1434
+
1256
1435
  var component_index = /*#__PURE__*/Object.freeze({
1257
1436
  __proto__: null,
1437
+ CheckboxListFGC: CheckboxListFGC,
1438
+ EditableArrayFGC: EditableGroupFGC,
1258
1439
  ListTemplateNFCC: ListTemplateNFCC,
1259
1440
  MenuTreeNFCC: MenuTreeNFCC,
1260
1441
  OptionListFCC: OptionListFCC,
@@ -1262,7 +1443,8 @@ var component_index = /*#__PURE__*/Object.freeze({
1262
1443
  PickerRefFCC: PickerRefFCC,
1263
1444
  TableExpandOneTableCell: TableExpandOneTableCell,
1264
1445
  TableNFCC: TableNFCC,
1265
- TableRowFGC: TableRowFGC
1446
+ TableRowFGC: TableRowFGC,
1447
+ logicGroupFGC: logicGroupFGC
1266
1448
  });
1267
1449
 
1268
1450
  class FilterOptionNFCC {
@@ -1346,5 +1528,5 @@ var wrapper_index = /*#__PURE__*/Object.freeze({
1346
1528
  * Generated bundle index. Do not edit.
1347
1529
  */
1348
1530
 
1349
- export { CheckboxService, ExactMatchOptions, ExpandRowDirective, component_index as ExtComponentGroup, wrapper_index as ExtWrapperGroup, ListTemplateNFCC, MenuTreeNFCC, OptionListFCC, OptionListLocalFilterWC, PaginationNFCC, PickerRefFCC, SortHeaderWC, SortService, SubsetMatchOptions, TableCheckboxAllWC, TableCheckboxOneWC, TableExpandOneTableCell, TableExpandService, TableNFCC, TableResourceService, TableRowFGC, wrapper_index$1 as WrapperGroup, createDefaultColDefine, createDefaultColDefineFn, createRowDefine, inputSortDirective };
1531
+ export { CheckboxListFGC, CheckboxService, EditableGroupFGC, ExactMatchOptions, ExpandRowDirective, component_index as ExtComponentGroup, wrapper_index as ExtWrapperGroup, ListTemplateNFCC, MenuTreeNFCC, OptionListFCC, OptionListLocalFilterWC, PaginationNFCC, PickerRefFCC, SortHeaderWC, SortService, SubsetMatchOptions, TableCheckboxAllWC, TableCheckboxOneWC, TableExpandOneTableCell, TableExpandService, TableNFCC, TableResourceService, TableRowFGC, wrapper_index$1 as WrapperGroup, createDefaultColDefine, createDefaultColDefineFn, createRowDefine, inputSortDirective, logicGroupFGC };
1350
1532
  //# sourceMappingURL=piying-lib-angular-daisyui-extension.mjs.map