@dereekb/dbx-form 13.7.0 → 13.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/dereekb-dbx-form-calendar.mjs +425 -144
- package/fesm2022/dereekb-dbx-form-calendar.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-form-expand.field.component-Bp5_uO1A.mjs +56 -0
- package/fesm2022/dereekb-dbx-form-expand.field.component-Bp5_uO1A.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-flex.wrapper.component-CpOHCk87.mjs +39 -0
- package/fesm2022/dereekb-dbx-form-flex.wrapper.component-CpOHCk87.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-info.field.component-B0cFprvc.mjs +50 -0
- package/fesm2022/dereekb-dbx-form-info.field.component-B0cFprvc.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-info.wrapper.component-18n632L-.mjs +61 -0
- package/fesm2022/dereekb-dbx-form-info.wrapper.component-18n632L-.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-mapbox.mjs +639 -32
- package/fesm2022/dereekb-dbx-form-mapbox.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-form-quiz.mjs +46 -55
- package/fesm2022/dereekb-dbx-form-quiz.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-form-section.wrapper.component-vq21oG6v.mjs +52 -0
- package/fesm2022/dereekb-dbx-form-section.wrapper.component-vq21oG6v.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-style.wrapper.component-BbKj-IHD.mjs +42 -0
- package/fesm2022/dereekb-dbx-form-style.wrapper.component-BbKj-IHD.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form.mjs +13688 -5235
- package/fesm2022/dereekb-dbx-form.mjs.map +1 -1
- package/lib/forge/_forge.scss +14 -0
- package/lib/forge/field/_field.scss +12 -0
- package/lib/forge/field/selection/_selection.scss +18 -0
- package/lib/forge/field/selection/list/_list.scss +17 -0
- package/lib/forge/field/selection/pickable/_pickable.scss +36 -0
- package/lib/forge/field/selection/searchable/_searchable.scss +34 -0
- package/lib/forge/field/selection/sourceselect/_sourceselect.scss +30 -0
- package/lib/forge/field/wrapper/_wrapper.scss +72 -0
- package/lib/{formly/form/_form.scss → forge/preset/_preset.scss} +3 -12
- package/lib/forge/style/_shared.scss +36 -0
- package/lib/form/_form.scss +109 -0
- package/lib/formly/field/selection/sourceselect/_sourceselect.scss +0 -7
- package/lib/formly/field/texteditor/_texteditor.scss +8 -0
- package/lib/formly/field/value/array/_array.scss +6 -0
- package/lib/formly/field/value/phone/_phone.scss +4 -1
- package/lib/style/_all-core.scss +2 -2
- package/lib/style/_all-theme.scss +2 -2
- package/lib/style/_all-typography.scss +1 -1
- package/package.json +16 -14
- package/types/dereekb-dbx-form-calendar.d.ts +306 -100
- package/types/dereekb-dbx-form-mapbox.d.ts +304 -8
- package/types/dereekb-dbx-form.d.ts +8837 -2720
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import * as i3 from '@angular/material/button';
|
|
4
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
5
|
+
import * as i1 from '@angular/material/icon';
|
|
6
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Forge ValueFieldComponent that renders an expand/collapse control.
|
|
10
|
+
*
|
|
11
|
+
* Displays as either a Material stroked button or a clickable text link.
|
|
12
|
+
* Writes `true`/`false` to its FieldTree value on click, which drives
|
|
13
|
+
* conditional visibility on sibling groups via ng-forge's `logic` system.
|
|
14
|
+
*/
|
|
15
|
+
class DbxForgeExpandFieldComponent {
|
|
16
|
+
// ng-forge ValueFieldComponent inputs
|
|
17
|
+
field = input.required(...(ngDevMode ? [{ debugName: "field" }] : /* istanbul ignore next */ []));
|
|
18
|
+
key = input.required(...(ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []));
|
|
19
|
+
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
20
|
+
placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
21
|
+
className = input('', ...(ngDevMode ? [{ debugName: "className" }] : /* istanbul ignore next */ []));
|
|
22
|
+
tabIndex = input(...(ngDevMode ? [undefined, { debugName: "tabIndex" }] : /* istanbul ignore next */ []));
|
|
23
|
+
props = input(...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
|
|
24
|
+
meta = input(...(ngDevMode ? [undefined, { debugName: "meta" }] : /* istanbul ignore next */ []));
|
|
25
|
+
validationMessages = input(...(ngDevMode ? [undefined, { debugName: "validationMessages" }] : /* istanbul ignore next */ []));
|
|
26
|
+
defaultValidationMessages = input(...(ngDevMode ? [undefined, { debugName: "defaultValidationMessages" }] : /* istanbul ignore next */ []));
|
|
27
|
+
isOpenSignal = computed(() => {
|
|
28
|
+
return this.field()().value() ?? false;
|
|
29
|
+
}, ...(ngDevMode ? [{ debugName: "isOpenSignal" }] : /* istanbul ignore next */ []));
|
|
30
|
+
buttonTypeSignal = computed(() => {
|
|
31
|
+
return this.props()?.buttonType ?? 'text';
|
|
32
|
+
}, ...(ngDevMode ? [{ debugName: "buttonTypeSignal" }] : /* istanbul ignore next */ []));
|
|
33
|
+
labelSignal = computed(() => {
|
|
34
|
+
return this.props()?.expandLabel ?? '';
|
|
35
|
+
}, ...(ngDevMode ? [{ debugName: "labelSignal" }] : /* istanbul ignore next */ []));
|
|
36
|
+
iconSignal = computed(() => {
|
|
37
|
+
return this.isOpenSignal() ? 'expand_less' : 'expand_more';
|
|
38
|
+
}, ...(ngDevMode ? [{ debugName: "iconSignal" }] : /* istanbul ignore next */ []));
|
|
39
|
+
toggle() {
|
|
40
|
+
const fieldState = this.field()();
|
|
41
|
+
const currentValue = fieldState.value() ?? false;
|
|
42
|
+
fieldState.value.set(!currentValue);
|
|
43
|
+
fieldState.markAsTouched();
|
|
44
|
+
}
|
|
45
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeExpandFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
46
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DbxForgeExpandFieldComponent, isStandalone: true, selector: "dbx-forge-expand-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null }, validationMessages: { classPropertyName: "validationMessages", publicName: "validationMessages", isSignal: true, isRequired: false, transformFunction: null }, defaultValidationMessages: { classPropertyName: "defaultValidationMessages", publicName: "defaultValidationMessages", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "className()" } }, ngImport: i0, template: "@if (buttonTypeSignal() === 'button') {\n <button mat-stroked-button type=\"button\" class=\"dbx-forge-expand-button\" (click)=\"toggle()\" [attr.aria-expanded]=\"isOpenSignal()\">\n <mat-icon>{{ iconSignal() }}</mat-icon>\n {{ labelSignal() }}\n </button>\n} @else {\n <span class=\"dbx-forge-expand-text\" role=\"button\" tabindex=\"0\" (click)=\"toggle()\" (keydown.enter)=\"toggle()\" (keydown.space)=\"toggle()\" [attr.aria-expanded]=\"isOpenSignal()\">\n <mat-icon class=\"dbx-forge-expand-text-icon\">{{ iconSignal() }}</mat-icon>\n {{ labelSignal() }}\n </span>\n}\n", styles: [":host{display:block}.dbx-forge-expand-text{cursor:pointer;display:inline-flex;align-items:center;gap:4px;-webkit-user-select:none;user-select:none;color:var(--mat-sys-primary);font-size:.875rem}.dbx-forge-expand-text:hover{text-decoration:underline}.dbx-forge-expand-text-icon{font-size:18px;width:18px;height:18px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
47
|
+
}
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeExpandFieldComponent, decorators: [{
|
|
49
|
+
type: Component,
|
|
50
|
+
args: [{ selector: 'dbx-forge-expand-field', imports: [MatButtonModule, MatIconModule], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, host: {
|
|
51
|
+
'[class]': 'className()'
|
|
52
|
+
}, template: "@if (buttonTypeSignal() === 'button') {\n <button mat-stroked-button type=\"button\" class=\"dbx-forge-expand-button\" (click)=\"toggle()\" [attr.aria-expanded]=\"isOpenSignal()\">\n <mat-icon>{{ iconSignal() }}</mat-icon>\n {{ labelSignal() }}\n </button>\n} @else {\n <span class=\"dbx-forge-expand-text\" role=\"button\" tabindex=\"0\" (click)=\"toggle()\" (keydown.enter)=\"toggle()\" (keydown.space)=\"toggle()\" [attr.aria-expanded]=\"isOpenSignal()\">\n <mat-icon class=\"dbx-forge-expand-text-icon\">{{ iconSignal() }}</mat-icon>\n {{ labelSignal() }}\n </span>\n}\n", styles: [":host{display:block}.dbx-forge-expand-text{cursor:pointer;display:inline-flex;align-items:center;gap:4px;-webkit-user-select:none;user-select:none;color:var(--mat-sys-primary);font-size:.875rem}.dbx-forge-expand-text:hover{text-decoration:underline}.dbx-forge-expand-text-icon{font-size:18px;width:18px;height:18px}\n"] }]
|
|
53
|
+
}], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], meta: [{ type: i0.Input, args: [{ isSignal: true, alias: "meta", required: false }] }], validationMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "validationMessages", required: false }] }], defaultValidationMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValidationMessages", required: false }] }] } });
|
|
54
|
+
|
|
55
|
+
export { DbxForgeExpandFieldComponent };
|
|
56
|
+
//# sourceMappingURL=dereekb-dbx-form-expand.field.component-Bp5_uO1A.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dereekb-dbx-form-expand.field.component-Bp5_uO1A.mjs","sources":["../../../../packages/dbx-form/src/lib/forge/field/wrapper/expand/expand.field.component.ts","../../../../packages/dbx-form/src/lib/forge/field/wrapper/expand/expand.field.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { type FieldTree } from '@angular/forms/signals';\nimport type { DynamicText, FieldMeta, ValidationMessages } from '@ng-forge/dynamic-forms';\nimport type { DbxForgeExpandFieldProps } from './expand.field';\n\n/**\n * Forge ValueFieldComponent that renders an expand/collapse control.\n *\n * Displays as either a Material stroked button or a clickable text link.\n * Writes `true`/`false` to its FieldTree value on click, which drives\n * conditional visibility on sibling groups via ng-forge's `logic` system.\n */\n@Component({\n selector: 'dbx-forge-expand-field',\n templateUrl: './expand.field.component.html',\n styles: `\n :host {\n display: block;\n }\n\n .dbx-forge-expand-text {\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n user-select: none;\n color: var(--mat-sys-primary);\n font-size: 0.875rem;\n }\n\n .dbx-forge-expand-text:hover {\n text-decoration: underline;\n }\n\n .dbx-forge-expand-text-icon {\n font-size: 18px;\n width: 18px;\n height: 18px;\n }\n `,\n imports: [MatButtonModule, MatIconModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n host: {\n '[class]': 'className()'\n }\n})\nexport class DbxForgeExpandFieldComponent {\n // ng-forge ValueFieldComponent inputs\n readonly field = input.required<FieldTree<boolean>>();\n readonly key = input.required<string>();\n readonly label = input<DynamicText | undefined>();\n readonly placeholder = input<DynamicText | undefined>();\n readonly className = input<string>('');\n readonly tabIndex = input<number | undefined>();\n readonly props = input<DbxForgeExpandFieldProps | undefined>();\n readonly meta = input<FieldMeta | undefined>();\n readonly validationMessages = input<ValidationMessages | undefined>();\n readonly defaultValidationMessages = input<ValidationMessages | undefined>();\n\n readonly isOpenSignal = computed((): boolean => {\n return this.field()().value() ?? false;\n });\n\n readonly buttonTypeSignal = computed(() => {\n return this.props()?.buttonType ?? 'text';\n });\n\n readonly labelSignal = computed(() => {\n return this.props()?.expandLabel ?? '';\n });\n\n readonly iconSignal = computed(() => {\n return this.isOpenSignal() ? 'expand_less' : 'expand_more';\n });\n\n toggle(): void {\n const fieldState = this.field()();\n const currentValue = fieldState.value() ?? false;\n fieldState.value.set(!currentValue);\n fieldState.markAsTouched();\n }\n}\n","@if (buttonTypeSignal() === 'button') {\n <button mat-stroked-button type=\"button\" class=\"dbx-forge-expand-button\" (click)=\"toggle()\" [attr.aria-expanded]=\"isOpenSignal()\">\n <mat-icon>{{ iconSignal() }}</mat-icon>\n {{ labelSignal() }}\n </button>\n} @else {\n <span class=\"dbx-forge-expand-text\" role=\"button\" tabindex=\"0\" (click)=\"toggle()\" (keydown.enter)=\"toggle()\" (keydown.space)=\"toggle()\" [attr.aria-expanded]=\"isOpenSignal()\">\n <mat-icon class=\"dbx-forge-expand-text-icon\">{{ iconSignal() }}</mat-icon>\n {{ labelSignal() }}\n </span>\n}\n"],"names":["i2"],"mappings":";;;;;;;AAOA;;;;;;AAMG;MAoCU,4BAA4B,CAAA;;AAE9B,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAsB;AAC5C,IAAA,GAAG,GAAG,KAAK,CAAC,QAAQ,yEAAU;IAC9B,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAA2B;IACxC,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAA2B;AAC9C,IAAA,SAAS,GAAG,KAAK,CAAS,EAAE,gFAAC;IAC7B,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAsB;IACtC,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAwC;IACrD,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BA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,MAAA,EAAA,CAAA,+TAAA,CAAA,EAAA;;;;;"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { viewChild, ViewContainerRef, input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { DbxFlexGroupDirective } from '@dereekb/dbx-web';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Forge wrapper component that arranges child fields in a responsive flex layout
|
|
7
|
+
* using the `dbxFlexGroup` directive.
|
|
8
|
+
*
|
|
9
|
+
* Registered as forge wrapper `'dbx-forge-flex'`.
|
|
10
|
+
*/
|
|
11
|
+
class DbxForgeFlexWrapperComponent {
|
|
12
|
+
fieldComponent = viewChild.required('fieldComponent', { read: ViewContainerRef });
|
|
13
|
+
breakpoint = input(...(ngDevMode ? [undefined, { debugName: "breakpoint" }] : /* istanbul ignore next */ []));
|
|
14
|
+
relative = input(false, ...(ngDevMode ? [{ debugName: "relative" }] : /* istanbul ignore next */ []));
|
|
15
|
+
breakToColumn = input(false, ...(ngDevMode ? [{ debugName: "breakToColumn" }] : /* istanbul ignore next */ []));
|
|
16
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeFlexWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.4", type: DbxForgeFlexWrapperComponent, isStandalone: true, selector: "dbx-forge-flex-wrapper", inputs: { breakpoint: { classPropertyName: "breakpoint", publicName: "breakpoint", isSignal: true, isRequired: false, transformFunction: null }, relative: { classPropertyName: "relative", publicName: "relative", isSignal: true, isRequired: false, transformFunction: null }, breakToColumn: { classPropertyName: "breakToColumn", publicName: "breakToColumn", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "fieldComponent", first: true, predicate: ["fieldComponent"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: `
|
|
18
|
+
<div class="dbx-form-flex-section" dbxFlexGroup [content]="false" [relative]="relative()" [breakpoint]="breakpoint()" [breakToColumn]="breakToColumn()">
|
|
19
|
+
<ng-container #fieldComponent></ng-container>
|
|
20
|
+
</div>
|
|
21
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: DbxFlexGroupDirective, selector: "[dbxFlexGroup]", inputs: ["content", "breakToColumn", "relative", "breakpoint"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
22
|
+
}
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeFlexWrapperComponent, decorators: [{
|
|
24
|
+
type: Component,
|
|
25
|
+
args: [{
|
|
26
|
+
selector: 'dbx-forge-flex-wrapper',
|
|
27
|
+
template: `
|
|
28
|
+
<div class="dbx-form-flex-section" dbxFlexGroup [content]="false" [relative]="relative()" [breakpoint]="breakpoint()" [breakToColumn]="breakToColumn()">
|
|
29
|
+
<ng-container #fieldComponent></ng-container>
|
|
30
|
+
</div>
|
|
31
|
+
`,
|
|
32
|
+
imports: [DbxFlexGroupDirective],
|
|
33
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
34
|
+
standalone: true
|
|
35
|
+
}]
|
|
36
|
+
}], propDecorators: { fieldComponent: [{ type: i0.ViewChild, args: ['fieldComponent', { ...{ read: ViewContainerRef }, isSignal: true }] }], breakpoint: [{ type: i0.Input, args: [{ isSignal: true, alias: "breakpoint", required: false }] }], relative: [{ type: i0.Input, args: [{ isSignal: true, alias: "relative", required: false }] }], breakToColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "breakToColumn", required: false }] }] } });
|
|
37
|
+
|
|
38
|
+
export { DbxForgeFlexWrapperComponent };
|
|
39
|
+
//# sourceMappingURL=dereekb-dbx-form-flex.wrapper.component-CpOHCk87.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dereekb-dbx-form-flex.wrapper.component-CpOHCk87.mjs","sources":["../../../../packages/dbx-form/src/lib/forge/field/wrapper/flex/flex.wrapper.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, viewChild, ViewContainerRef } from '@angular/core';\nimport { DbxFlexGroupDirective, type ScreenMediaWidthType } from '@dereekb/dbx-web';\nimport { type FieldWrapperContract } from '@ng-forge/dynamic-forms';\n\n/**\n * Forge wrapper component that arranges child fields in a responsive flex layout\n * using the `dbxFlexGroup` directive.\n *\n * Registered as forge wrapper `'dbx-forge-flex'`.\n */\n@Component({\n selector: 'dbx-forge-flex-wrapper',\n template: `\n <div class=\"dbx-form-flex-section\" dbxFlexGroup [content]=\"false\" [relative]=\"relative()\" [breakpoint]=\"breakpoint()\" [breakToColumn]=\"breakToColumn()\">\n <ng-container #fieldComponent></ng-container>\n </div>\n `,\n imports: [DbxFlexGroupDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxForgeFlexWrapperComponent implements FieldWrapperContract {\n readonly fieldComponent = viewChild.required('fieldComponent', { read: ViewContainerRef });\n\n readonly breakpoint = input<ScreenMediaWidthType | undefined>();\n readonly relative = input<boolean>(false);\n readonly breakToColumn = input<boolean>(false);\n}\n"],"names":[],"mappings":";;;;AAIA;;;;;AAKG;MAYU,4BAA4B,CAAA;AAC9B,IAAA,cAAc,GAAG,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;IAEjF,UAAU,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,YAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAoC;AACtD,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;AAChC,IAAA,aAAa,GAAG,KAAK,CAAU,KAAK,oFAAC;uGALnC,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,e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AAE;;;;AAIT,EAAA,CAAA;oBACD,OAAO,EAAE,CAAC,qBAAqB,CAAC;oBAChC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,UAAU,EAAE;AACb,iBAAA;AAE8C,SAAA,CAAA,EAAA,cAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,gBAAgB,EAAA,EAAA,GAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,eAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { MatIconButton } from '@angular/material/button';
|
|
4
|
+
import * as i1 from '@angular/material/icon';
|
|
5
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Forge ValueFieldComponent that renders a Material info icon button.
|
|
9
|
+
*
|
|
10
|
+
* Displays a circular icon button with the `info` icon. On click,
|
|
11
|
+
* invokes the `onInfoClick` callback from props.
|
|
12
|
+
*/
|
|
13
|
+
class DbxForgeInfoButtonFieldComponent {
|
|
14
|
+
// ng-forge ValueFieldComponent inputs
|
|
15
|
+
field = input.required(...(ngDevMode ? [{ debugName: "field" }] : /* istanbul ignore next */ []));
|
|
16
|
+
key = input.required(...(ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []));
|
|
17
|
+
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
18
|
+
placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
19
|
+
className = input('', ...(ngDevMode ? [{ debugName: "className" }] : /* istanbul ignore next */ []));
|
|
20
|
+
tabIndex = input(...(ngDevMode ? [undefined, { debugName: "tabIndex" }] : /* istanbul ignore next */ []));
|
|
21
|
+
props = input(...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
|
|
22
|
+
meta = input(...(ngDevMode ? [undefined, { debugName: "meta" }] : /* istanbul ignore next */ []));
|
|
23
|
+
validationMessages = input(...(ngDevMode ? [undefined, { debugName: "validationMessages" }] : /* istanbul ignore next */ []));
|
|
24
|
+
defaultValidationMessages = input(...(ngDevMode ? [undefined, { debugName: "defaultValidationMessages" }] : /* istanbul ignore next */ []));
|
|
25
|
+
ariaLabelSignal = computed(() => {
|
|
26
|
+
return this.props()?.ariaLabel ?? 'More information';
|
|
27
|
+
}, ...(ngDevMode ? [{ debugName: "ariaLabelSignal" }] : /* istanbul ignore next */ []));
|
|
28
|
+
onClick() {
|
|
29
|
+
this.props()?.onInfoClick();
|
|
30
|
+
}
|
|
31
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeInfoButtonFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
32
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.4", type: DbxForgeInfoButtonFieldComponent, isStandalone: true, selector: "dbx-forge-info-button-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null }, validationMessages: { classPropertyName: "validationMessages", publicName: "validationMessages", isSignal: true, isRequired: false, transformFunction: null }, defaultValidationMessages: { classPropertyName: "defaultValidationMessages", publicName: "defaultValidationMessages", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "className()" } }, ngImport: i0, template: `
|
|
33
|
+
<button mat-icon-button type="button" class="dbx-forge-info-button" (click)="onClick()" [attr.aria-label]="ariaLabelSignal()">
|
|
34
|
+
<mat-icon>info</mat-icon>
|
|
35
|
+
</button>
|
|
36
|
+
`, isInline: true, styles: [":host{display:flex;align-items:center;justify-content:center;align-self:center}\n"], dependencies: [{ kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
37
|
+
}
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeInfoButtonFieldComponent, decorators: [{
|
|
39
|
+
type: Component,
|
|
40
|
+
args: [{ selector: 'dbx-forge-info-button-field', template: `
|
|
41
|
+
<button mat-icon-button type="button" class="dbx-forge-info-button" (click)="onClick()" [attr.aria-label]="ariaLabelSignal()">
|
|
42
|
+
<mat-icon>info</mat-icon>
|
|
43
|
+
</button>
|
|
44
|
+
`, imports: [MatIconButton, MatIconModule], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, host: {
|
|
45
|
+
'[class]': 'className()'
|
|
46
|
+
}, styles: [":host{display:flex;align-items:center;justify-content:center;align-self:center}\n"] }]
|
|
47
|
+
}], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], meta: [{ type: i0.Input, args: [{ isSignal: true, alias: "meta", required: false }] }], validationMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "validationMessages", required: false }] }], defaultValidationMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValidationMessages", required: false }] }] } });
|
|
48
|
+
|
|
49
|
+
export { DbxForgeInfoButtonFieldComponent };
|
|
50
|
+
//# sourceMappingURL=dereekb-dbx-form-info.field.component-B0cFprvc.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dereekb-dbx-form-info.field.component-B0cFprvc.mjs","sources":["../../../../packages/dbx-form/src/lib/forge/field/wrapper/info/info.field.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { MatIconButton } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { type FieldTree } from '@angular/forms/signals';\nimport type { DynamicText, FieldMeta, ValidationMessages } from '@ng-forge/dynamic-forms';\nimport type { DbxForgeInfoButtonFieldProps } from './info.field';\n\n/**\n * Forge ValueFieldComponent that renders a Material info icon button.\n *\n * Displays a circular icon button with the `info` icon. On click,\n * invokes the `onInfoClick` callback from props.\n */\n@Component({\n selector: 'dbx-forge-info-button-field',\n template: `\n <button mat-icon-button type=\"button\" class=\"dbx-forge-info-button\" (click)=\"onClick()\" [attr.aria-label]=\"ariaLabelSignal()\">\n <mat-icon>info</mat-icon>\n </button>\n `,\n styles: `\n :host {\n display: flex;\n align-items: center;\n justify-content: center;\n align-self: center;\n }\n `,\n imports: [MatIconButton, MatIconModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n host: {\n '[class]': 'className()'\n }\n})\nexport class DbxForgeInfoButtonFieldComponent {\n // ng-forge ValueFieldComponent inputs\n readonly field = input.required<FieldTree<unknown>>();\n readonly key = input.required<string>();\n readonly label = input<DynamicText | undefined>();\n readonly placeholder = input<DynamicText | undefined>();\n readonly className = input<string>('');\n readonly tabIndex = input<number | undefined>();\n readonly props = input<DbxForgeInfoButtonFieldProps | undefined>();\n readonly meta = input<FieldMeta | undefined>();\n readonly validationMessages = input<ValidationMessages | undefined>();\n readonly defaultValidationMessages = input<ValidationMessages | undefined>();\n\n readonly ariaLabelSignal = computed(() => {\n return this.props()?.ariaLabel ?? 'More information';\n });\n\n onClick(): void {\n this.props()?.onInfoClick();\n }\n}\n"],"names":[],"mappings":";;;;;;AAOA;;;;;AAKG;MAuBU,gCAAgC,CAAA;;AAElC,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAsB;AAC5C,IAAA,GAAG,GAAG,KAAK,CAAC,QAAQ,yEAAU;IAC9B,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,C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AA,UAAA,EACnC,IAAI,EAAA,IAAA,EACV;AACJ,wBAAA,SAAS,EAAE;AACZ,qBAAA,EAAA,MAAA,EAAA,CAAA,mFAAA,CAAA,EAAA;;;;;"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { viewChild, ViewContainerRef, input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { MatIconButton } from '@angular/material/button';
|
|
4
|
+
import * as i1 from '@angular/material/icon';
|
|
5
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Forge wrapper component that renders child fields inside a flex layout
|
|
9
|
+
* with an info icon button beside them.
|
|
10
|
+
*
|
|
11
|
+
* Implements {@link FieldWrapperContract} and receives configuration
|
|
12
|
+
* via component inputs.
|
|
13
|
+
*/
|
|
14
|
+
class DbxForgeInfoWrapperComponent {
|
|
15
|
+
fieldComponent = viewChild.required('fieldComponent', { read: ViewContainerRef });
|
|
16
|
+
onInfoClick = input(...(ngDevMode ? [undefined, { debugName: "onInfoClick" }] : /* istanbul ignore next */ []));
|
|
17
|
+
ariaLabel = input(...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
18
|
+
ariaLabelValue = computed(() => {
|
|
19
|
+
return this.ariaLabel() ?? 'More information';
|
|
20
|
+
}, ...(ngDevMode ? [{ debugName: "ariaLabelValue" }] : /* istanbul ignore next */ []));
|
|
21
|
+
onClick() {
|
|
22
|
+
this.onInfoClick()?.();
|
|
23
|
+
}
|
|
24
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeInfoWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.4", type: DbxForgeInfoWrapperComponent, isStandalone: true, selector: "dbx-forge-info-wrapper", inputs: { onInfoClick: { classPropertyName: "onInfoClick", publicName: "onInfoClick", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "fieldComponent", first: true, predicate: ["fieldComponent"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: `
|
|
26
|
+
<div class="dbx-form-info-wrapper dbx-flex-bar">
|
|
27
|
+
<div class="dbx-form-info-wrapper-content dbx-flex-grow">
|
|
28
|
+
<ng-container #fieldComponent></ng-container>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="dbx-form-info-wrapper-info dbx-flex-noshrink dbx-flex-column dbx-flex-center">
|
|
31
|
+
<button mat-icon-button type="button" (click)="onClick()" [attr.aria-label]="ariaLabelValue()">
|
|
32
|
+
<mat-icon>info</mat-icon>
|
|
33
|
+
</button>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
`, isInline: true, dependencies: [{ kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
37
|
+
}
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeInfoWrapperComponent, decorators: [{
|
|
39
|
+
type: Component,
|
|
40
|
+
args: [{
|
|
41
|
+
selector: 'dbx-forge-info-wrapper',
|
|
42
|
+
template: `
|
|
43
|
+
<div class="dbx-form-info-wrapper dbx-flex-bar">
|
|
44
|
+
<div class="dbx-form-info-wrapper-content dbx-flex-grow">
|
|
45
|
+
<ng-container #fieldComponent></ng-container>
|
|
46
|
+
</div>
|
|
47
|
+
<div class="dbx-form-info-wrapper-info dbx-flex-noshrink dbx-flex-column dbx-flex-center">
|
|
48
|
+
<button mat-icon-button type="button" (click)="onClick()" [attr.aria-label]="ariaLabelValue()">
|
|
49
|
+
<mat-icon>info</mat-icon>
|
|
50
|
+
</button>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
`,
|
|
54
|
+
imports: [MatIconButton, MatIconModule],
|
|
55
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
56
|
+
standalone: true
|
|
57
|
+
}]
|
|
58
|
+
}], propDecorators: { fieldComponent: [{ type: i0.ViewChild, args: ['fieldComponent', { ...{ read: ViewContainerRef }, isSignal: true }] }], onInfoClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "onInfoClick", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
59
|
+
|
|
60
|
+
export { DbxForgeInfoWrapperComponent };
|
|
61
|
+
//# sourceMappingURL=dereekb-dbx-form-info.wrapper.component-18n632L-.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dereekb-dbx-form-info.wrapper.component-18n632L-.mjs","sources":["../../../../packages/dbx-form/src/lib/forge/field/wrapper/info/info.wrapper.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, viewChild, ViewContainerRef } from '@angular/core';\nimport { MatIconButton } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { type FieldWrapperContract } from '@ng-forge/dynamic-forms';\n\n/**\n * Forge wrapper component that renders child fields inside a flex layout\n * with an info icon button beside them.\n *\n * Implements {@link FieldWrapperContract} and receives configuration\n * via component inputs.\n */\n@Component({\n selector: 'dbx-forge-info-wrapper',\n template: `\n <div class=\"dbx-form-info-wrapper dbx-flex-bar\">\n <div class=\"dbx-form-info-wrapper-content dbx-flex-grow\">\n <ng-container #fieldComponent></ng-container>\n </div>\n <div class=\"dbx-form-info-wrapper-info dbx-flex-noshrink dbx-flex-column dbx-flex-center\">\n <button mat-icon-button type=\"button\" (click)=\"onClick()\" [attr.aria-label]=\"ariaLabelValue()\">\n <mat-icon>info</mat-icon>\n </button>\n </div>\n </div>\n `,\n imports: [MatIconButton, MatIconModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxForgeInfoWrapperComponent implements FieldWrapperContract {\n readonly fieldComponent = viewChild.required('fieldComponent', { read: ViewContainerRef });\n\n readonly onInfoClick = input<() => void>();\n readonly ariaLabel = input<string>();\n\n readonly ariaLabelValue = computed(() => {\n return this.ariaLabel() ?? 'More information';\n });\n\n onClick(): void {\n this.onInfoClick()?.();\n }\n}\n"],"names":[],"mappings":";;;;;;AAKA;;;;;;AAMG;MAmBU,4BAA4B,CAAA;AAC9B,IAAA,cAAc,GAAG,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;IAEjF,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAc;IACjC,SAAS,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;AAE3B,IAAA,cAAc,GAAG,QAAQ,CAAC,MAAK;AACtC,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE,IAAI,kBAAkB;AAC/C,IAAA,CAAC,qFAAC;IAEF,OAAO,GAAA;AACL,QAAA,IAAI,CAAC,WAAW,EAAE,IAAI;IACxB;uGAZW,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,MAAA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