@ng-forge/dynamic-forms-bootstrap 1.3.0-next.2 → 1.3.0-next.3

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 (47) hide show
  1. package/fesm2022/ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-42hynKVO.mjs +56 -0
  2. package/fesm2022/ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-42hynKVO.mjs.map +1 -0
  3. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-button.mjs +64 -37
  4. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-button.mjs.map +1 -1
  5. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-icon.mjs +92 -34
  6. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-addon-icon.mjs.map +1 -1
  7. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-button.mjs +94 -49
  8. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-button.mjs.map +1 -1
  9. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-checkbox.mjs +97 -23
  10. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-checkbox.mjs.map +1 -1
  11. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-datepicker.mjs +169 -40
  12. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-datepicker.mjs.map +1 -1
  13. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-input.mjs +180 -88
  14. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-input.mjs.map +1 -1
  15. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-multi-checkbox.mjs +143 -66
  16. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-multi-checkbox.mjs.map +1 -1
  17. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-radio.mjs +326 -61
  18. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-radio.mjs.map +1 -1
  19. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-select.mjs +123 -33
  20. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-select.mjs.map +1 -1
  21. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-slider.mjs +161 -30
  22. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-slider.mjs.map +1 -1
  23. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-textarea.mjs +97 -23
  24. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-textarea.mjs.map +1 -1
  25. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-toggle.mjs +97 -23
  26. package/fesm2022/ng-forge-dynamic-forms-bootstrap-lazy-toggle.mjs.map +1 -1
  27. package/fesm2022/ng-forge-dynamic-forms-bootstrap-shared.mjs +100 -41
  28. package/fesm2022/ng-forge-dynamic-forms-bootstrap-shared.mjs.map +1 -1
  29. package/fesm2022/ng-forge-dynamic-forms-bootstrap.mjs +238 -251
  30. package/fesm2022/ng-forge-dynamic-forms-bootstrap.mjs.map +1 -1
  31. package/package.json +2 -2
  32. package/types/ng-forge-dynamic-forms-bootstrap-lazy-addon-button.d.ts +18 -18
  33. package/types/ng-forge-dynamic-forms-bootstrap-lazy-addon-icon.d.ts +24 -17
  34. package/types/ng-forge-dynamic-forms-bootstrap-lazy-button.d.ts +94 -88
  35. package/types/ng-forge-dynamic-forms-bootstrap-lazy-checkbox.d.ts +24 -18
  36. package/types/ng-forge-dynamic-forms-bootstrap-lazy-datepicker.d.ts +49 -28
  37. package/types/ng-forge-dynamic-forms-bootstrap-lazy-input.d.ts +51 -37
  38. package/types/ng-forge-dynamic-forms-bootstrap-lazy-multi-checkbox.d.ts +34 -23
  39. package/types/ng-forge-dynamic-forms-bootstrap-lazy-radio.d.ts +30 -19
  40. package/types/ng-forge-dynamic-forms-bootstrap-lazy-select.d.ts +36 -24
  41. package/types/ng-forge-dynamic-forms-bootstrap-lazy-slider.d.ts +56 -35
  42. package/types/ng-forge-dynamic-forms-bootstrap-lazy-textarea.d.ts +24 -18
  43. package/types/ng-forge-dynamic-forms-bootstrap-lazy-toggle.d.ts +23 -17
  44. package/types/ng-forge-dynamic-forms-bootstrap-shared.d.ts +78 -71
  45. package/types/ng-forge-dynamic-forms-bootstrap.d.ts +225 -250
  46. package/fesm2022/ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-D4qTxFSp.mjs +0 -25
  47. package/fesm2022/ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-D4qTxFSp.mjs.map +0 -1
@@ -0,0 +1,56 @@
1
+ import { FieldErrorsWrapperBase, provideFieldErrorDisplay } from "@ng-forge/dynamic-forms/integration";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component } from "@angular/core";
4
+ var BsFieldErrorsWrapperComponent = class BsFieldErrorsWrapperComponent extends FieldErrorsWrapperBase {
5
+ static ɵfac = i0.ɵɵngDeclareFactory({
6
+ minVersion: "12.0.0",
7
+ version: "22.2.5",
8
+ ngImport: i0,
9
+ type: BsFieldErrorsWrapperComponent,
10
+ deps: null,
11
+ target: i0.ɵɵFactoryTarget.Component
12
+ });
13
+ static ɵcmp = i0.ɵɵngDeclareComponent({
14
+ minVersion: "17.0.0",
15
+ version: "22.2.5",
16
+ type: BsFieldErrorsWrapperComponent,
17
+ isStandalone: true,
18
+ selector: "df-bs-field-errors",
19
+ providers: [provideFieldErrorDisplay(() => BsFieldErrorsWrapperComponent)],
20
+ usesInheritance: true,
21
+ ngImport: i0,
22
+ template: `
23
+ <ng-container #fieldComponent></ng-container>
24
+ @if (ngf.errorsToDisplay()[0]; as error) {
25
+ <div class="invalid-feedback d-block" role="alert" [id]="ngf.errorId()">{{ error.message }}</div>
26
+ }
27
+ `,
28
+ isInline: true,
29
+ styles: [".invalid-feedback{color:var(--df-error-color, var(--bs-form-invalid-color, var(--bs-danger, #dc3545)));font-size:var(--df-error-font-size, .875em)}\n"],
30
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
31
+ });
32
+ };
33
+ i0.ɵɵngDeclareClassMetadata({
34
+ minVersion: "12.0.0",
35
+ version: "22.2.5",
36
+ ngImport: i0,
37
+ type: BsFieldErrorsWrapperComponent,
38
+ decorators: [{
39
+ type: Component,
40
+ args: [{
41
+ selector: "df-bs-field-errors",
42
+ template: `
43
+ <ng-container #fieldComponent></ng-container>
44
+ @if (ngf.errorsToDisplay()[0]; as error) {
45
+ <div class="invalid-feedback d-block" role="alert" [id]="ngf.errorId()">{{ error.message }}</div>
46
+ }
47
+ `,
48
+ changeDetection: ChangeDetectionStrategy.OnPush,
49
+ providers: [provideFieldErrorDisplay(() => BsFieldErrorsWrapperComponent)],
50
+ styles: [".invalid-feedback{color:var(--df-error-color, var(--bs-form-invalid-color, var(--bs-danger, #dc3545)));font-size:var(--df-error-font-size, .875em)}\n"]
51
+ }]
52
+ }]
53
+ });
54
+ export { BsFieldErrorsWrapperComponent, BsFieldErrorsWrapperComponent as default };
55
+
56
+ //# sourceMappingURL=ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-42hynKVO.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-forge-dynamic-forms-bootstrap-bs-field-errors-wrapper.component-42hynKVO.mjs","names":[],"sources":["../../../../packages/dynamic-forms-bootstrap/src/lib/wrappers/field-errors/bs-field-errors-wrapper.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { FieldErrorsWrapperBase, provideFieldErrorDisplay } from '@ng-forge/dynamic-forms/integration';\n\n/**\n * Bootstrap rendering of a validation message for the wrapped field.\n * `d-block` is required — Bootstrap only reveals `.invalid-feedback` next to a\n * sibling `.is-invalid` control, which a container has none of.\n */\n@Component({\n selector: 'df-bs-field-errors',\n template: `\n <ng-container #fieldComponent></ng-container>\n @if (ngf.errorsToDisplay()[0]; as error) {\n <div class=\"invalid-feedback d-block\" role=\"alert\" [id]=\"ngf.errorId()\">{{ error.message }}</div>\n }\n `,\n styleUrl: './bs-field-errors-wrapper.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [provideFieldErrorDisplay(() => BsFieldErrorsWrapperComponent)],\n})\nexport default class BsFieldErrorsWrapperComponent extends FieldErrorsWrapperBase {}\n\nexport { BsFieldErrorsWrapperComponent };\n"],"mappings":";;;AAoBA,IAAqB,gCAArB,MAAqB,sCAAsC,uBAAsB;CAA5D,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAA6B,MAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAA7B,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAA6B,cAAA;EAAA,UAAA;EAAA,WAFrC,CAAC,+BAA+B,6BAA6B,CAAC;EAAC,iBAAA;EAAA,UAAA;EAAA,UARhE;;;;;;EAKT,UAAA;EAAA,QAAA,CAAA,uJAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAKkB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA6B,YAAA,CAAA;EAZjD,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAoB,UACpB;;;;;;GAKT,iBAEgB,wBAAwB;GAAM,WACpC,CAAC,+BAA8B,6BAA8B,CAAC;GAAC,QAAA,CAAA,uJAAA;EAAA,CAAA"}
@@ -1,25 +1,35 @@
1
- import { AsyncPipe } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { computed, ChangeDetectionStrategy, Component } from '@angular/core';
4
- import * as i1 from '@ng-forge/dynamic-forms/integration';
5
- import { injectNgForgeAddonAction, DynamicTextPipe, NgForgeAddonAction } from '@ng-forge/dynamic-forms/integration';
6
-
7
- class BsButtonAddonComponent {
8
- action = injectNgForgeAddonAction();
9
- addon = this.action.addon;
10
- label = computed(() => this.addon().label, /* @ts-ignore */
11
- ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
12
- ariaLabel = computed(() => this.addon().ariaLabel, /* @ts-ignore */
13
- ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
14
- iconClass = computed(() => {
15
- const icon = this.addon().icon;
16
- return icon ? `bi bi-${icon}` : '';
17
- }, /* @ts-ignore */
18
- ...(ngDevMode ? [{ debugName: "iconClass" }] : /* istanbul ignore next */ []));
19
- buttonClass = computed(() => `btn btn-outline-${this.addon().severity ?? 'secondary'}`, /* @ts-ignore */
20
- ...(ngDevMode ? [{ debugName: "buttonClass" }] : /* istanbul ignore next */ []));
21
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: BsButtonAddonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
22
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: BsButtonAddonComponent, isStandalone: true, selector: "df-bs-button-addon", hostDirectives: [{ directive: i1.NgForgeAddonAction }], ngImport: i0, template: `
1
+ import { AsyncPipe } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, computed } from "@angular/core";
4
+ import * as i1 from "@ng-forge/dynamic-forms/integration";
5
+ import { DynamicTextPipe, NgForgeAddonAction, injectNgForgeAddonAction } from "@ng-forge/dynamic-forms/integration";
6
+ var BsButtonAddonComponent = class BsButtonAddonComponent {
7
+ action = injectNgForgeAddonAction();
8
+ addon = this.action.addon;
9
+ label = computed(() => this.addon().label, ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
10
+ ariaLabel = computed(() => this.addon().ariaLabel, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
11
+ iconClass = computed(() => {
12
+ const icon = this.addon().icon;
13
+ return icon ? `bi bi-${icon}` : "";
14
+ }, ...ngDevMode ? [{ debugName: "iconClass" }] : /* istanbul ignore next */ []);
15
+ buttonClass = computed(() => `btn btn-outline-${this.addon().severity ?? "secondary"}`, ...ngDevMode ? [{ debugName: "buttonClass" }] : /* istanbul ignore next */ []);
16
+ static ɵfac = i0.ɵɵngDeclareFactory({
17
+ minVersion: "12.0.0",
18
+ version: "22.2.5",
19
+ ngImport: i0,
20
+ type: BsButtonAddonComponent,
21
+ deps: [],
22
+ target: i0.ɵɵFactoryTarget.Component
23
+ });
24
+ static ɵcmp = i0.ɵɵngDeclareComponent({
25
+ minVersion: "17.0.0",
26
+ version: "22.2.5",
27
+ type: BsButtonAddonComponent,
28
+ isStandalone: true,
29
+ selector: "df-bs-button-addon",
30
+ hostDirectives: [{ directive: i1.NgForgeAddonAction }],
31
+ ngImport: i0,
32
+ template: `
23
33
  <button
24
34
  type="button"
25
35
  [class]="buttonClass()"
@@ -39,15 +49,32 @@ class BsButtonAddonComponent {
39
49
  <span>{{ l | dynamicText | async }}</span>
40
50
  }
41
51
  </button>
42
- `, isInline: true, dependencies: [{ kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
43
- }
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: BsButtonAddonComponent, decorators: [{
45
- type: Component,
46
- args: [{
47
- selector: 'df-bs-button-addon',
48
- imports: [DynamicTextPipe, AsyncPipe],
49
- hostDirectives: [NgForgeAddonAction],
50
- template: `
52
+ `,
53
+ isInline: true,
54
+ dependencies: [{
55
+ kind: "pipe",
56
+ type: DynamicTextPipe,
57
+ name: "dynamicText"
58
+ }, {
59
+ kind: "pipe",
60
+ type: AsyncPipe,
61
+ name: "async"
62
+ }],
63
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
64
+ });
65
+ };
66
+ i0.ɵɵngDeclareClassMetadata({
67
+ minVersion: "12.0.0",
68
+ version: "22.2.5",
69
+ ngImport: i0,
70
+ type: BsButtonAddonComponent,
71
+ decorators: [{
72
+ type: Component,
73
+ args: [{
74
+ selector: "df-bs-button-addon",
75
+ imports: [DynamicTextPipe, AsyncPipe],
76
+ hostDirectives: [NgForgeAddonAction],
77
+ template: `
51
78
  <button
52
79
  type="button"
53
80
  [class]="buttonClass()"
@@ -68,10 +95,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
68
95
  }
69
96
  </button>
70
97
  `,
71
- changeDetection: ChangeDetectionStrategy.OnPush,
72
- }]
73
- }] });
74
-
75
-
98
+ changeDetection: ChangeDetectionStrategy.OnPush
99
+ }]
100
+ }]
101
+ });
76
102
  export { BsButtonAddonComponent };
77
- //# sourceMappingURL=ng-forge-dynamic-forms-bootstrap-lazy-addon-button.mjs.map
103
+
104
+ //# sourceMappingURL=ng-forge-dynamic-forms-bootstrap-lazy-addon-button.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ng-forge-dynamic-forms-bootstrap-lazy-addon-button.mjs","mappings":";;;;;;;;IAsCqB;;;;;AAIA;;;;;AAIA;;;AAZR;;;;;;;;;;;;;;;;;;;;;;;;AA3BF;AACT;AACA;;AAEA;;;;;;;;;;;;;;;;;;;;AAoBC;;AAEF","names":[],"ignoreList":[],"sources":["../../../../packages/dynamic-forms-bootstrap/src/lib/addons/bs-button-addon.component.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core';\nimport { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';\nimport { injectNgForgeAddonAction, NgForgeAddonAction } from '@ng-forge/dynamic-forms/integration';\nimport type { BsButtonAddon } from '@ng-forge/dynamic-forms-bootstrap/shared';\n\n/** Renderer for the `bs-button` addon type. */\n@Component({\n selector: 'df-bs-button-addon',\n imports: [DynamicTextPipe, AsyncPipe],\n hostDirectives: [NgForgeAddonAction],\n template: `\n <button\n type=\"button\"\n [class]=\"buttonClass()\"\n [disabled]=\"action.disabled() || action.loading()\"\n [attr.aria-label]=\"(ariaLabel() | dynamicText | async) ?? null\"\n [attr.aria-busy]=\"action.loading() || null\"\n (click)=\"action.dispatch()\"\n >\n @if (action.loading()) {\n <!-- Visually-hidden role=status text gives a reliable AT announcement (VO/JAWS/NVDA). -->\n <span class=\"spinner-border spinner-border-sm\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\" role=\"status\">Loading…</span>\n } @else if (iconClass(); as ic) {\n <i [class]=\"ic\" aria-hidden=\"true\"></i>\n }\n @if (label(); as l) {\n <span>{{ l | dynamicText | async }}</span>\n }\n </button>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsButtonAddonComponent {\n protected readonly action = injectNgForgeAddonAction<BsButtonAddon>();\n\n /** Re-exposed for template binding — same signal stored on the directive. */\n protected readonly addon = this.action.addon;\n\n protected readonly label = computed(() => this.addon().label);\n protected readonly ariaLabel = computed(() => this.addon().ariaLabel);\n protected readonly iconClass = computed(() => {\n const icon = this.addon().icon;\n return icon ? `bi bi-${icon}` : '';\n });\n protected readonly buttonClass = computed(() => `btn btn-outline-${this.addon().severity ?? 'secondary'}`);\n}\n"]}
1
+ {"version":3,"file":"ng-forge-dynamic-forms-bootstrap-lazy-addon-button.mjs","names":[],"sources":["../../../../packages/dynamic-forms-bootstrap/src/lib/addons/bs-button-addon.component.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core';\nimport { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';\nimport { injectNgForgeAddonAction, NgForgeAddonAction } from '@ng-forge/dynamic-forms/integration';\nimport type { BsButtonAddon } from '@ng-forge/dynamic-forms-bootstrap/shared';\n\n/** Renderer for the `bs-button` addon type. */\n@Component({\n selector: 'df-bs-button-addon',\n imports: [DynamicTextPipe, AsyncPipe],\n hostDirectives: [NgForgeAddonAction],\n template: `\n <button\n type=\"button\"\n [class]=\"buttonClass()\"\n [disabled]=\"action.disabled() || action.loading()\"\n [attr.aria-label]=\"(ariaLabel() | dynamicText | async) ?? null\"\n [attr.aria-busy]=\"action.loading() || null\"\n (click)=\"action.dispatch()\"\n >\n @if (action.loading()) {\n <!-- Visually-hidden role=status text gives a reliable AT announcement (VO/JAWS/NVDA). -->\n <span class=\"spinner-border spinner-border-sm\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\" role=\"status\">Loading…</span>\n } @else if (iconClass(); as ic) {\n <i [class]=\"ic\" aria-hidden=\"true\"></i>\n }\n @if (label(); as l) {\n <span>{{ l | dynamicText | async }}</span>\n }\n </button>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsButtonAddonComponent {\n protected readonly action = injectNgForgeAddonAction<BsButtonAddon>();\n\n /** Re-exposed for template binding — same signal stored on the directive. */\n protected readonly addon = this.action.addon;\n\n protected readonly label = computed(() => this.addon().label);\n protected readonly ariaLabel = computed(() => this.addon().ariaLabel);\n protected readonly iconClass = computed(() => {\n const icon = this.addon().icon;\n return icon ? `bi bi-${icon}` : '';\n });\n protected readonly buttonClass = computed(() => `btn btn-outline-${this.addon().severity ?? 'secondary'}`);\n}\n"],"mappings":";;;;;AAkCA,IAAa,yBAAb,MAAa,uBAAsB;CACd,SAAS,yBAAwB;CAGjC,QAAQ,KAAK,OAAO;CAEpB,QAAQ,eAAe,KAAK,MAAK,CAAE,CAAC,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC1C,YAAY,eAAe,KAAK,MAAK,CAAE,CAAC,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAClD,YAAY,eAAc;EAC3C,MAAM,OAAO,KAAK,MAAK,CAAE,CAAC;EAC1B,OAAO,OAAO,SAAS,SAAS;CAClC,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CACiB,cAAc,eAAe,mBAAmB,KAAK,MAAK,CAAE,CAAC,YAAY,eAAc,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAZ/F,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAsB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAtB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAsB,cAAA;EAAA,UAAA;EAAA,gBAAA,CAAA,EAAA,WAAA,GAAA,mBAAA,CAAA;EAAA,UAAA;EAAA,UAvBvB;;;;;;;;;;;;;;;;;;;;;EAoBT,UAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MAtBS;GAAe,MAAA;EAAA,GAAA;GAAA,MAAA;GAAA,MAAE;GAAS,MAAA;EAAA,CAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAyBzB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EA3BlC,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,SAAS,CAAC,iBAAiB,SAAS;GACpC,gBAAgB,CAAC,kBAAkB;GACnC,UAAU;;;;;;;;;;;;;;;;;;;;;GAqBV,iBAAiB,wBAAwB;EAC1C,CAAA"}
@@ -1,35 +1,93 @@
1
- import { AsyncPipe } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
4
- import { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';
5
-
6
- class BsIconAddonComponent {
7
- addon = input.required(/* @ts-ignore */
8
- ...(ngDevMode ? [{ debugName: "addon" }] : /* istanbul ignore next */ []));
9
- fieldInputs = input(/* @ts-ignore */
10
- ...(ngDevMode ? [undefined, { debugName: "fieldInputs" }] : /* istanbul ignore next */ []));
11
- iconClass = computed(() => `bi bi-${this.addon().icon}`, /* @ts-ignore */
12
- ...(ngDevMode ? [{ debugName: "iconClass" }] : /* istanbul ignore next */ []));
13
- ariaLabel = computed(() => this.addon().ariaLabel, /* @ts-ignore */
14
- ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
15
- hasAriaLabel = computed(() => this.addon().ariaLabel !== undefined, /* @ts-ignore */
16
- ...(ngDevMode ? [{ debugName: "hasAriaLabel" }] : /* istanbul ignore next */ []));
17
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: BsIconAddonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
18
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: BsIconAddonComponent, isStandalone: true, selector: "df-bs-icon-addon", inputs: { addon: { classPropertyName: "addon", publicName: "addon", isSignal: true, isRequired: true, transformFunction: null }, fieldInputs: { classPropertyName: "fieldInputs", publicName: "fieldInputs", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-hidden": "hasAriaLabel() ? null : \"true\"" } }, ngImport: i0, template: `<i [class]="iconClass()" [attr.aria-label]="(ariaLabel() | dynamicText | async) ?? null"></i>`, isInline: true, dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
19
- }
20
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: BsIconAddonComponent, decorators: [{
21
- type: Component,
22
- args: [{
23
- selector: 'df-bs-icon-addon',
24
- imports: [AsyncPipe, DynamicTextPipe],
25
- template: `<i [class]="iconClass()" [attr.aria-label]="(ariaLabel() | dynamicText | async) ?? null"></i>`,
26
- host: {
27
- '[attr.aria-hidden]': 'hasAriaLabel() ? null : "true"',
28
- },
29
- changeDetection: ChangeDetectionStrategy.OnPush,
30
- }]
31
- }], propDecorators: { addon: [{ type: i0.Input, args: [{ isSignal: true, alias: "addon", required: true }] }], fieldInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldInputs", required: false }] }] } });
32
-
33
-
1
+ import { AsyncPipe } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, computed, input } from "@angular/core";
4
+ import { DynamicTextPipe } from "@ng-forge/dynamic-forms/integration";
5
+ var BsIconAddonComponent = class BsIconAddonComponent {
6
+ addon = input.required(...ngDevMode ? [{ debugName: "addon" }] : /* istanbul ignore next */ []);
7
+ fieldInputs = input(...ngDevMode ? [void 0, { debugName: "fieldInputs" }] : /* istanbul ignore next */ []);
8
+ iconClass = computed(() => `bi bi-${this.addon().icon}`, ...ngDevMode ? [{ debugName: "iconClass" }] : /* istanbul ignore next */ []);
9
+ ariaLabel = computed(() => this.addon().ariaLabel, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
10
+ hasAriaLabel = computed(() => this.addon().ariaLabel !== void 0, ...ngDevMode ? [{ debugName: "hasAriaLabel" }] : /* istanbul ignore next */ []);
11
+ static ɵfac = i0.ɵɵngDeclareFactory({
12
+ minVersion: "12.0.0",
13
+ version: "22.2.5",
14
+ ngImport: i0,
15
+ type: BsIconAddonComponent,
16
+ deps: [],
17
+ target: i0.ɵɵFactoryTarget.Component
18
+ });
19
+ static ɵcmp = i0.ɵɵngDeclareComponent({
20
+ minVersion: "17.1.0",
21
+ version: "22.2.5",
22
+ type: BsIconAddonComponent,
23
+ isStandalone: true,
24
+ selector: "df-bs-icon-addon",
25
+ inputs: {
26
+ addon: {
27
+ classPropertyName: "addon",
28
+ publicName: "addon",
29
+ isSignal: true,
30
+ isRequired: true,
31
+ transformFunction: null
32
+ },
33
+ fieldInputs: {
34
+ classPropertyName: "fieldInputs",
35
+ publicName: "fieldInputs",
36
+ isSignal: true,
37
+ isRequired: false,
38
+ transformFunction: null
39
+ }
40
+ },
41
+ host: { properties: { "attr.aria-hidden": "hasAriaLabel() ? null : \"true\"" } },
42
+ ngImport: i0,
43
+ template: `<i [class]="iconClass()" [attr.aria-label]="(ariaLabel() | dynamicText | async) ?? null"></i>`,
44
+ isInline: true,
45
+ dependencies: [{
46
+ kind: "pipe",
47
+ type: AsyncPipe,
48
+ name: "async"
49
+ }, {
50
+ kind: "pipe",
51
+ type: DynamicTextPipe,
52
+ name: "dynamicText"
53
+ }],
54
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
55
+ });
56
+ };
57
+ i0.ɵɵngDeclareClassMetadata({
58
+ minVersion: "12.0.0",
59
+ version: "22.2.5",
60
+ ngImport: i0,
61
+ type: BsIconAddonComponent,
62
+ decorators: [{
63
+ type: Component,
64
+ args: [{
65
+ selector: "df-bs-icon-addon",
66
+ imports: [AsyncPipe, DynamicTextPipe],
67
+ template: `<i [class]="iconClass()" [attr.aria-label]="(ariaLabel() | dynamicText | async) ?? null"></i>`,
68
+ host: { "[attr.aria-hidden]": "hasAriaLabel() ? null : \"true\"" },
69
+ changeDetection: ChangeDetectionStrategy.OnPush
70
+ }]
71
+ }],
72
+ propDecorators: {
73
+ addon: [{
74
+ type: i0.Input,
75
+ args: [{
76
+ isSignal: true,
77
+ alias: "addon",
78
+ required: true
79
+ }]
80
+ }],
81
+ fieldInputs: [{
82
+ type: i0.Input,
83
+ args: [{
84
+ isSignal: true,
85
+ alias: "fieldInputs",
86
+ required: false
87
+ }]
88
+ }]
89
+ }
90
+ });
34
91
  export { BsIconAddonComponent };
35
- //# sourceMappingURL=ng-forge-dynamic-forms-bootstrap-lazy-addon-icon.mjs.map
92
+
93
+ //# sourceMappingURL=ng-forge-dynamic-forms-bootstrap-lazy-addon-icon.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ng-forge-dynamic-forms-bootstrap-lazy-addon-icon.mjs","mappings":";;;;;;;;IAmBW;;AAEU;;;;AAEA;;;AAPR;;;;AATF;AACT;AACA;AACA;AACA;AACE;AACD;;AAEF","names":[],"ignoreList":[],"sources":["../../../../packages/dynamic-forms-bootstrap/src/lib/addons/bs-icon-addon.component.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { WrapperFieldInputs } from '@ng-forge/dynamic-forms/integration';\nimport { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';\nimport type { BsIconAddon } from '@ng-forge/dynamic-forms-bootstrap/shared';\n\n/** Renderer for the `bs-icon` addon type. */\n@Component({\n selector: 'df-bs-icon-addon',\n imports: [AsyncPipe, DynamicTextPipe],\n template: `<i [class]=\"iconClass()\" [attr.aria-label]=\"(ariaLabel() | dynamicText | async) ?? null\"></i>`,\n host: {\n '[attr.aria-hidden]': 'hasAriaLabel() ? null : \"true\"',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsIconAddonComponent {\n readonly addon = input.required<BsIconAddon>();\n /** Accepted for contract uniformity — `NgComponentOutlet` setInput is strict; every type must declare it. */\n readonly fieldInputs = input<WrapperFieldInputs | undefined>();\n\n protected readonly iconClass = computed(() => `bi bi-${this.addon().icon}`);\n protected readonly ariaLabel = computed(() => this.addon().ariaLabel);\n protected readonly hasAriaLabel = computed(() => this.addon().ariaLabel !== undefined);\n}\n"]}
1
+ {"version":3,"file":"ng-forge-dynamic-forms-bootstrap-lazy-addon-icon.mjs","names":[],"sources":["../../../../packages/dynamic-forms-bootstrap/src/lib/addons/bs-icon-addon.component.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { WrapperFieldInputs } from '@ng-forge/dynamic-forms/integration';\nimport { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';\nimport type { BsIconAddon } from '@ng-forge/dynamic-forms-bootstrap/shared';\n\n/** Renderer for the `bs-icon` addon type. */\n@Component({\n selector: 'df-bs-icon-addon',\n imports: [AsyncPipe, DynamicTextPipe],\n template: `<i [class]=\"iconClass()\" [attr.aria-label]=\"(ariaLabel() | dynamicText | async) ?? null\"></i>`,\n host: {\n '[attr.aria-hidden]': 'hasAriaLabel() ? null : \"true\"',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsIconAddonComponent {\n readonly addon = input.required<BsIconAddon>();\n /** Accepted for contract uniformity — `NgComponentOutlet` setInput is strict; every type must declare it. */\n readonly fieldInputs = input<WrapperFieldInputs | undefined>();\n\n protected readonly iconClass = computed(() => `bi bi-${this.addon().icon}`);\n protected readonly ariaLabel = computed(() => this.addon().ariaLabel);\n protected readonly hasAriaLabel = computed(() => this.addon().ariaLabel !== undefined);\n}\n"],"mappings":";;;;AAgBA,IAAa,uBAAb,MAAa,qBAAoB;CACtB,QAAQ,MAAM,SAAuB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAErC,cAAc,MAAuC,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAE3C,YAAY,eAAe,SAAS,KAAK,MAAK,CAAE,CAAC,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CACxD,YAAY,eAAe,KAAK,MAAK,CAAE,CAAC,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAClD,eAAe,eAAe,KAAK,MAAK,CAAE,CAAC,cAAc,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CAP3E,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAoB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAApB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAoB,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,aAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA,EAAA,YAAA,EAAA,oBAAA,mCAAA,EAAA;EAAA,UAAA;EAAA,UANrB;EAA+F,UAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MAD/F;GAAS,MAAA;EAAA,GAAA;GAAA,MAAA;GAAA,MAAE;GAAe,MAAA;EAAA,CAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAOzB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAoB,YAAA,CAAA;EAThC,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,SAAS,CAAC,WAAW,eAAe;GACpC,UAAU;GACV,MAAM,EACJ,sBAAsB,mCACvB;GACD,iBAAiB,wBAAwB;EAC1C,CAAA"}
@@ -1,41 +1,54 @@
1
- import { AsyncPipe } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
4
- import * as i1 from '@ng-forge/dynamic-forms/integration';
5
- import { injectNgForgeAction, DynamicTextPipe, NgForgeActionHost } from '@ng-forge/dynamic-forms/integration';
6
-
7
- class BsButtonFieldComponent {
8
- action = injectNgForgeAction();
9
- props = input(/* @ts-ignore */
10
- ...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
11
- buttonType = computed(() => this.props()?.type ?? 'button', /* @ts-ignore */
12
- ...(ngDevMode ? [{ debugName: "buttonType" }] : /* istanbul ignore next */ []));
13
- buttonTestId = computed(() => `${this.buttonType()}-${this.action.key()}`, /* @ts-ignore */
14
- ...(ngDevMode ? [{ debugName: "buttonTestId" }] : /* istanbul ignore next */ []));
15
- buttonClasses = computed(() => {
16
- const p = this.props();
17
- const variant = p?.variant || 'primary';
18
- const outline = p?.outline ? 'outline-' : '';
19
- return [
20
- 'btn',
21
- `btn-${outline}${variant}`,
22
- p?.size === 'sm' && 'btn-sm',
23
- p?.size === 'lg' && 'btn-lg',
24
- p?.block && 'w-100',
25
- p?.active && 'active',
26
- this.action.className(),
27
- ]
28
- .filter(Boolean)
29
- .join(' ');
30
- }, /* @ts-ignore */
31
- ...(ngDevMode ? [{ debugName: "buttonClasses" }] : /* istanbul ignore next */ []));
32
- onClick() {
33
- if (this.buttonType() === 'submit')
34
- return;
35
- this.action.dispatch();
36
- }
37
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: BsButtonFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
38
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: BsButtonFieldComponent, isStandalone: true, selector: "df-bs-button", inputs: { props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null } }, hostDirectives: [{ directive: i1.NgForgeActionHost }], ngImport: i0, template: `
1
+ import { AsyncPipe } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, computed, input } from "@angular/core";
4
+ import * as i1 from "@ng-forge/dynamic-forms/integration";
5
+ import { DynamicTextPipe, NgForgeActionHost, injectNgForgeAction } from "@ng-forge/dynamic-forms/integration";
6
+ var BsButtonFieldComponent = class BsButtonFieldComponent {
7
+ action = injectNgForgeAction();
8
+ props = input(...ngDevMode ? [void 0, { debugName: "props" }] : /* istanbul ignore next */ []);
9
+ buttonType = computed(() => this.props()?.type ?? "button", ...ngDevMode ? [{ debugName: "buttonType" }] : /* istanbul ignore next */ []);
10
+ buttonTestId = computed(() => `${this.buttonType()}-${this.action.key()}`, ...ngDevMode ? [{ debugName: "buttonTestId" }] : /* istanbul ignore next */ []);
11
+ buttonClasses = computed(() => {
12
+ const p = this.props();
13
+ const variant = p?.variant || "primary";
14
+ return [
15
+ "btn",
16
+ `btn-${p?.outline ? "outline-" : ""}${variant}`,
17
+ p?.size === "sm" && "btn-sm",
18
+ p?.size === "lg" && "btn-lg",
19
+ p?.block && "w-100",
20
+ p?.active && "active",
21
+ this.action.className()
22
+ ].filter(Boolean).join(" ");
23
+ }, ...ngDevMode ? [{ debugName: "buttonClasses" }] : /* istanbul ignore next */ []);
24
+ onClick() {
25
+ if (this.buttonType() === "submit") return;
26
+ this.action.dispatch();
27
+ }
28
+ static ɵfac = i0.ɵɵngDeclareFactory({
29
+ minVersion: "12.0.0",
30
+ version: "22.2.5",
31
+ ngImport: i0,
32
+ type: BsButtonFieldComponent,
33
+ deps: [],
34
+ target: i0.ɵɵFactoryTarget.Component
35
+ });
36
+ static ɵcmp = i0.ɵɵngDeclareComponent({
37
+ minVersion: "17.1.0",
38
+ version: "22.2.5",
39
+ type: BsButtonFieldComponent,
40
+ isStandalone: true,
41
+ selector: "df-bs-button",
42
+ inputs: { props: {
43
+ classPropertyName: "props",
44
+ publicName: "props",
45
+ isSignal: true,
46
+ isRequired: false,
47
+ transformFunction: null
48
+ } },
49
+ hostDirectives: [{ directive: i1.NgForgeActionHost }],
50
+ ngImport: i0,
51
+ template: `
39
52
  @let buttonId = action.key() + '-button';
40
53
  <button
41
54
  [id]="buttonId"
@@ -48,11 +61,33 @@ class BsButtonFieldComponent {
48
61
  >
49
62
  {{ action.label() | dynamicText | async }}
50
63
  </button>
51
- `, isInline: true, styles: [".df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%;margin-bottom:var(--df-bs-field-margin-bottom, 1rem)}.df-bs-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color, var(--bs-secondary-color, #6c757d));font-size:var(--df-hint-font-size, .875rem);margin-top:var(--df-bs-hint-margin-top, .25rem)}.df-bs-field:has(.df-bs-hint){margin-bottom:var(--df-bs-field-with-hint-margin-bottom, .5rem)}:host([hidden]){display:none!important}\n"], dependencies: [{ kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
52
- }
53
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: BsButtonFieldComponent, decorators: [{
54
- type: Component,
55
- args: [{ selector: 'df-bs-button', imports: [DynamicTextPipe, AsyncPipe], hostDirectives: [NgForgeActionHost], template: `
64
+ `,
65
+ isInline: true,
66
+ styles: [".df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%;margin-bottom:var(--df-bs-field-margin-bottom, 1rem)}.df-bs-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color, var(--bs-secondary-color, #6c757d));font-size:var(--df-hint-font-size, .875rem);margin-top:var(--df-bs-hint-margin-top, .25rem)}.df-bs-field:has(.df-bs-hint){margin-bottom:var(--df-bs-field-with-hint-margin-bottom, .5rem)}:host([hidden]){display:none!important}\n"],
67
+ dependencies: [{
68
+ kind: "pipe",
69
+ type: DynamicTextPipe,
70
+ name: "dynamicText"
71
+ }, {
72
+ kind: "pipe",
73
+ type: AsyncPipe,
74
+ name: "async"
75
+ }],
76
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
77
+ });
78
+ };
79
+ i0.ɵɵngDeclareClassMetadata({
80
+ minVersion: "12.0.0",
81
+ version: "22.2.5",
82
+ ngImport: i0,
83
+ type: BsButtonFieldComponent,
84
+ decorators: [{
85
+ type: Component,
86
+ args: [{
87
+ selector: "df-bs-button",
88
+ imports: [DynamicTextPipe, AsyncPipe],
89
+ hostDirectives: [NgForgeActionHost],
90
+ template: `
56
91
  @let buttonId = action.key() + '-button';
57
92
  <button
58
93
  [id]="buttonId"
@@ -65,10 +100,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
65
100
  >
66
101
  {{ action.label() | dynamicText | async }}
67
102
  </button>
68
- `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%;margin-bottom:var(--df-bs-field-margin-bottom, 1rem)}.df-bs-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color, var(--bs-secondary-color, #6c757d));font-size:var(--df-hint-font-size, .875rem);margin-top:var(--df-bs-hint-margin-top, .25rem)}.df-bs-field:has(.df-bs-hint){margin-bottom:var(--df-bs-field-with-hint-margin-bottom, .5rem)}:host([hidden]){display:none!important}\n"] }]
69
- }], propDecorators: { props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
70
-
71
-
72
-
103
+ `,
104
+ changeDetection: ChangeDetectionStrategy.OnPush,
105
+ styles: [".df-bs-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%;margin-bottom:var(--df-bs-field-margin-bottom, 1rem)}.df-bs-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit);margin-bottom:0}.df-bs-hint{color:var(--df-hint-color, var(--bs-secondary-color, #6c757d));font-size:var(--df-hint-font-size, .875rem);margin-top:var(--df-bs-hint-margin-top, .25rem)}.df-bs-field:has(.df-bs-hint){margin-bottom:var(--df-bs-field-with-hint-margin-bottom, .5rem)}:host([hidden]){display:none!important}\n"]
106
+ }]
107
+ }],
108
+ propDecorators: { props: [{
109
+ type: i0.Input,
110
+ args: [{
111
+ isSignal: true,
112
+ alias: "props",
113
+ required: false
114
+ }]
115
+ }] }
116
+ });
73
117
  export { BsButtonFieldComponent };
74
- //# sourceMappingURL=ng-forge-dynamic-forms-bootstrap-lazy-button.mjs.map
118
+
119
+ //# sourceMappingURL=ng-forge-dynamic-forms-bootstrap-lazy-button.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ng-forge-dynamic-forms-bootstrap-lazy-button.mjs","mappings":";;;;;;AA4Bc;;AAGH;;IAGA;;AAEA;;AAEA;AACP;AACA;AACA;;;;AAKE;AACA;;;AAGA;AACD;;;;;;AAOD;;AACA;;;AA/BiB","names":[],"ignoreList":[],"sources":["../../../../packages/dynamic-forms-bootstrap/src/lib/fields/button/bs-button.component.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { FormEvent } from '@ng-forge/dynamic-forms';\nimport { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';\nimport { injectNgForgeAction, NgForgeActionHost } from '@ng-forge/dynamic-forms/integration';\nimport { BsButtonProps } from './bs-button.type';\n\n@Component({\n selector: 'df-bs-button',\n imports: [DynamicTextPipe, AsyncPipe],\n styleUrl: '../../styles/_form-field.scss',\n hostDirectives: [NgForgeActionHost],\n template: `\n @let buttonId = action.key() + '-button';\n <button\n [id]=\"buttonId\"\n [type]=\"buttonType()\"\n [disabled]=\"action.disabled()\"\n [class]=\"buttonClasses()\"\n [attr.tabindex]=\"action.tabIndex()\"\n [attr.data-testid]=\"buttonTestId()\"\n (click)=\"onClick()\"\n >\n {{ action.label() | dynamicText | async }}\n </button>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport default class BsButtonFieldComponent<TEvent extends FormEvent> {\n protected readonly action = injectNgForgeAction<TEvent>();\n\n readonly props = input<BsButtonProps>();\n\n /** Resolved button type — defaults to 'button' unless overridden via props. */\n readonly buttonType = computed(() => this.props()?.type ?? 'button');\n\n readonly buttonTestId = computed(() => `${this.buttonType()}-${this.action.key()}`);\n\n readonly buttonClasses = computed(() => {\n const p = this.props();\n const variant = p?.variant || 'primary';\n const outline = p?.outline ? 'outline-' : '';\n\n return [\n 'btn',\n `btn-${outline}${variant}`,\n p?.size === 'sm' && 'btn-sm',\n p?.size === 'lg' && 'btn-lg',\n p?.block && 'w-100',\n p?.active && 'active',\n this.action.className(),\n ]\n .filter(Boolean)\n .join(' ');\n });\n\n /** Submit buttons let the native form handle submission; other buttons dispatch via the directive. */\n onClick(): void {\n if (this.buttonType() === 'submit') return;\n this.action.dispatch();\n }\n}\n"]}
1
+ {"version":3,"file":"ng-forge-dynamic-forms-bootstrap-lazy-button.mjs","names":[],"sources":["../../../../packages/dynamic-forms-bootstrap/src/lib/fields/button/bs-button.component.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { FormEvent } from '@ng-forge/dynamic-forms';\nimport { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';\nimport { injectNgForgeAction, NgForgeActionHost } from '@ng-forge/dynamic-forms/integration';\nimport { BsButtonProps } from './bs-button.type';\n\n@Component({\n selector: 'df-bs-button',\n imports: [DynamicTextPipe, AsyncPipe],\n styleUrl: '../../styles/_form-field.scss',\n hostDirectives: [NgForgeActionHost],\n template: `\n @let buttonId = action.key() + '-button';\n <button\n [id]=\"buttonId\"\n [type]=\"buttonType()\"\n [disabled]=\"action.disabled()\"\n [class]=\"buttonClasses()\"\n [attr.tabindex]=\"action.tabIndex()\"\n [attr.data-testid]=\"buttonTestId()\"\n (click)=\"onClick()\"\n >\n {{ action.label() | dynamicText | async }}\n </button>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport default class BsButtonFieldComponent<TEvent extends FormEvent> {\n protected readonly action = injectNgForgeAction<TEvent>();\n\n readonly props = input<BsButtonProps>();\n\n /** Resolved button type — defaults to 'button' unless overridden via props. */\n readonly buttonType = computed(() => this.props()?.type ?? 'button');\n\n readonly buttonTestId = computed(() => `${this.buttonType()}-${this.action.key()}`);\n\n readonly buttonClasses = computed(() => {\n const p = this.props();\n const variant = p?.variant || 'primary';\n const outline = p?.outline ? 'outline-' : '';\n\n return [\n 'btn',\n `btn-${outline}${variant}`,\n p?.size === 'sm' && 'btn-sm',\n p?.size === 'lg' && 'btn-lg',\n p?.block && 'w-100',\n p?.active && 'active',\n this.action.className(),\n ]\n .filter(Boolean)\n .join(' ');\n });\n\n /** Submit buttons let the native form handle submission; other buttons dispatch via the directive. */\n onClick(): void {\n if (this.buttonType() === 'submit') return;\n this.action.dispatch();\n }\n}\n"],"mappings":";;;;;AA4BA,IAAqB,yBAArB,MAAqB,uBAAsB;CACtB,SAAS,oBAAmB;CAEtC,QAAQ,MAAsB,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAG9B,aAAa,eAAe,KAAK,MAAK,CAAE,EAAE,QAAQ,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAE3D,eAAe,eAAe,GAAG,KAAK,WAAU,EAAE,GAAI,KAAK,OAAO,IAAG,KAAK,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CAE1E,gBAAgB,eAAc;EACrC,MAAM,IAAI,KAAK,MAAK;EACpB,MAAM,UAAU,GAAG,WAAW;EAG9B,OAAO;GACL;GACA,OAJc,GAAG,UAAU,aAAa,KAIvB;GACjB,GAAG,SAAS,QAAQ;GACpB,GAAG,SAAS,QAAQ;GACpB,GAAG,SAAS;GACZ,GAAG,UAAU;GACb,KAAK,OAAO,UAAS;EACtB,CAAA,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;CACb,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,gBAAA,CAAA,+BAAA,CAAA,CAAA;CAGF,UAAO;EACL,IAAI,KAAK,WAAU,MAAO,UAAU;EACpC,KAAK,OAAO,SAAQ;CACtB;CAhCmB,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAsB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAtB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAsB,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,OAAA;GAAA,mBAAA;GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,gBAAA,CAAA,EAAA,WAAA,GAAA,kBAAA,CAAA;EAAA,UAAA;EAAA,UAhB/B;;;;;;;;;;;;;;EAaT,UAAA;EAAA,QAAA,CAAA,8iBAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MAhBS;GAAe,MAAA;EAAA,GAAA;GAAA,MAAA;GAAA,MAAE;GAAS,MAAA;EAAA,CAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAmBjB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EArB1C,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAc,SACf,CAAC,iBAAiB,SAAS;GAAC,gBAErB,CAAC,iBAAiB;GAAC,UACzB;;;;;;;;;;;;;;GAaT,iBACgB,wBAAwB;GAAM,QAAA,CAAA,8iBAAA;EAAA,CAAA"}