@piying-lib/angular-daisyui 1.1.7 → 1.2.1

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 (90) hide show
  1. package/extension/index.d.ts +163 -11
  2. package/fesm2022/piying-lib-angular-daisyui-extension.mjs +446 -29
  3. package/fesm2022/piying-lib-angular-daisyui-extension.mjs.map +1 -1
  4. package/fesm2022/{piying-lib-angular-daisyui-field-control-props.directive-C5mF89PX.mjs → piying-lib-angular-daisyui-field-control-props.directive-I-MQ3iQV.mjs} +2 -1
  5. package/fesm2022/piying-lib-angular-daisyui-field-control-props.directive-I-MQ3iQV.mjs.map +1 -0
  6. package/fesm2022/piying-lib-angular-daisyui-field-control.mjs +218 -17
  7. package/fesm2022/piying-lib-angular-daisyui-field-control.mjs.map +1 -1
  8. package/fesm2022/piying-lib-angular-daisyui-field-group.mjs +113 -27
  9. package/fesm2022/piying-lib-angular-daisyui-field-group.mjs.map +1 -1
  10. package/fesm2022/piying-lib-angular-daisyui-non-field-control.mjs +147 -9
  11. package/fesm2022/piying-lib-angular-daisyui-non-field-control.mjs.map +1 -1
  12. package/fesm2022/piying-lib-angular-daisyui-service.mjs.map +1 -1
  13. package/fesm2022/piying-lib-angular-daisyui-wrapper.mjs +47 -4
  14. package/fesm2022/piying-lib-angular-daisyui-wrapper.mjs.map +1 -1
  15. package/field-control/index.d.ts +162 -10
  16. package/field-group/index.d.ts +97 -13
  17. package/non-field-control/index.d.ts +150 -0
  18. package/package.json +2 -2
  19. package/preset-css/css/style.css +1 -1
  20. package/preset-css/css/style.split.css +1 -1
  21. package/preset-css/json/manifest.json +747 -851
  22. package/preset-css/ts/accordion.ts +9 -9
  23. package/preset-css/ts/alert.ts +12 -12
  24. package/preset-css/ts/avatar.ts +7 -7
  25. package/preset-css/ts/badge.ts +20 -20
  26. package/preset-css/ts/breadcrumbs.ts +1 -3
  27. package/preset-css/ts/browser-mockup.ts +1 -4
  28. package/preset-css/ts/button.ts +27 -27
  29. package/preset-css/ts/calendar.ts +1 -5
  30. package/preset-css/ts/card.ts +15 -15
  31. package/preset-css/ts/carousel.ts +9 -9
  32. package/preset-css/ts/chat-bubble.ts +17 -17
  33. package/preset-css/ts/checkbox.ts +16 -16
  34. package/preset-css/ts/code-mockup.ts +1 -3
  35. package/preset-css/ts/collapse.ts +9 -9
  36. package/preset-css/ts/countdown.ts +1 -3
  37. package/preset-css/ts/diff.ts +1 -6
  38. package/preset-css/ts/divider.ts +15 -15
  39. package/preset-css/ts/dock.ts +10 -10
  40. package/preset-css/ts/drawer-sidebar.ts +11 -11
  41. package/preset-css/ts/dropdown.ts +14 -14
  42. package/preset-css/ts/fab-speed-dial.ts +1 -6
  43. package/preset-css/ts/fieldset.ts +1 -5
  44. package/preset-css/ts/file-input.ts +17 -17
  45. package/preset-css/ts/filter.ts +1 -4
  46. package/preset-css/ts/footer.ts +7 -7
  47. package/preset-css/ts/hero.ts +1 -5
  48. package/preset-css/ts/hover-3-d-card.ts +1 -3
  49. package/preset-css/ts/hover-gallery.ts +1 -3
  50. package/preset-css/ts/index.ts +1 -1
  51. package/preset-css/ts/indicator.ts +10 -10
  52. package/preset-css/ts/join-group-items.ts +6 -6
  53. package/preset-css/ts/kbd.ts +1 -8
  54. package/preset-css/ts/label.ts +1 -4
  55. package/preset-css/ts/link.ts +12 -12
  56. package/preset-css/ts/list.ts +1 -6
  57. package/preset-css/ts/loading.ts +14 -14
  58. package/preset-css/ts/mask.ts +20 -20
  59. package/preset-css/ts/menu.ts +17 -17
  60. package/preset-css/ts/modal.ts +13 -13
  61. package/preset-css/ts/navbar.ts +1 -6
  62. package/preset-css/ts/pagination.ts +1 -6
  63. package/preset-css/ts/phone-mockup.ts +5 -5
  64. package/preset-css/ts/progress.ts +11 -11
  65. package/preset-css/ts/radial-progress.ts +1 -3
  66. package/preset-css/ts/radio.ts +16 -16
  67. package/preset-css/ts/range-slider.ts +16 -16
  68. package/preset-css/ts/rating.ts +10 -10
  69. package/preset-css/ts/select.ts +17 -17
  70. package/preset-css/ts/skeleton.ts +1 -4
  71. package/preset-css/ts/stack.ts +1 -7
  72. package/preset-css/ts/stat.ts +11 -11
  73. package/preset-css/ts/status.ts +16 -16
  74. package/preset-css/ts/steps.ts +15 -15
  75. package/preset-css/ts/swap.ts +9 -9
  76. package/preset-css/ts/table.ts +11 -11
  77. package/preset-css/ts/tabs.ts +17 -17
  78. package/preset-css/ts/text-input.ts +17 -17
  79. package/preset-css/ts/text-rotate.ts +1 -3
  80. package/preset-css/ts/textarea.ts +17 -17
  81. package/preset-css/ts/theme-controller.ts +1 -3
  82. package/preset-css/ts/timeline.ts +11 -11
  83. package/preset-css/ts/toast.ts +9 -9
  84. package/preset-css/ts/toggle.ts +16 -16
  85. package/preset-css/ts/tooltip.ts +17 -17
  86. package/preset-css/ts/validator.ts +1 -4
  87. package/preset-css/ts/window-mockup.ts +1 -3
  88. package/service/index.d.ts +1 -1
  89. package/wrapper/index.d.ts +23 -2
  90. package/fesm2022/piying-lib-angular-daisyui-field-control-props.directive-C5mF89PX.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { NgTemplateOutlet, NgComponentOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { input, viewChild, inject, computed, Component, linkedSignal, model, effect } from '@angular/core';
3
+ import { input, viewChild, inject, computed, Component, linkedSignal, model, effect, output } from '@angular/core';
4
4
  import { PurePipe } from '@cyia/ngx-common/pipe';
5
5
  import { MergeClassPipe, CssPrefixPipe, TwPrefixPipe } from '@piying-lib/angular-daisyui/pipe';
6
6
  import { useTwClass, ThemeService } from '@piying-lib/angular-daisyui/service';
@@ -11,22 +11,34 @@ import * as i1 from '@angular/forms';
11
11
  import { FormsModule } from '@angular/forms';
12
12
  import { SelectorlessOutlet } from '@cyia/ngx-common/directive';
13
13
  import { StrOrTemplateComponent } from '@piying-lib/angular-core';
14
+ import { FieldLogicGroup } from '@piying/view-angular-core';
14
15
 
15
16
  class AccordionItem {
16
17
  constructor(field) { }
17
18
  isActivated() { }
18
19
  }
20
+ /**
21
+ * 折叠面板组
22
+ *
23
+ * 用于将多个内容块进行折叠/展开管理,支持单展开或多展开模式。
24
+ * 适合内容较多但需要节省空间的场景,如常见问题解答、设置选项分组等。
25
+ */
19
26
  class AccordionFGC extends PiyingViewGroupBase {
20
27
  static __version = 2;
21
28
  static index = 0;
22
29
  name = `accordion-${AccordionFGC.index++}`;
30
+ /** 是否允许多个面板同时展开 */
23
31
  multi = input(false, ...(ngDevMode ? [{ debugName: "multi" }] : []));
24
32
  templateRef = viewChild.required('templateRef');
33
+ /** 子项标题函数,用于自定义标题显示 */
25
34
  childTitleFn = input((item) => {
26
35
  return item.props()?.['title'] ?? item.keyPath?.slice(-1)[0] ?? '';
27
36
  }, ...(ngDevMode ? [{ debugName: "childTitleFn" }] : []));
37
+ /** 是否连接子项 */
28
38
  joinChild = input(true, ...(ngDevMode ? [{ debugName: "joinChild" }] : []));
39
+ /** 折叠图标样式 */
29
40
  collapseIcon = input(...(ngDevMode ? [undefined, { debugName: "collapseIcon" }] : []));
41
+ /** 子项 CSS 类名 */
30
42
  childClass = input(useTwClass('bg-base-100 border border-base-300'), ...(ngDevMode ? [{ debugName: "childClass" }] : []));
31
43
  #theme = inject(ThemeService);
32
44
  childClass$$ = computed(() => {
@@ -46,16 +58,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
46
58
  args: [{ selector: 'app-accordion', imports: [AttributesDirective, NgTemplateOutlet, PurePipe, MergeClassPipe, CssPrefixPipe], template: "<ng-template #mainTemp>\n @for (field of children$$(); track field.id || $index) {\n <div [class]=\"childClass$$() | mergeClass: ('collapse' | cssPrefix)\">\n <input\n type=\"radio\"\n [name]=\"childName | pure: multi() : $index\"\n [checked]=\"!!field.props()['checked']\"\n />\n <div class=\"{{ 'collapse-title' | cssPrefix }}\">\n {{ childTitleFn() | pure: field }}\n </div>\n <div class=\"{{ 'collapse-content' | cssPrefix }}\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: field }\"\n ></ng-container>\n </div>\n </div>\n }\n</ng-template>\n<ng-template #templateRef let-attr=\"attributes\">\n @if (joinChild()) {\n <div\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class | mergeClass: ('join join-vertical' | cssPrefix)\"\n >\n <ng-container *ngTemplateOutlet=\"mainTemp\"></ng-container>\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"mainTemp\"></ng-container>\n }\n</ng-template>\n" }]
47
59
  }], propDecorators: { multi: [{ type: i0.Input, args: [{ isSignal: true, alias: "multi", required: false }] }], templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], childTitleFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "childTitleFn", required: false }] }], joinChild: [{ type: i0.Input, args: [{ isSignal: true, alias: "joinChild", required: false }] }], collapseIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseIcon", required: false }] }], childClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "childClass", required: false }] }] } });
48
60
 
61
+ /**
62
+ * 卡片组
63
+ *
64
+ * 用于将表单字段组织成卡片式布局,支持标题、图片和操作区的自定义。
65
+ * 适合需要突出显示每组字段、创建美观表单界面的场景,如用户资料编辑、表单 Wizard 等。
66
+ */
49
67
  class CardFGC extends PiyingViewGroupBase {
50
68
  static __version = 2;
51
69
  templateRef = viewChild.required('templateRef');
70
+ /** 边框样式 */
52
71
  border = input(...(ngDevMode ? [undefined, { debugName: "border" }] : []));
72
+ /** 尺寸大小 */
53
73
  size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
74
+ /** 内容区域 CSS 类名 */
54
75
  bodyClass = input(...(ngDevMode ? [undefined, { debugName: "bodyClass" }] : []));
76
+ /** 图片区域 CSS 类名 */
55
77
  figureClass = input(...(ngDevMode ? [undefined, { debugName: "figureClass" }] : []));
78
+ /** 操作区域 CSS 类名 */
56
79
  actionsClass = input(useTwClass('justify-end'), ...(ngDevMode ? [{ debugName: "actionsClass" }] : []));
80
+ /** 标题字段键名 */
57
81
  titleKey = input('title', ...(ngDevMode ? [{ debugName: "titleKey" }] : []));
82
+ /** 图片字段键名 */
58
83
  figureKey = input('figure', ...(ngDevMode ? [{ debugName: "figureKey" }] : []));
84
+ /** 操作字段键名 */
59
85
  actionsKey = input('actions', ...(ngDevMode ? [{ debugName: "actionsKey" }] : []));
60
86
  titleFiled$$ = computed(() => {
61
87
  return this.field$$()
@@ -98,13 +124,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
98
124
  args: [{ selector: 'app-card', imports: [AttributesDirective, NgTemplateOutlet, CssPrefixPipe, MergeClassPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class | mergeClass: ('card' | cssPrefix) : wrapperClass$()\"\n >\n @if (figureFiled$$(); as field) {\n <figure [class]=\"figureClass()\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: field }\"\n ></ng-container>\n </figure>\n }\n <div [class]=\"bodyClass() | mergeClass: ('card-body' | cssPrefix)\">\n @if (titleFiled$$(); as field) {\n <h2 class=\"{{ 'card-title' | cssPrefix }}\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: field }\"\n ></ng-container>\n </h2>\n }\n @if (bodyChildren$$(); as bodyChildren) {\n <div>\n @for (field of bodyChildren; track $index) {\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: field }\"\n ></ng-container>\n }\n </div>\n }\n @if (actionsFiled$$(); as field) {\n <div [class]=\"actionsClass() | mergeClass: ('card-actions' | cssPrefix)\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: field }\"\n ></ng-container>\n </div>\n }\n </div>\n </div>\n</ng-template>\n" }]
99
125
  }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], border: [{ type: i0.Input, args: [{ isSignal: true, alias: "border", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], bodyClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "bodyClass", required: false }] }], figureClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "figureClass", required: false }] }], actionsClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsClass", required: false }] }], titleKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleKey", required: false }] }], figureKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "figureKey", required: false }] }], actionsKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsKey", required: false }] }] } });
100
126
 
127
+ /**
128
+ * 走马灯组
129
+ *
130
+ * 用于横向或纵向滚动展示多个表单字段,支持自动滚动和对齐方式设置。
131
+ * 适合字段较多且需要空间节省的场景,如多步骤表单、长列表项展示等。
132
+ */
101
133
  class CarouselFGC extends PiyingViewGroupBase {
102
134
  static __version = 2;
103
135
  static index = 0;
104
136
  index = CarouselFGC.index++;
105
137
  templateRef = viewChild.required('templateRef');
138
+ /** 滚动方向 */
106
139
  direction = input(...(ngDevMode ? [undefined, { debugName: "direction" }] : []));
140
+ /** 滚动对齐方式 */
107
141
  scrollAlign = input(...(ngDevMode ? [undefined, { debugName: "scrollAlign" }] : []));
142
+ /** 子项 ID 映射函数 */
108
143
  childIdMap = input((compIndex, childIndex) => {
109
144
  return `carousel-${compIndex}-${childIndex}`;
110
145
  }, ...(ngDevMode ? [{ debugName: "childIdMap" }] : []));
@@ -123,10 +158,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
123
158
  args: [{ selector: 'app-carousel', imports: [AttributesDirective, NgTemplateOutlet, CssPrefixPipe, MergeClassPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class | mergeClass: ('carousel' | cssPrefix) : ngClass$$()\"\n >\n @for (field of children$$(); track $index) {\n <div class=\"{{ 'carousel-item' | cssPrefix }}\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: field }\"\n ></ng-container>\n </div>\n }\n </div>\n</ng-template>\n" }]
124
159
  }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], scrollAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollAlign", required: false }] }], childIdMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "childIdMap", required: false }] }] } });
125
160
 
161
+ /**
162
+ * 舷窗组
163
+ *
164
+ * 底部导航栏(也称为“Dock”或“底部栏”)是一种用户界面元素,用于向用户提供导航选项。该栏固定在屏幕底部。
165
+ */
126
166
  class DockFGC extends PiyingViewGroupBase {
127
167
  static __version = 2;
128
168
  templateRef = viewChild.required('templateRef');
169
+ /** 尺寸大小 */
129
170
  size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
171
+ /** 当前激活的索引 */
130
172
  activatedIndex = input(0, ...(ngDevMode ? [{ debugName: "activatedIndex" }] : []));
131
173
  activatedIndex$ = linkedSignal(this.activatedIndex, ...(ngDevMode ? [{ debugName: "activatedIndex$" }] : []));
132
174
  toggleActivate(index) {
@@ -144,9 +186,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
144
186
  args: [{ selector: 'app-dock', imports: [AttributesDirective, NgTemplateOutlet, MatIcon, CssPrefixPipe, MergeClassPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n @let activatedField = children$$()[activatedIndex$()];\n @if (activatedField) {\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: activatedField }\"\n ></ng-container>\n }\n\n <div\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class | mergeClass: ('dock' | cssPrefix) : wrapperClass$()\"\n >\n @for (field of children$$(); track $index) {\n @let item = field.props();\n <button\n (click)=\"toggleActivate($index)\"\n [class]=\"$index === activatedIndex$() ? ('dock-active' | cssPrefix) : ''\"\n >\n @if (item['icon']; as icon) {\n <mat-icon\n [inline]=\"icon.inline\"\n [fontIcon]=\"icon.fontIcon\"\n [fontSet]=\"icon.fontSet\"\n [svgIcon]=\"icon.svgIcon\"\n ></mat-icon>\n }\n @if (item['title']) {\n <span [class]=\"'dock-label' | cssPrefix\">{{ item['title'] }}</span>\n }\n </button>\n }\n </div>\n</ng-template>\n" }]
145
187
  }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], activatedIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "activatedIndex", required: false }] }] } });
146
188
 
189
+ /**
190
+ * 列表组
191
+ *
192
+ * 用于将表单字段以列表形式垂直排列展示,支持自定义标题样式。
193
+ * 适合字段较多、需要清晰层级结构的场景,如设置列表、表单项清单等。
194
+ */
147
195
  class ListFGC extends PiyingViewGroupBase {
148
196
  static __version = 2;
149
197
  templateRef = viewChild.required('templateRef');
198
+ /** 标题 CSS 类名 */
150
199
  titleClass = input(...(ngDevMode ? [undefined, { debugName: "titleClass" }] : []));
151
200
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ListFGC, deps: null, target: i0.ɵɵFactoryTarget.Component });
152
201
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: ListFGC, isStandalone: true, selector: "app-list", inputs: { titleClass: { classPropertyName: "titleClass", publicName: "titleClass", 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\">\n <ul\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class | mergeClass: ('list' | cssPrefix)\"\n >\n @let title = props$$()['title'];\n @if (title) {\n <li [class]=\"titleClass()\">{{ title }}</li>\n }\n\n @for (field of children$$(); track $index) {\n <li [class]=\"'list-row' | cssPrefix\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: field }\"\n ></ng-container>\n </li>\n }\n </ul>\n</ng-template>\n", dependencies: [{ kind: "directive", type: AttributesDirective, selector: "[attributes]", inputs: ["attributes", "excludes"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: CssPrefixPipe, name: "cssPrefix" }, { kind: "pipe", type: MergeClassPipe, name: "mergeClass" }] });
@@ -156,6 +205,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
156
205
  args: [{ selector: 'app-list', imports: [AttributesDirective, NgTemplateOutlet, CssPrefixPipe, MergeClassPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n <ul\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class | mergeClass: ('list' | cssPrefix)\"\n >\n @let title = props$$()['title'];\n @if (title) {\n <li [class]=\"titleClass()\">{{ title }}</li>\n }\n\n @for (field of children$$(); track $index) {\n <li [class]=\"'list-row' | cssPrefix\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: field }\"\n ></ng-container>\n </li>\n }\n </ul>\n</ng-template>\n" }]
157
206
  }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], titleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleClass", required: false }] }] } });
158
207
 
208
+ /**
209
+ * 导航栏组
210
+ *
211
+ * 用于将表单字段组织成导航栏布局,支持开始、中间、结束三个区域的智能分配。
212
+ * 适合需要在顶部导航栏展示表单操作或导航项的场景,如搜索栏、工具栏等。
213
+ */
159
214
  class NavbarFGC extends PiyingViewGroupBase {
160
215
  static __version = 2;
161
216
  static index = 0;
@@ -190,15 +245,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
190
245
  args: [{ selector: 'app-navbar', imports: [AttributesDirective, NgTemplateOutlet, CssPrefixPipe, MergeClassPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class | mergeClass: ('navbar' | cssPrefix)\"\n >\n @for (field of rest$$(); track $index) {\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: field }\"\n ></ng-container>\n }\n @let start = start$$();\n @if (start) {\n <div [class]=\"'navbar-start' | cssPrefix\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: start }\"\n ></ng-container>\n </div>\n }\n @let center = center$$();\n @if (center) {\n <div [class]=\"'navbar-center' | cssPrefix\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: center }\"\n ></ng-container>\n </div>\n }\n\n @let end = end$$();\n @if (end) {\n <div [class]=\"'navbar-end' | cssPrefix\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: end }\"\n ></ng-container>\n </div>\n }\n </div>\n</ng-template>\n" }]
191
246
  }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }] } });
192
247
 
248
+ /**
249
+ * 抽屉组
250
+ *
251
+ * 用于将表单字段组织成可侧边抽屉展开/收起的布局,支持覆盖和侧边两种模式。
252
+ * 适合次要或辅助性的字段组,如筛选条件、详细信息、操作面板等。
253
+ */
193
254
  class DrawerFGC extends PiyingViewGroupBase {
194
255
  static __version = 2;
195
256
  static index = 0;
196
257
  name = `drawer-${DrawerFGC.index++}`;
197
258
  templateRef = viewChild.required('templateRef');
259
+ /** 抽屉内容区域 CSS 类名 */
198
260
  contentClass = input(...(ngDevMode ? [undefined, { debugName: "contentClass" }] : []));
261
+ /** 侧边栏区域 CSS 类名 */
199
262
  sideClass = input(...(ngDevMode ? [undefined, { debugName: "sideClass" }] : []));
263
+ /** 遮罩层 CSS 类名 */
200
264
  overlayClass = input(...(ngDevMode ? [undefined, { debugName: "overlayClass" }] : []));
265
+ /** 抽屉模式 */
201
266
  mode = input('over', ...(ngDevMode ? [{ debugName: "mode" }] : []));
267
+ /** 抽屉位置 */
202
268
  position = input(...(ngDevMode ? [undefined, { debugName: "position" }] : []));
203
269
  contentFiled$$ = computed(() => {
204
270
  return this.field$$()
@@ -230,24 +296,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
230
296
  args: [{ selector: 'app-drawer', imports: [AttributesDirective, NgTemplateOutlet, FormsModule, CssPrefixPipe, MergeClassPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class | mergeClass: ('drawer' | cssPrefix) : wrapperClass$()\"\n >\n <input\n [id]=\"name\"\n type=\"checkbox\"\n class=\"{{ 'drawer-toggle' | cssPrefix }}\"\n #toggle\n [ngModel]=\"opened()\"\n (ngModelChange)=\"openChanged($event)\"\n />\n <div [class]=\"contentClass() | mergeClass: ('drawer-content' | cssPrefix)\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: contentFiled$$() }\"\n ></ng-container>\n </div>\n <div [class]=\"sideClass() | mergeClass: ('drawer-side' | cssPrefix)\">\n <label\n [for]=\"name\"\n aria-label=\"close sidebar\"\n [class]=\"overlayClass() | mergeClass: ('drawer-overlay' | cssPrefix)\"\n ></label>\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: sideFiled$$() }\"\n ></ng-container>\n </div>\n </div>\n</ng-template>\n" }]
231
297
  }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], contentClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentClass", required: false }] }], sideClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "sideClass", required: false }] }], overlayClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayClass", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], opened: [{ type: i0.Input, args: [{ isSignal: true, alias: "opened", required: false }] }, { type: i0.Output, args: ["openedChange"] }] } });
232
298
 
299
+ /**
300
+ * 标签页组
301
+ *
302
+ * 用于将表单字段组织成多标签页切换展示,支持多种标签样式和位置布局。
303
+ * 适合字段较多需要分类管理、多配置项分页展示的场景,如系统设置、表单分组等。
304
+ */
233
305
  class TabsFGC extends PiyingViewGroupBase {
234
306
  static __version = 2;
235
307
  static index = 0;
236
308
  templateRef = viewChild.required('templateRef');
237
309
  StrOrTemplateComponent = StrOrTemplateComponent;
310
+ /** 尺寸大小 */
238
311
  size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
239
312
  name = `pc-tabs-${TabsFGC.index++}`;
313
+ /** 当前激活的标签页索引 */
240
314
  activatedIndex = input(0, ...(ngDevMode ? [{ debugName: "activatedIndex" }] : []));
315
+ /** 标签类型 */
241
316
  type = input(...(ngDevMode ? [undefined, { debugName: "type" }] : []));
317
+ /** 标签页位置 */
242
318
  placement = input(...(ngDevMode ? [undefined, { debugName: "placement" }] : []));
319
+ /** 标签页内容区域 CSS 类名 */
243
320
  tabContentClass = input(useTwClass('bg-base-100 border-base-300 p-6'), ...(ngDevMode ? [{ debugName: "tabContentClass" }] : []));
244
- isUnion = input(false, ...(ngDevMode ? [{ debugName: "isUnion" }] : []));
245
- activatedIndex$ = linkedSignal(this.activatedIndex, ...(ngDevMode ? [{ debugName: "activatedIndex$" }] : []));
321
+ activatedIndex$ = linkedSignal(this.activatedIndex, ...(ngDevMode ? [{ debugName: "activatedIndex$", equal: () => false }] : [{ equal: () => false }]));
322
+ /** 切换前的回调函数 */
246
323
  beforeChange = input(...(ngDevMode ? [undefined, { debugName: "beforeChange" }] : []));
247
324
  #theme = inject(ThemeService);
248
325
  wrapperClass$$ = computed(() => {
249
326
  return this.#theme.setClass(this.#theme.setSize('tabs', this.size()), this.type() ? this.#theme.addPrefix(`tabs-${this.type()}`) : undefined, this.placement() ? this.#theme.addPrefix(`tabs-${this.placement()}`) : undefined);
250
327
  }, ...(ngDevMode ? [{ debugName: "wrapperClass$$" }] : []));
328
+ isUnion$$ = computed(() => {
329
+ return (this.field$$().form.control instanceof FieldLogicGroup &&
330
+ this.field$$().form.control.type() === 'or');
331
+ }, ...(ngDevMode ? [{ debugName: "isUnion$$" }] : []));
251
332
  labelInputs = (input) => {
252
333
  return {
253
334
  content: input,
@@ -256,8 +337,7 @@ class TabsFGC extends PiyingViewGroupBase {
256
337
  constructor() {
257
338
  super();
258
339
  effect(() => {
259
- const isUnion = this.isUnion();
260
- if (isUnion) {
340
+ if (this.isUnion$$()) {
261
341
  const index = this.activatedIndex$();
262
342
  const control = this.field$$().form.control;
263
343
  control.activateIndex$.set(index);
@@ -271,7 +351,7 @@ class TabsFGC extends PiyingViewGroupBase {
271
351
  this.activatedIndex$.set(index);
272
352
  }
273
353
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TabsFGC, deps: [], target: i0.ɵɵFactoryTarget.Component });
274
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: TabsFGC, isStandalone: true, selector: "app-tabs", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, activatedIndex: { classPropertyName: "activatedIndex", publicName: "activatedIndex", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, tabContentClass: { classPropertyName: "tabContentClass", publicName: "tabContentClass", isSignal: true, isRequired: false, transformFunction: null }, isUnion: { classPropertyName: "isUnion", publicName: "isUnion", isSignal: true, isRequired: false, transformFunction: null }, beforeChange: { classPropertyName: "beforeChange", publicName: "beforeChange", 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\">\n <div\n role=\"tablist\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class | mergeClass: ('tabs' | cssPrefix) : wrapperClass$$()\"\n >\n @for (field of children$$(); track $index) {\n @let item = field.props();\n <label\n role=\"tab\"\n [class]=\"\n 'tab'\n | cssPrefix\n | mergeClass: ($index === activatedIndex$() ? ('tab-active' | cssPrefix) : undefined)\n \"\n (click)=\"changeIndex($index)\"\n >\n <!-- <input type=\"radio\" [name]=\"name\" /> -->\n\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"labelInputs | pure: item['title']\"\n ></ng-template>\n </label>\n <div [class]=\"'tab-content' | cssPrefix | mergeClass: tabContentClass()\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: field }\"\n ></ng-container>\n </div>\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: AttributesDirective, selector: "[attributes]", inputs: ["attributes", "excludes"] }, { kind: "directive", type: SelectorlessOutlet, selector: "[selectlessOutlet]", inputs: ["selectlessOutlet", "selectlessOutletInputs", "selectlessOutletOutputs", "selectlessOutletDirectives", "selectlessOutletInjector", "selectlessOutletEnvironmentInjector"], exportAs: ["selectlessOutlet"] }, { kind: "pipe", type: CssPrefixPipe, name: "cssPrefix" }, { kind: "pipe", type: MergeClassPipe, name: "mergeClass" }, { kind: "pipe", type: PurePipe, name: "pure" }] });
354
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: TabsFGC, isStandalone: true, selector: "app-tabs", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, activatedIndex: { classPropertyName: "activatedIndex", publicName: "activatedIndex", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, tabContentClass: { classPropertyName: "tabContentClass", publicName: "tabContentClass", isSignal: true, isRequired: false, transformFunction: null }, beforeChange: { classPropertyName: "beforeChange", publicName: "beforeChange", 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\">\n <div\n role=\"tablist\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class | mergeClass: ('tabs' | cssPrefix) : wrapperClass$$()\"\n >\n @for (field of children$$(); track $index) {\n @let item = field.props();\n <label\n role=\"tab\"\n [class]=\"\n 'tab'\n | cssPrefix\n | mergeClass: ($index === activatedIndex$() ? ('tab-active' | cssPrefix) : undefined)\n \"\n (click)=\"changeIndex($index)\"\n >\n <!-- <input type=\"radio\" [name]=\"name\" /> -->\n\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"labelInputs | pure: item['title']\"\n ></ng-template>\n </label>\n <div [class]=\"'tab-content' | cssPrefix | mergeClass: tabContentClass()\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: field }\"\n ></ng-container>\n </div>\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: AttributesDirective, selector: "[attributes]", inputs: ["attributes", "excludes"] }, { kind: "directive", type: SelectorlessOutlet, selector: "[selectlessOutlet]", inputs: ["selectlessOutlet", "selectlessOutletInputs", "selectlessOutletOutputs", "selectlessOutletDirectives", "selectlessOutletInjector", "selectlessOutletEnvironmentInjector"], exportAs: ["selectlessOutlet"] }, { kind: "pipe", type: CssPrefixPipe, name: "cssPrefix" }, { kind: "pipe", type: MergeClassPipe, name: "mergeClass" }, { kind: "pipe", type: PurePipe, name: "pure" }] });
275
355
  }
276
356
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TabsFGC, decorators: [{
277
357
  type: Component,
@@ -283,27 +363,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
283
363
  PurePipe,
284
364
  SelectorlessOutlet,
285
365
  ], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div\n role=\"tablist\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class | mergeClass: ('tabs' | cssPrefix) : wrapperClass$$()\"\n >\n @for (field of children$$(); track $index) {\n @let item = field.props();\n <label\n role=\"tab\"\n [class]=\"\n 'tab'\n | cssPrefix\n | mergeClass: ($index === activatedIndex$() ? ('tab-active' | cssPrefix) : undefined)\n \"\n (click)=\"changeIndex($index)\"\n >\n <!-- <input type=\"radio\" [name]=\"name\" /> -->\n\n <ng-template\n [selectlessOutlet]=\"StrOrTemplateComponent\"\n [selectlessOutletInputs]=\"labelInputs | pure: item['title']\"\n ></ng-template>\n </label>\n <div [class]=\"'tab-content' | cssPrefix | mergeClass: tabContentClass()\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: field }\"\n ></ng-container>\n </div>\n }\n </div>\n</ng-template>\n" }]
286
- }], ctorParameters: () => [], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], activatedIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "activatedIndex", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], tabContentClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabContentClass", required: false }] }], isUnion: [{ type: i0.Input, args: [{ isSignal: true, alias: "isUnion", required: false }] }], beforeChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "beforeChange", required: false }] }] } });
366
+ }], ctorParameters: () => [], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], activatedIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "activatedIndex", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], tabContentClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabContentClass", required: false }] }], beforeChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "beforeChange", required: false }] }] } });
287
367
 
368
+ /**
369
+ * 步骤组
370
+ *
371
+ * 用于将表单字段组织成多步骤向导流程,支持步骤进度管理和前后切换。
372
+ * 适合复杂表单分步填写的场景,如注册流程、配置向导、订单填写等。
373
+ */
288
374
  class StepsFGC extends PiyingViewGroupBase {
289
375
  static __version = 2;
290
376
  templateRef = viewChild.required('templateRef');
291
377
  StrOrTemplateComponent = StrOrTemplateComponent;
292
- activatedIndex = model(0, ...(ngDevMode ? [{ debugName: "activatedIndex" }] : []));
293
- activatedItem$$ = computed(() => this.field$$().children()[this.activatedIndex()], ...(ngDevMode ? [{ debugName: "activatedItem$$" }] : []));
378
+ // todo model
379
+ /** 当前激活的步骤索引 */
380
+ activatedIndex = input(0, ...(ngDevMode ? [{ debugName: "activatedIndex" }] : []));
381
+ activatedIndex$ = linkedSignal(this.activatedIndex, ...(ngDevMode ? [{ debugName: "activatedIndex$" }] : []));
382
+ activatedIndexChange = output();
383
+ activatedItem$$ = computed(() => this.field$$().children()[this.activatedIndex$()], ...(ngDevMode ? [{ debugName: "activatedItem$$" }] : []));
294
384
  prevItem$$ = computed(() => {
295
- return this.children$$()[this.activatedIndex() - 1];
385
+ return this.children$$()[this.activatedIndex$() - 1];
296
386
  }, ...(ngDevMode ? [{ debugName: "prevItem$$" }] : []));
387
+ /** 自定义操作区域 */
297
388
  customAction = input(...(ngDevMode ? [undefined, { debugName: "customAction" }] : []));
389
+ /** 上一步按钮内容 */
298
390
  prev = input('⬅️', ...(ngDevMode ? [{ debugName: "prev" }] : []));
391
+ /** 下一步按钮内容 */
299
392
  next = input('➡️', ...(ngDevMode ? [{ debugName: "next" }] : []));
393
+ /** 步骤方向 */
300
394
  direction = input(...(ngDevMode ? [undefined, { debugName: "direction" }] : []));
395
+ /** 步骤颜色 */
301
396
  stepColor = input('primary', ...(ngDevMode ? [{ debugName: "stepColor" }] : []));
302
397
  toPrev() {
303
- this.activatedIndex.update((value) => value - 1);
398
+ this.activatedIndex$.update((value) => value - 1);
399
+ this.activatedIndexChange.emit(this.activatedIndex$());
304
400
  }
305
401
  toNext() {
306
- this.activatedIndex.update((value) => value + 1);
402
+ this.activatedIndex$.update((value) => value + 1);
403
+ this.activatedIndexChange.emit(this.activatedIndex$());
307
404
  }
308
405
  isActivated(activatedIndex, currentIndex) {
309
406
  return activatedIndex >= currentIndex;
@@ -313,7 +410,7 @@ class StepsFGC extends PiyingViewGroupBase {
313
410
  return clsx(this.#theme.addPrefix('steps'), this.#theme.addPrefix2('steps', this.direction()));
314
411
  }, ...(ngDevMode ? [{ debugName: "wrapperClass$$" }] : []));
315
412
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: StepsFGC, deps: null, target: i0.ɵɵFactoryTarget.Component });
316
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: StepsFGC, isStandalone: true, selector: "app-steps", inputs: { activatedIndex: { classPropertyName: "activatedIndex", publicName: "activatedIndex", isSignal: true, isRequired: false, transformFunction: null }, customAction: { classPropertyName: "customAction", publicName: "customAction", isSignal: true, isRequired: false, transformFunction: null }, prev: { classPropertyName: "prev", publicName: "prev", isSignal: true, isRequired: false, transformFunction: null }, next: { classPropertyName: "next", publicName: "next", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, stepColor: { classPropertyName: "stepColor", publicName: "stepColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activatedIndex: "activatedIndexChange" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #templateRef let-attr=\"attributes\">\n <ul\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class | mergeClass: wrapperClass$$()\"\n >\n @for (field of children$$(); track field.id || $index) {\n @let label = field.props()['title'] || '\uD83D\uDCC4' + ($index + 1);\n <li\n [class]=\"\n 'step'\n | cssPrefix\n | mergeClass\n : ((isActivated | pure: activatedIndex() : $index)\n ? ('step-' + stepColor() | cssPrefix)\n : undefined)\n \"\n >\n {{ label }}\n </li>\n }\n </ul>\n <div class=\"{{ 'flex flex-col gap-4' | twPrefix }}\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: activatedItem$$() }\"\n ></ng-container>\n @if (customAction()) {\n <ng-container\n *ngComponentOutlet=\"\n StrOrTemplateComponent;\n context: { inputs: { content: customAction(), context: this } }\n \"\n ></ng-container>\n } @else {\n <div [class]=\"'flex gap-2 items-center' | twPrefix\">\n <button\n [class]=\"'btn btn-secondary' | cssPrefix\"\n [disabled]=\"activatedIndex() === 0 || prevItem$$().form.control?.invalid\"\n (click)=\"toPrev()\"\n >\n {{ prev() }}\n </button>\n\n <button\n [class]=\"'btn btn-primary' | cssPrefix\"\n [disabled]=\"\n activatedItem$$().form.control?.invalid || activatedIndex() + 1 !== children$$().length\n \"\n (click)=\"toNext()\"\n >\n {{ next() }}\n </button>\n </div>\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: AttributesDirective, selector: "[attributes]", inputs: ["attributes", "excludes"] }, { kind: "pipe", type: CssPrefixPipe, name: "cssPrefix" }, { kind: "pipe", type: MergeClassPipe, name: "mergeClass" }, { kind: "pipe", type: TwPrefixPipe, name: "twPrefix" }, { kind: "pipe", type: PurePipe, name: "pure" }] });
413
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: StepsFGC, isStandalone: true, selector: "app-steps", inputs: { activatedIndex: { classPropertyName: "activatedIndex", publicName: "activatedIndex", isSignal: true, isRequired: false, transformFunction: null }, customAction: { classPropertyName: "customAction", publicName: "customAction", isSignal: true, isRequired: false, transformFunction: null }, prev: { classPropertyName: "prev", publicName: "prev", isSignal: true, isRequired: false, transformFunction: null }, next: { classPropertyName: "next", publicName: "next", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, stepColor: { classPropertyName: "stepColor", publicName: "stepColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activatedIndexChange: "activatedIndexChange" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #templateRef let-attr=\"attributes\">\n <ul\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class | mergeClass: wrapperClass$$()\"\n >\n @for (field of children$$(); track field.id || $index) {\n @let label = field.props()['title'] || '\uD83D\uDCC4' + ($index + 1);\n <li\n [class]=\"\n 'step'\n | cssPrefix\n | mergeClass\n : ((isActivated | pure: activatedIndex$() : $index)\n ? ('step-' + stepColor() | cssPrefix)\n : undefined)\n \"\n >\n {{ label }}\n </li>\n }\n </ul>\n <div class=\"{{ 'flex flex-col gap-4' | twPrefix }}\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: activatedItem$$() }\"\n ></ng-container>\n @if (customAction()) {\n <ng-container\n *ngComponentOutlet=\"\n StrOrTemplateComponent;\n context: { inputs: { content: customAction(), context: this } }\n \"\n ></ng-container>\n } @else {\n <div [class]=\"'flex gap-2 items-center' | twPrefix\">\n <button\n [class]=\"'btn btn-secondary btn-circle' | cssPrefix\"\n [disabled]=\"activatedIndex$() === 0 || prevItem$$().form.control?.invalid\"\n (click)=\"toPrev()\"\n >\n {{ prev() }}\n </button>\n\n <button\n [class]=\"'btn btn-primary btn-circle' | cssPrefix\"\n [disabled]=\"\n !activatedItem$$().form.control?.valid || activatedIndex$() + 1 === children$$().length\n \"\n (click)=\"toNext()\"\n >\n {{ next() }}\n </button>\n </div>\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: AttributesDirective, selector: "[attributes]", inputs: ["attributes", "excludes"] }, { kind: "pipe", type: CssPrefixPipe, name: "cssPrefix" }, { kind: "pipe", type: MergeClassPipe, name: "mergeClass" }, { kind: "pipe", type: TwPrefixPipe, name: "twPrefix" }, { kind: "pipe", type: PurePipe, name: "pure" }] });
317
414
  }
318
415
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: StepsFGC, decorators: [{
319
416
  type: Component,
@@ -325,23 +422,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
325
422
  PurePipe,
326
423
  NgComponentOutlet,
327
424
  AttributesDirective,
328
- ], template: "<ng-template #templateRef let-attr=\"attributes\">\n <ul\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class | mergeClass: wrapperClass$$()\"\n >\n @for (field of children$$(); track field.id || $index) {\n @let label = field.props()['title'] || '\uD83D\uDCC4' + ($index + 1);\n <li\n [class]=\"\n 'step'\n | cssPrefix\n | mergeClass\n : ((isActivated | pure: activatedIndex() : $index)\n ? ('step-' + stepColor() | cssPrefix)\n : undefined)\n \"\n >\n {{ label }}\n </li>\n }\n </ul>\n <div class=\"{{ 'flex flex-col gap-4' | twPrefix }}\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: activatedItem$$() }\"\n ></ng-container>\n @if (customAction()) {\n <ng-container\n *ngComponentOutlet=\"\n StrOrTemplateComponent;\n context: { inputs: { content: customAction(), context: this } }\n \"\n ></ng-container>\n } @else {\n <div [class]=\"'flex gap-2 items-center' | twPrefix\">\n <button\n [class]=\"'btn btn-secondary' | cssPrefix\"\n [disabled]=\"activatedIndex() === 0 || prevItem$$().form.control?.invalid\"\n (click)=\"toPrev()\"\n >\n {{ prev() }}\n </button>\n\n <button\n [class]=\"'btn btn-primary' | cssPrefix\"\n [disabled]=\"\n activatedItem$$().form.control?.invalid || activatedIndex() + 1 !== children$$().length\n \"\n (click)=\"toNext()\"\n >\n {{ next() }}\n </button>\n </div>\n }\n </div>\n</ng-template>\n" }]
329
- }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], activatedIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "activatedIndex", required: false }] }, { type: i0.Output, args: ["activatedIndexChange"] }], customAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "customAction", required: false }] }], prev: [{ type: i0.Input, args: [{ isSignal: true, alias: "prev", required: false }] }], next: [{ type: i0.Input, args: [{ isSignal: true, alias: "next", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], stepColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepColor", required: false }] }] } });
330
-
331
- class FieldsetFGC extends PiyingViewGroupBase {
332
- static __version = 2;
333
- templateRef = viewChild.required('templateRef');
334
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: FieldsetFGC, deps: null, target: i0.ɵɵFactoryTarget.Component });
335
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: FieldsetFGC, isStandalone: true, selector: "app-fieldset", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #templateRef let-attr=\"attributes\">\n <fieldset\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"'fieldset' | cssPrefix | mergeClass: attr()?.class\"\n >\n <legend [class]=\"'fieldset-legend' | cssPrefix\">{{ props$$()['title'] }}</legend>\n\n @for (field of children$$(); track $index) {\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: field }\"\n ></ng-container>\n }\n </fieldset>\n</ng-template>\n", dependencies: [{ kind: "directive", type: AttributesDirective, selector: "[attributes]", inputs: ["attributes", "excludes"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: CssPrefixPipe, name: "cssPrefix" }, { kind: "pipe", type: MergeClassPipe, name: "mergeClass" }] });
336
- }
337
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: FieldsetFGC, decorators: [{
338
- type: Component,
339
- args: [{ selector: 'app-fieldset', imports: [AttributesDirective, NgTemplateOutlet, CssPrefixPipe, MergeClassPipe], template: "<ng-template #templateRef let-attr=\"attributes\">\n <fieldset\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"'fieldset' | cssPrefix | mergeClass: attr()?.class\"\n >\n <legend [class]=\"'fieldset-legend' | cssPrefix\">{{ props$$()['title'] }}</legend>\n\n @for (field of children$$(); track $index) {\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: field }\"\n ></ng-container>\n }\n </fieldset>\n</ng-template>\n" }]
340
- }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }] } });
425
+ ], template: "<ng-template #templateRef let-attr=\"attributes\">\n <ul\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n [class]=\"attr()?.class | mergeClass: wrapperClass$$()\"\n >\n @for (field of children$$(); track field.id || $index) {\n @let label = field.props()['title'] || '\uD83D\uDCC4' + ($index + 1);\n <li\n [class]=\"\n 'step'\n | cssPrefix\n | mergeClass\n : ((isActivated | pure: activatedIndex$() : $index)\n ? ('step-' + stepColor() | cssPrefix)\n : undefined)\n \"\n >\n {{ label }}\n </li>\n }\n </ul>\n <div class=\"{{ 'flex flex-col gap-4' | twPrefix }}\">\n <ng-container\n *ngTemplateOutlet=\"fieldTemplateRef(); context: { $implicit: activatedItem$$() }\"\n ></ng-container>\n @if (customAction()) {\n <ng-container\n *ngComponentOutlet=\"\n StrOrTemplateComponent;\n context: { inputs: { content: customAction(), context: this } }\n \"\n ></ng-container>\n } @else {\n <div [class]=\"'flex gap-2 items-center' | twPrefix\">\n <button\n [class]=\"'btn btn-secondary btn-circle' | cssPrefix\"\n [disabled]=\"activatedIndex$() === 0 || prevItem$$().form.control?.invalid\"\n (click)=\"toPrev()\"\n >\n {{ prev() }}\n </button>\n\n <button\n [class]=\"'btn btn-primary btn-circle' | cssPrefix\"\n [disabled]=\"\n !activatedItem$$().form.control?.valid || activatedIndex$() + 1 === children$$().length\n \"\n (click)=\"toNext()\"\n >\n {{ next() }}\n </button>\n </div>\n }\n </div>\n</ng-template>\n" }]
426
+ }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], activatedIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "activatedIndex", required: false }] }], activatedIndexChange: [{ type: i0.Output, args: ["activatedIndexChange"] }], customAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "customAction", required: false }] }], prev: [{ type: i0.Input, args: [{ isSignal: true, alias: "prev", required: false }] }], next: [{ type: i0.Input, args: [{ isSignal: true, alias: "next", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], stepColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepColor", required: false }] }] } });
341
427
 
342
428
  /**
343
429
  * Generated bundle index. Do not edit.
344
430
  */
345
431
 
346
- export { AccordionFGC, CardFGC, CarouselFGC, DockFGC, DrawerFGC, FieldsetFGC, ListFGC, NavbarFGC, StepsFGC, TabsFGC };
432
+ export { AccordionFGC, CardFGC, CarouselFGC, DockFGC, DrawerFGC, ListFGC, NavbarFGC, StepsFGC, TabsFGC };
347
433
  //# sourceMappingURL=piying-lib-angular-daisyui-field-group.mjs.map