@piying-lib/angular-daisyui 1.2.0 → 1.2.2

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.
@@ -26,13 +26,28 @@ import { TemplatePortal } from '@angular/cdk/portal';
26
26
  import { takeWhile } from 'rxjs/operators';
27
27
 
28
28
  const routerLinkActiveOptions = { exact: false };
29
+ /*
30
+ * MenuTreeNFCC - 导航菜单树组件
31
+ *
32
+ * 用途: 用于显示具有层级结构的导航菜单,支持多种导航项类型(basic/divider/group)
33
+ * 特性:
34
+ * - 支持横向和纵向布局
35
+ * - 支持不同尺寸显示
36
+ * - 可自定义菜单项模板
37
+ * - 集成 Angular Router,支持路由激活状态显示
38
+ *
39
+ * 使用场景: 侧边栏导航、顶部导航菜单等需要层级结构的导航场景
40
+ */
29
41
  class MenuTreeNFCC {
30
42
  static __version = 2;
31
43
  routerLinkActiveOptions = routerLinkActiveOptions;
32
44
  StrOrTemplateComponent = StrOrTemplateComponent;
33
45
  templateRef = viewChild.required('templateRef');
46
+ /** 菜单项列表 */
34
47
  list = input([], ...(ngDevMode ? [{ debugName: "list" }] : []));
48
+ /** 尺寸大小 */
35
49
  size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
50
+ /** 方向 */
36
51
  direction = input(...(ngDevMode ? [undefined, { debugName: "direction" }] : []));
37
52
  #theme = inject(ThemeService);
38
53
  wrapperClass$ = computed(() => {
@@ -71,12 +86,27 @@ const SubsetMatchOptions = {
71
86
  function goPage(value) {
72
87
  return { type: 'go', value };
73
88
  }
89
+ /*
90
+ * PaginationNFCC - 分页组件
91
+ *
92
+ * 用途: 用于分页显示大量数据,支持自定义每页条数和跳转页面
93
+ * 特性:
94
+ * - 支持横向和纵向布局
95
+ * - 可配置每页显示条数选项
96
+ * - 支持自定义页码标签
97
+ * - 集成 piying-view 字段系统,自动同步分页属性
98
+ *
99
+ * 使用场景: 数据表格分页、列表分页等需要分页功能的场景
100
+ */
74
101
  class PaginationNFCC {
75
102
  static __version = 2;
76
103
  StrOrTemplateComponent = StrOrTemplateComponent;
77
104
  templateRef = viewChild.required('templateRef');
105
+ /** 方向 */
78
106
  direction = input(...(ngDevMode ? [undefined, { debugName: "direction" }] : []));
107
+ /** 每页条数选项 */
79
108
  sizeOptions = input(...(ngDevMode ? [undefined, { debugName: "sizeOptions" }] : []));
109
+ /** 每页条数标签函数 */
80
110
  optionsLabel = input(...(ngDevMode ? [undefined, { debugName: "optionsLabel" }] : []));
81
111
  value = model.required(...(ngDevMode ? [{ debugName: "value" }] : []));
82
112
  // todo 临时兼容
@@ -167,6 +197,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
167
197
  args: [{ selector: 'app-pagination', imports: [AttributesDirective, PurePipe, FormsModule, MergeClassPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div\n [class]=\"'flex items-center gap-2' | mergeClass: attr()?.class\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n >\n @if (sizeOptions(); as sizeOptions) {\n <select class=\"select w-20\" [ngModel]=\"value().size\" (ngModelChange)=\"pageSizeChange($event)\">\n @for (item of sizeOptions; track $index) {\n <option [ngValue]=\"item\">\n {{ optionsLabel() ? (optionsLabel()! | pure: item : value().index : count()) : item }}\n </option>\n }\n </select>\n }\n <div [class]=\"wrapperClass$()\">\n <button\n class=\"join-item btn p-0 w-(--size)\"\n [disabled]=\"value().index === 0\"\n (click)=\"gotoPage(0)\"\n >\n \u00AB\n </button>\n @for (item of pageRange$$(); track $index) {\n @if (item.type === 'go') {\n <button\n class=\"join-item btn p-0 w-(--size)\"\n [aria-label]=\"item.value + 1\"\n [class.btn-active]=\"item.value === value().index\"\n (click)=\"gotoPage(item.value)\"\n >\n {{ item.value + 1 }}\n </button>\n } @else if (item.type === 'prev') {\n <button class=\"join-item btn p-0 w-(--size)\" (click)=\"gotoPage(value().index - 5)\">\n <\n </button>\n } @else if (item.type === 'next') {\n <button class=\"join-item btn p-0 w-(--size)\" (click)=\"gotoPage(value().index + 5)\">\n >\n </button>\n }\n }\n <button\n class=\"join-item btn p-0 w-(--size)\"\n [disabled]=\"value().index === maxPageCount$$() - 1\"\n (click)=\"gotoPage(maxPageCount$$() - 1)\"\n >\n \u00BB\n </button>\n </div>\n </div>\n</ng-template>\n" }]
168
198
  }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], sizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "sizeOptions", required: false }] }], optionsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionsLabel", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }, { type: i0.Output, args: ["valueChange"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], count: [{ type: i0.Input, args: [{ isSignal: true, alias: "count", required: true }] }] } });
169
199
 
200
+ /*
201
+ * TableRowFGC - 表格行组件
202
+ *
203
+ * 用途: 作为表格行的容器组件,用于包裹表格行内的字段组
204
+ * 特性:
205
+ * - 作为表格行的基类组件
206
+ * - 支持字段组功能
207
+ *
208
+ * 使用场景: table使用
209
+ */
170
210
  class TableRowFGC extends PiyingViewGroupBase {
171
211
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TableRowFGC, deps: null, target: i0.ɵɵFactoryTarget.Component });
172
212
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: TableRowFGC, isStandalone: true, selector: "tr", providers: [], usesInheritance: true, ngImport: i0, template: "@for (field of children$$(); track $index) {\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: field, injector }\"\n ></ng-container>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }] });
@@ -194,13 +234,33 @@ function createDefaultColDefineFn(isHeader, content, context) {
194
234
  },
195
235
  }), actions.wrappers.set([{ type: isHeader ? ThWC : TdWC }]));
196
236
  }
237
+ /*
238
+ * TableNFCC - 数据表格组件
239
+ *
240
+ * 用途: 用于显示和管理大量结构化数据,支持丰富的列定义和行操作
241
+ * 特性:
242
+ * - 支持表头、表体、表脚三部分的自定义渲染
243
+ * - 支持列组定义,可配置列的显示内容和格式
244
+ * - 支持行展开功能(ExpandOneTableCell)
245
+ * - 集成 piying-view Schema 系统,支持动态数据和验证
246
+ * - 支持排序、状态管理等高级功能
247
+ *
248
+ * 使用场景: 数据列表展示、管理后台、报表等需要表格形式展示数据的场景
249
+ *
250
+ * 核心类型:
251
+ * - ItemCell: 列内容定义(字符串/Schema/函数)
252
+ * - ColumnDefine: 列定义(head/body/foot)
253
+ * - TableItemDefine2: 表格完整定义(行+列)
254
+ */
197
255
  class TableNFCC {
198
256
  static __version = 2;
199
257
  templateRef = viewChild.required('templateRef');
200
258
  #field = inject(PI_VIEW_FIELD_TOKEN$1);
201
259
  StrOrTemplateComponent = StrOrTemplateComponent;
260
+ /** 表格定义 */
202
261
  define = input(...(ngDevMode ? [undefined, { debugName: "define" }] : []));
203
262
  // todo待修改
263
+ /** 数据列表 */
204
264
  data = input([], ...(ngDevMode ? [{ debugName: "data" }] : []));
205
265
  injector = inject(Injector);
206
266
  data$$ = computed(() => {
@@ -208,12 +268,17 @@ class TableNFCC {
208
268
  return Array.isArray(data) ? data : data();
209
269
  }, ...(ngDevMode ? [{ debugName: "data$$" }] : []));
210
270
  #status = inject(TABLE_STATUS_TOKEN, { optional: true });
271
+ /** 是否启用斑马纹效果 */
211
272
  zebra = input(...(ngDevMode ? [undefined, { debugName: "zebra" }] : []));
273
+ /** 固定配置 */
212
274
  pin = input(...(ngDevMode ? [undefined, { debugName: "pin" }] : []));
275
+ /** 尺寸大小 */
213
276
  size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
277
+ /** 跟踪函数 */
214
278
  trackBy = input((key, value) => {
215
279
  return key;
216
280
  }, ...(ngDevMode ? [{ debugName: "trackBy" }] : []));
281
+ /** 分页配置 */
217
282
  pagination = input(...(ngDevMode ? [undefined, { debugName: "pagination" }] : []));
218
283
  type = input(...(ngDevMode ? [undefined, { debugName: "type" }] : []));
219
284
  #theme = inject(ThemeService);
@@ -392,6 +457,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
392
457
  }] });
393
458
 
394
459
  class inputSortDirective {
460
+ /** 排序键 */
395
461
  key = input.required(...(ngDevMode ? [{ debugName: "key" }] : []));
396
462
  inputSort = signal(0, ...(ngDevMode ? [{ debugName: "inputSort" }] : []));
397
463
  #el = inject(ElementRef).nativeElement;
@@ -438,6 +504,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
438
504
  args: ['change']
439
505
  }] } });
440
506
 
507
+ /*
508
+ * SortHeaderWC - 排序列头包装器组件
509
+ *
510
+ * 用途: 用于表格列的排序控制,通常与 Table 组件配合使用
511
+ * 特性:
512
+ * - 显示排序图标和排序状态
513
+ * - 支持点击触发排序
514
+ * - 集成 piying-view 字段系统
515
+ * - 支持通过 props 设置排序 key
516
+ *
517
+ * 使用场景: 表格列需要排序功能时作为列的包装器使用
518
+ */
441
519
  class SortHeaderWC {
442
520
  static __version = 2;
443
521
  templateRef = viewChild.required('templateRef');
@@ -559,6 +637,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
559
637
  type: Injectable
560
638
  }] });
561
639
 
640
+ /*
641
+ * TableCheckboxAllWC - 表格全选复选框包装器组件
642
+ *
643
+ * 用途: 用于表格的全选功能,控制所有行的选中状态
644
+ * 特性:
645
+ * - 显示全选/取消全选按钮
646
+ * - 同步表格行的选中状态
647
+ * - 集成 CheckboxService 进行状态管理
648
+ * - 集成 piying-view 字段系统
649
+ *
650
+ * 使用场景: 表格需要批量操作时,用于控制所有行的选中状态
651
+ */
562
652
  class TableCheckboxAllWC {
563
653
  field$$ = inject(PI_VIEW_FIELD_TOKEN);
564
654
  props$$ = computed(() => this.field$$().props(), ...(ngDevMode ? [{ debugName: "props$$" }] : []));
@@ -586,6 +676,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
586
676
  args: [{ selector: 'app-table-checkbox-all', imports: [InsertFieldDirective], template: "<ng-template #templateRef let-attr=\"attributes\">\n <ng-container insertField></ng-container>\n</ng-template>\n" }]
587
677
  }], ctorParameters: () => [], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }] } });
588
678
 
679
+ /*
680
+ * TableCheckboxOneWC - 表格单选复选框包装器组件
681
+ *
682
+ * 用途: 用于表格单行的复选框控制,管理单行的选中状态
683
+ * 特性:
684
+ * - 显示单行的复选框
685
+ * - 同步单行的选中状态到服务
686
+ * - 集成 CheckboxService 进行状态管理
687
+ * - 集成 piying-view 字段系统
688
+ *
689
+ * 使用场景: 表格需要批量操作时,用于控制单行的选中状态
690
+ */
589
691
  class TableCheckboxOneWC {
590
692
  static __version = 2;
591
693
  templateRef = viewChild.required('templateRef');
@@ -730,6 +832,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
730
832
  type: Injectable
731
833
  }] });
732
834
 
835
+ /*
836
+ * TableExpandOneTableCell - 表格行展开单元格组件
837
+ *
838
+ * 用途: 用于表格行的展开控制,显示和控制行的展开状态
839
+ * 特性:
840
+ * - 显示展开/收起按钮
841
+ * - 控制行的展开状态
842
+ * - 集成 TableExpandService 进行状态管理
843
+ * - 集成 piying-view 字段系统
844
+ *
845
+ * 使用场景: 表格行需要展开显示详细信息的场景
846
+ */
733
847
  class TableExpandOneTableCell {
734
848
  static __version = 2;
735
849
  templateRef = viewChild.required('templateRef');
@@ -835,34 +949,36 @@ class CdkConnectedOverlay {
835
949
  _position;
836
950
  _scrollStrategyFactory = inject(CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY);
837
951
  _ngZone = inject(NgZone);
838
- /** Origin for the connected overlay. */
952
+ /** 弹窗触发原点 */
839
953
  origin = input.required(...(ngDevMode ? [{ debugName: "origin" }] : []));
840
- /** Registered connected position pairs. */
954
+ /** 已注册的连接位置对 */
841
955
  positions = input(...(ngDevMode ? [undefined, { debugName: "positions" }] : []));
842
956
  positions$$ = computed(() => {
843
957
  const pos = this.positions();
844
958
  return pos && pos.length ? pos : defaultPositionList;
845
959
  }, ...(ngDevMode ? [{ debugName: "positions$$" }] : []));
846
- /** The offset in pixels for the overlay connection point on the x-axis */
960
+ /** 弹窗连接点相对于原点的 x 轴偏移量(像素) */
847
961
  offsetX = input(...(ngDevMode ? [undefined, { debugName: "offsetX" }] : []));
848
- /** The offset in pixels for the overlay connection point on the y-axis */
962
+ /** 弹窗连接点相对于原点的 y 轴偏移量(像素) */
849
963
  offsetY = input(...(ngDevMode ? [undefined, { debugName: "offsetY" }] : []));
964
+ /** 弹窗配置 */
850
965
  overlayConfig = input(...(ngDevMode ? [undefined, { debugName: "overlayConfig" }] : []));
851
- /** Margin between the overlay and the viewport edges. */
966
+ /** 弹窗与视口边缘之间的间距(像素) */
852
967
  viewportMargin = input(0, ...(ngDevMode ? [{ debugName: "viewportMargin" }] : []));
853
968
  open = model(false, ...(ngDevMode ? [{ debugName: "open" }] : []));
854
- /** Whether the overlay can be closed by user interaction. */
969
+ /** 是否可以通过用户交互关闭弹窗 */
855
970
  disableClose = input(false, ...(ngDevMode ? [{ debugName: "disableClose" }] : []));
856
- /** CSS selector which to set the transform origin. */
971
+ /** 用于设置 transform origin CSS 选择器 */
857
972
  transformOriginSelector = input(...(ngDevMode ? [undefined, { debugName: "transformOriginSelector" }] : []));
858
- /** Whether or not the overlay should be locked when scrolling. */
973
+ /** 滚动时是否锁定弹窗位置 */
859
974
  lockPosition = input(false, ...(ngDevMode ? [{ debugName: "lockPosition" }] : []));
860
- /** Whether the overlay's width and height can be constrained to fit within the viewport. */
975
+ /** 弹窗的宽高是否可以被约束以适应视口 */
861
976
  flexibleDimensions = input(false, ...(ngDevMode ? [{ debugName: "flexibleDimensions" }] : []));
862
- /** Whether the overlay can grow after the initial open when flexible positioning is turned on. */
977
+ /** 在启用灵活定位后,弹窗是否可以在首次打开后增长 */
863
978
  growAfterOpen = input(false, ...(ngDevMode ? [{ debugName: "growAfterOpen" }] : []));
864
- /** Whether the overlay can be pushed on-screen if none of the provided positions fit. */
979
+ /** 如果提供的位置都不合适,弹窗是否可以被推到屏幕上 */
865
980
  push = input(false, ...(ngDevMode ? [{ debugName: "push" }] : []));
981
+ /** 弹窗宽度是否与原点宽度匹配 */
866
982
  matchWidth = input(false, ...(ngDevMode ? [{ debugName: "matchWidth" }] : []));
867
983
  /** Event emitted when the backdrop is clicked. */
868
984
  backdropClick = new EventEmitter();
@@ -1087,16 +1203,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
1087
1203
  type: Output
1088
1204
  }] } });
1089
1205
 
1206
+ /*
1207
+ * PickerRefFCC - 选择器引用组件
1208
+ *
1209
+ * 用途: 用于触发选择器弹窗,支持自定义触发器和内容区域
1210
+ * 特性:
1211
+ * - 支持自定义触发器内容(trigger)
1212
+ * - 支持自定义弹窗内容(content)
1213
+ * - 支持选择后自动关闭(changeClose)
1214
+ * - 基于 CDK Overlay 实现弹窗定位
1215
+ * - 实现了 ControlValueAccessor 接口,可直接用于表单
1216
+ *
1217
+ * 使用场景: 选择器、下拉选择、日期时间选择等需要弹窗选择的场景
1218
+ */
1090
1219
  class PickerRefFCC extends BaseControl {
1091
1220
  static index = 0;
1092
1221
  SelectorlessOutlet = SelectorlessOutlet;
1093
1222
  static __version = 2;
1094
1223
  templateRef = viewChild.required('templateRef');
1095
1224
  PiyingView = PiyingView;
1225
+ /** 触发器内容 */
1096
1226
  trigger = input(...(ngDevMode ? [undefined, { debugName: "trigger" }] : []));
1227
+ /** 弹窗内容 */
1097
1228
  content = input(...(ngDevMode ? [undefined, { debugName: "content" }] : []));
1229
+ /** 选择后是否自动关闭 */
1098
1230
  changeClose = input(...(ngDevMode ? [undefined, { debugName: "changeClose" }] : []));
1099
1231
  isOpen$ = signal(false, ...(ngDevMode ? [{ debugName: "isOpen$" }] : []));
1232
+ /** 弹窗配置 */
1100
1233
  overlayConfig = input(...(ngDevMode ? [undefined, { debugName: "overlayConfig" }] : []));
1101
1234
  position$ = signal('', ...(ngDevMode ? [{ debugName: "position$" }] : []));
1102
1235
  parentPyOptions = inject(PI_INPUT_OPTIONS_TOKEN, { optional: true });
@@ -1166,15 +1299,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
1166
1299
  ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #templateRef let-attr=\"attributes\">\n <div cdkOverlayOrigin #trigger=\"cdkOverlayOrigin\" [attributes]=\"attr()\" (click)=\"openRef()\">\n <ng-container\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"triggerInput$$()\"\n ></ng-container>\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [origin]=\"trigger\"\n [open]=\"isOpen$()\"\n [overlayConfig]=\"overlayConfig()\"\n (detach)=\"isOpen$.set(false)\"\n (overlayOutsideClick)=\"outsideClick()\"\n >\n <ng-container\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"contentInput$$()\"\n [selectlessOutletOutputs]=\"contentOutput$$()\"\n ></ng-container>\n </ng-template>\n</ng-template>\n" }]
1167
1300
  }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], trigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "trigger", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], changeClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "changeClose", required: false }] }], overlayConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayConfig", required: false }] }] } });
1168
1301
 
1302
+ /*
1303
+ * OptionListFCC - 选项列表组件
1304
+ *
1305
+ * 用途: 用于显示可选择的选项列表,支持自定义选项模板和转换规则
1306
+ * 特性:
1307
+ * - 支持动态选项数据(options)
1308
+ * - 支持自定义选项模板(optionTemplate)
1309
+ * - 支持选项转换器(optionConvert)
1310
+ * - 实现了 ControlValueAccessor 接口,可直接用于表单
1311
+ * - 集成 piying-view 字段系统
1312
+ *
1313
+ * 使用场景: 下拉选择、单选列表、选项选择等需要选项列表的场景
1314
+ */
1169
1315
  class OptionListFCC extends BaseControl {
1170
1316
  static __version = 2;
1171
1317
  StrOrTemplateComponent = StrOrTemplateComponent;
1172
1318
  PiyingView = PiyingView;
1173
1319
  templateRef = viewChild.required('templateRef');
1320
+ /** 选项列表 */
1174
1321
  options = input([], ...(ngDevMode ? [{ debugName: "options", transform: (input) => input ?? [] }] : [{
1175
1322
  transform: (input) => input ?? [],
1176
1323
  }]));
1324
+ /** 选项模板 */
1177
1325
  optionTemplate = input(...(ngDevMode ? [undefined, { debugName: "optionTemplate" }] : []));
1326
+ /** 选项转换器 */
1178
1327
  optionConvert = input(DefaultOptionConvert, ...(ngDevMode ? [{ debugName: "optionConvert", transform: (input) => ({ ...DefaultOptionConvert, ...input }) }] : [{
1179
1328
  transform: (input) => ({ ...DefaultOptionConvert, ...input }),
1180
1329
  }]));
@@ -1221,12 +1370,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
1221
1370
  ], template: "<ng-template #liGroup let-item>\n <!-- todo open\u6D4B\u8BD5 -->\n <details open>\n <summary>{{ item.label }}</summary>\n <ul>\n @for (child of item.children; track $index) {\n <ng-container\n *ngTemplateOutlet=\"itemTemplate; context: { $implicit: child }\"\n ></ng-container>\n }\n </ul>\n </details>\n</ng-template>\n<ng-template #itemTemplate let-option>\n @let rOption = transformOption | pure: option : optionConvert();\n @let template = optionTemplate()?.[rOption.type];\n @if (template) {\n <ng-container\n [selectlessOutlet]=\"PiyingView\"\n [selectlessOutletInputs]=\"getInput$$ | pure: template\"\n ></ng-container>\n } @else if (rOption.type === 'option') {\n <li (click)=\"selectOption(rOption)\">\n <button [class]=\"activateClass | pure: rOption.value : value$()\">\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"optionInput | pure: rOption.label\"\n ></ng-template>\n </button>\n </li>\n } @else if (rOption.type === 'group') {\n <li>\n <details open>\n <summary>\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"optionInput | pure: rOption.label\"\n ></ng-template>\n </summary>\n <ul>\n @for (child of rOption.children; track $index) {\n <ng-container\n *ngTemplateOutlet=\"itemTemplate; context: { $implicit: child }\"\n ></ng-container>\n }\n </ul>\n </details>\n </li>\n }\n</ng-template>\n\n<ng-template #templateRef let-attr=\"attributes\">\n <ul class=\"menu\">\n @for (option of options(); track $index) {\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: option }\"></ng-container>\n }\n </ul>\n</ng-template>\n" }]
1222
1371
  }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionTemplate", required: false }] }], optionConvert: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionConvert", required: false }] }] } });
1223
1372
 
1373
+ /*
1374
+ * ListTemplateNFCC - 列表模板组件
1375
+ *
1376
+ * 用途: 用于基于模板渲染列表数据,支持动态上下文传递
1377
+ * 特性:
1378
+ * - 支持自定义模板(template)
1379
+ * - 支持列表数据渲染(list)
1380
+ * - 支持传递父级和项的上下文信息
1381
+ * - 集成 piying-view 字段系统
1382
+ *
1383
+ * 使用场景: 动态列表渲染、模板化列表展示等需要基于模板渲染列表的场景
1384
+ */
1224
1385
  class ListTemplateNFCC {
1225
1386
  static __version = 2;
1226
1387
  StrOrTemplateComponent = StrOrTemplateComponent;
1227
1388
  PiyingView = PiyingView;
1228
1389
  templateRef = viewChild.required('templateRef');
1390
+ /** 模板 */
1229
1391
  template = input.required(...(ngDevMode ? [{ debugName: "template" }] : []));
1392
+ /** 列表数据 */
1230
1393
  list = input([], ...(ngDevMode ? [{ debugName: "list" }] : []));
1231
1394
  parentPyOptions = inject(PI_INPUT_OPTIONS_TOKEN, { optional: true });
1232
1395
  field = inject(PI_VIEW_FIELD_TOKEN);
@@ -1252,16 +1415,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
1252
1415
  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" }]
1253
1416
  }], 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 }] }] } });
1254
1417
 
1418
+ /*
1419
+ * EditableGroupFGC - 可编辑组组件
1420
+ *
1421
+ * 用途: 用于动态管理可增删的组数据,支持键值对和单值两种模式
1422
+ * 特性:
1423
+ * - 支持添加和删除组项
1424
+ * - 支持横向和纵向布局
1425
+ * - 支持设置最小长度限制
1426
+ * - 支持自定义新增项的初始值
1427
+ * - 支持键值对模式(通过 groupKeySchema)
1428
+ * - 集成 piying-view 字段系统
1429
+ *
1430
+ * 使用场景: 动态表单项、可增删的数据组、键值对列表等需要动态管理组数据的场景
1431
+ */
1255
1432
  class EditableGroupFGC extends PiyingViewGroupBase {
1256
1433
  static __version = 2;
1257
1434
  templateRef = viewChild.required('templateRef');
1258
1435
  PiyingView = PiyingView;
1436
+ /** 布局方式 */
1259
1437
  layout = input('row', ...(ngDevMode ? [{ debugName: "layout" }] : []));
1438
+ /** 是否禁用添加 */
1260
1439
  disableAdd = input(false, ...(ngDevMode ? [{ debugName: "disableAdd" }] : []));
1440
+ /** 添加模式 */
1261
1441
  addMode = input(0, ...(ngDevMode ? [{ debugName: "addMode" }] : []));
1442
+ /** 是否禁用删除 */
1262
1443
  disableRemove = input(false, ...(ngDevMode ? [{ debugName: "disableRemove" }] : []));
1444
+ /** 添加位置 */
1263
1445
  addPosition = input('bottom', ...(ngDevMode ? [{ debugName: "addPosition" }] : []));
1446
+ /** 初始值生成函数 */
1264
1447
  initValue = input(...(ngDevMode ? [undefined, { debugName: "initValue" }] : []));
1448
+ /** 最小长度 */
1265
1449
  minLength = input(0, ...(ngDevMode ? [{ debugName: "minLength" }] : []));
1266
1450
  isRecord$$ = computed(() => {
1267
1451
  return !!this.field$$().form.control.config$().groupKeySchema;
@@ -1349,10 +1533,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
1349
1533
  }], 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
1534
 
1351
1535
  const Empty_Array = [];
1536
+ /*
1537
+ * CheckboxListFGC - 复选框列表组件
1538
+ *
1539
+ * 用途: 用于显示可多选的复选框列表,支持动态选项和自定义配置
1540
+ * 特性:
1541
+ * - 支持动态复选框选项(options)
1542
+ * - 支持自定义每个选项的 Schema 和属性
1543
+ * - 实现了 ControlValueAccessor 接口,可直接用于表单
1544
+ * - 基于 piying-view 字段系统,支持动态验证和状态管理
1545
+ * - 支持值的增删操作
1546
+ *
1547
+ * 使用场景: 多选列表、权限选择、标签选择等需要多选功能的场景
1548
+ */
1352
1549
  class CheckboxListFGC extends PiyingViewGroupBase {
1353
1550
  static __version = 2;
1354
1551
  templateRef = viewChild.required('templateRef');
1355
1552
  PiyingView = PiyingView;
1553
+ /** 选项列表 */
1356
1554
  options = input(...(ngDevMode ? [undefined, { debugName: "options" }] : []));
1357
1555
  #parentPyOptions = inject(PI_INPUT_OPTIONS_TOKEN, { optional: true });
1358
1556
  templateSchema$$ = computed(() => {
@@ -1415,6 +1613,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
1415
1613
  ], 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
1614
  }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
1417
1615
 
1616
+ /*
1617
+ * logicGroupFGC - 逻辑组组件
1618
+ *
1619
+ * 用途: 用于根据逻辑条件控制子组件的激活状态
1620
+ * 特性:
1621
+ * - 根据 FieldLogicGroup 的激活状态显示子组件
1622
+ * - 自动过滤未激活的子组件
1623
+ * - 集成 piying-view 字段系统
1624
+ *
1625
+ * 使用场景: 条件显示、逻辑控制、动态表单等需要根据逻辑条件控制组件显示的场景
1626
+ */
1418
1627
  class logicGroupFGC extends PiyingViewGroupBase {
1419
1628
  static __version = 2;
1420
1629
  templateRef = viewChild.required('templateRef');
@@ -1447,6 +1656,18 @@ var component_index = /*#__PURE__*/Object.freeze({
1447
1656
  logicGroupFGC: logicGroupFGC
1448
1657
  });
1449
1658
 
1659
+ /*
1660
+ * FilterOptionNFCC - 过滤选项组件
1661
+ *
1662
+ * 用途: 用于显示过滤输入框,通常与 OptionList 组件配合使用
1663
+ * 特性:
1664
+ * - 显示过滤输入框
1665
+ * - 从 context 中获取搜索内容
1666
+ * - 阻止键盘事件冒泡
1667
+ * - 集成 piying-view 字段系统
1668
+ *
1669
+ * 使用场景: 选项列表需要本地过滤功能时,用于输入过滤条件
1670
+ */
1450
1671
  class FilterOptionNFCC {
1451
1672
  static __version = 2;
1452
1673
  templateRef = viewChild.required('templateRef');
@@ -1463,6 +1684,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
1463
1684
  args: [{ selector: 'app-filter-option', imports: [FormsModule, CssPrefixPipe, MergeClassPipe, AttributesDirective, FormsModule], template: "<ng-template #templateRef let-attr=\"attributes\">\n <input\n type=\"text\"\n [attributes]=\"attr?.()\"\n [excludes]=\"['class']\"\n [class]=\"attr?.().class | mergeClass: 'input' | cssPrefix\"\n [(ngModel)]=\"content\"\n (keydown)=\"stopKeyboardListen($event)\"\n />\n</ng-template>\n" }]
1464
1685
  }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }] } });
1465
1686
 
1687
+ /*
1688
+ * OptionListLocalFilterWC - 选项列表本地过滤包装器组件
1689
+ *
1690
+ * 用途: 用于在客户端对选项列表进行本地过滤筛选
1691
+ * 特性:
1692
+ * - 支持输入搜索内容进行过滤
1693
+ * - 支持自定义过滤函数(filterWith)
1694
+ * - 支持自定义过滤选项组件(filterDefine)
1695
+ * - 自动同步过滤状态到选项列表
1696
+ * - 集成 piying-view 字段系统
1697
+ *
1698
+ * 使用场景: 选项列表数据量较小,需要在客户端进行筛选的场景
1699
+ */
1466
1700
  class OptionListLocalFilterWC {
1467
1701
  static __version = 2;
1468
1702
  templateRef = viewChild.required('templateRef');
@@ -1518,6 +1752,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
1518
1752
 
1519
1753
  var wrapper_index = /*#__PURE__*/Object.freeze({
1520
1754
  __proto__: null,
1755
+ FilterOptionNFCC: FilterOptionNFCC,
1521
1756
  OptionListLocalFilterWC: OptionListLocalFilterWC,
1522
1757
  SortHeaderWC: SortHeaderWC,
1523
1758
  TableCheckboxAllWC: TableCheckboxAllWC,