ngx-wapp-components 3.4.3-alpha.1 → 3.4.3-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ngx-wapp-components-home-preview.mjs +1041 -0
- package/fesm2022/ngx-wapp-components-home-preview.mjs.map +1 -0
- package/fesm2022/ngx-wapp-components-schema-form.mjs +429 -42
- package/fesm2022/ngx-wapp-components-schema-form.mjs.map +1 -1
- package/fesm2022/ngx-wapp-components.mjs +463 -408
- package/fesm2022/ngx-wapp-components.mjs.map +1 -1
- package/home-preview/README.md +53 -0
- package/package.json +6 -1
- package/schema-form/README.md +103 -2
- package/types/ngx-wapp-components-home-preview.d.ts +572 -0
- package/types/ngx-wapp-components-schema-form.d.ts +111 -4
- package/types/ngx-wapp-components.d.ts +95 -68
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, DestroyRef, Component, NgModule, EventEmitter, Output, Input } from '@angular/core';
|
|
2
|
+
import { inject, DestroyRef, Component, ElementRef, NgModule, EventEmitter, Output, Input } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
|
-
import { FormControl, ReactiveFormsModule, FormGroup } from '@angular/forms';
|
|
4
|
+
import { FormControl, ReactiveFormsModule, FormsModule, FormGroup } from '@angular/forms';
|
|
5
5
|
import * as i1$1 from '@ngx-formly/core';
|
|
6
|
-
import { FieldType,
|
|
6
|
+
import { FieldType, FormlyModule, FieldWrapper } from '@ngx-formly/core';
|
|
7
7
|
import { FormlyJsonschema } from '@ngx-formly/core/json-schema';
|
|
8
8
|
import { FormlyPrimeNGModule } from '@ngx-formly/primeng';
|
|
9
9
|
import Ajv from 'ajv';
|
|
@@ -14,8 +14,18 @@ import * as i3 from 'primeng/button';
|
|
|
14
14
|
import { ButtonModule } from 'primeng/button';
|
|
15
15
|
import * as i2 from 'primeng/inputtext';
|
|
16
16
|
import { InputTextModule } from 'primeng/inputtext';
|
|
17
|
+
import * as i4 from 'primeng/colorpicker';
|
|
18
|
+
import { ColorPickerModule } from 'primeng/colorpicker';
|
|
17
19
|
import * as i2$1 from 'primeng/tooltip';
|
|
18
20
|
import { TooltipModule } from 'primeng/tooltip';
|
|
21
|
+
import * as i1$2 from 'ngx-wapp-components';
|
|
22
|
+
import { WappComponentsModule } from 'ngx-wapp-components';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Presentation groups of `x-wapping-group` (SFP-001), listed in their visual order. The annotation is only
|
|
26
|
+
* accepted on direct properties of the root; it never changes the model, the JSON Pointers or the validation.
|
|
27
|
+
*/
|
|
28
|
+
const W_SCHEMA_FORM_GROUPS = ['connector', 'connection', 'capabilities', 'mapping'];
|
|
19
29
|
|
|
20
30
|
/** Default Spanish texts. Frozen: consumers must pass their own object instead of mutating this one. */
|
|
21
31
|
const W_SCHEMA_FORM_DEFAULT_TRANSLATIONS = Object.freeze({
|
|
@@ -25,7 +35,14 @@ const W_SCHEMA_FORM_DEFAULT_TRANSLATIONS = Object.freeze({
|
|
|
25
35
|
secretPending: 'Pendiente',
|
|
26
36
|
secretReplaceHint: 'Déjalo vacío para conservar el valor actual o escribe uno nuevo para sustituirlo.',
|
|
27
37
|
showSecret: 'Mostrar valor',
|
|
28
|
-
hideSecret: 'Ocultar valor'
|
|
38
|
+
hideSecret: 'Ocultar valor',
|
|
39
|
+
selectAll: 'Seleccionar todo',
|
|
40
|
+
groups: Object.freeze({
|
|
41
|
+
connector: 'Conector',
|
|
42
|
+
connection: 'Conexión',
|
|
43
|
+
capabilities: 'Capacidades',
|
|
44
|
+
mapping: 'Mapeo'
|
|
45
|
+
})
|
|
29
46
|
});
|
|
30
47
|
|
|
31
48
|
/** Formly type name of the secret field (internal to `w-schema-form`). */
|
|
@@ -73,25 +90,69 @@ class WSchemaFormSecretFieldComponent extends FieldType {
|
|
|
73
90
|
this.inputType = visible ? 'text' : 'password';
|
|
74
91
|
this.toggleLabel = visible ? this.props.hideSecretLabel : this.props.showSecretLabel;
|
|
75
92
|
}
|
|
76
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
77
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: WSchemaFormSecretFieldComponent, isStandalone: true, selector: "w-schema-form-secret-field", usesInheritance: true, ngImport: i0, template: "<div class=\"w-schema-form-secret\">\r\n <div class=\"w-schema-form-secret__entry\">\r\n <input\r\n pInputText\r\n class=\"w-schema-form-secret__input\"\r\n [id]=\"id\"\r\n [type]=\"inputType\"\r\n autocomplete=\"new-password\"\r\n spellcheck=\"false\"\r\n [formControl]=\"control\"\r\n [attr.aria-describedby]=\"describedBy\" />\r\n <button\r\n type=\"button\"\r\n pButton\r\n [text]=\"true\"\r\n class=\"w-schema-form-secret__toggle\"\r\n [attr.aria-label]=\"toggleLabel\"\r\n [attr.aria-pressed]=\"visible\"\r\n [attr.aria-controls]=\"id\"\r\n (click)=\"toggleVisibility()\">\r\n <i pButtonIcon class=\"pi\" [class.pi-eye]=\"!visible\" [class.pi-eye-slash]=\"visible\" aria-hidden=\"true\"></i>\r\n </button>\r\n </div>\r\n <small [id]=\"statusId\" class=\"w-schema-form-secret__status\">{{ statusText }}</small>\r\n @if (hint) {\r\n <small [id]=\"hintId\" class=\"w-schema-form-secret__hint\">{{ hint }}</small>\r\n }\r\n</div>\r\n", styles: [".heading1{font-size:2.6666666667rem;line-height:3rem;font-weight:700}.heading2{font-size:2.3333333333rem;line-height:2.6666666667rem;font-weight:700}.heading3{font-size:2rem;line-height:2.3333333333rem;font-weight:700}.heading4{font-size:1.6666666667rem;line-height:2rem;font-weight:700}.heading5,.w-sidebar-title-text{font-size:1.5rem;line-height:1.8333333333rem;font-weight:700}.heading6{font-size:1.3333333333rem;line-height:1.6666666667rem;font-weight:700}.subtitle1,.w-tab-text,.w-panel-title-text{font-size:1.1666666667rem;line-height:1.3333333333rem;font-weight:700}.subtitle2,.w-table-th-text,.w-panel-subtitle-text,.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled,.w-view-small-label-text-typography,.w-view-small-label-text,.w-button-small-text-label-text-typography,.w-button-small-text-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:600}.body,.w-image-file-uploader-navigators-text,.w-table-td-text,.w-chip-text,.w-panel-content,.w-input-small-select-options-text,.w-input-small-placeholder-text-typography,.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text,.w-view-small-value-text-typography,.w-view-small-value-text,.w-button-small-label-text-typography,.w-button-small-tertiary-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:400}.caption,.w-input-success-alert-text{font-size:.6666666667rem;line-height:1rem;font-weight:400}.light,.w-input-small-placeholder-text-only-color{font-size:.9166666667rem;line-height:1.0833333333rem;font-weight:300}.small,.w-schema-form-secret__hint,.w-schema-form-secret__status,.w-error-message,.w-input-error-alert-text,.w-input-warning-alert-text,.w-message-note,.w-button-small-label-text-typography-sm{font-size:.8333333333rem;line-height:1rem;font-weight:400}.textMainColor{color:#1f2224}.textSoftColor{color:#5f6468}.textSofterColor{color:#9aa0a7}.textSoftestColor{color:#e8ebee}.textInverseColor{color:#fff}.spacingXXS{padding:4px}.spacingXSM{padding:6px}.spacingXSMDivider{height:6px}.spacingXS{padding:8px}.spacingS{padding:12px}.spacingM{padding:16px}.spacingL{padding:20px}.spacingXL{padding:24px}.spacingXXL{padding:28px}.spacingXXXL{padding:32px}.panel-title-gap-divider{height:20px}.panel-section-gap-divider{height:32px}.input-vertical-gap-divider{height:24px}.input-label-gap-divider{height:6px}.focusedInput{border:1px solid rgba(0,157,253,.25);box-shadow:0 0 10px #00b3eb40}.focus{box-shadow:0 0 8px #00a6e980}.hover{border-radius:8px;border:1px solid #00b3eb}.hoveredInput{border-radius:8px;border:1px solid rgba(0,179,235,.5)}.input-generic-valid{border-radius:8px;border:1px solid #B3FFD3}.input-generic-valid-focus{border-radius:8px;border:1px solid #B3FFD3!important;box-shadow:0 0 8px #46ff9b80!important;padding-left:16px}.input-generic-warning{border-radius:8px;border:1px solid #FFECB8!important}.input-generic-warning-focus{border-radius:8px;border:1px solid #FFECB8!important;box-shadow:0 0 8px #ffcd4680!important;padding-left:16px}.input-generic-error-focus{border-radius:8px;border:1px solid #FFBDBD!important;box-shadow:0 0 8px #ff555580!important;padding-left:16px}.input-generic-error{border-radius:8px;border:1px solid #FFBDBD}.toggle-small-typography{font-size:12px;line-height:16px;font-weight:600}.w-button-small-label-text-typography,.w-button-small-tertiary-label-text,.w-button-small-label-text-typography-sm{font-weight:600}.w-button-small-tertiary-label-text{color:#5f6468}.w-button-small-text-label-text{color:#1f2224}.w-button-small-icon-text{font-size:12px;font-weight:600}.w-table-button-small-icon-text{font-size:12px;color:#9aa0a7}.w-control-button-small-label-text{font-size:12px;font-weight:600;line-height:16px}.w-control-button-x-small-icon-text{font-size:10px;font-weight:700}.w-control-button-small-icon-text{font-size:8px;font-weight:700}.w-button-medium-label-text-typography,.w-button-medium-tertiary-label-text{font-size:16px;font-weight:600;line-height:16px}.w-button-medium-tertiary-label-text{color:#1f2224}.w-button-medium-icon-text{font-size:16px}.w-control-button-medium-label-text{font-size:14px;font-weight:600;line-height:16px}.w-control-button-medium-icon-text{font-size:12px;font-weight:700}.w-button-large-label-text-typography,.w-button-large-tertiary-label-text{font-size:20px;font-weight:600;line-height:24px}.w-button-large-tertiary-label-text{color:#1f2224}.w-button-x-small-label-text{font-size:10px;font-weight:600;line-height:10px}.w-button-small-only-label-text{font-size:12px;font-weight:600;line-height:16px}.w-button-large-icon-text{font-size:24px}.w-view-small-label-text{color:#1f2224}.w-view-small-value-text{color:#5f6468}.w-input-no-label-height{height:14px}.w-input-disabled{background-color:#f8f9fa!important;border-color:#e8ebee!important;opacity:.6!important}.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled{height:fit-content}.w-input-small-label-text,.w-input-small-label-disabled{color:#1f2224}.w-input-small-label-disabled{color:#9aa0a7}.w-input-small-label-text-content{padding:12px 8px 8px 0;margin:0}.w-input-small-label-text-content-no-top{padding-top:0}.w-input-small-placeholder-text{color:#1f2224}.w-input-small-placeholder-text-only-color{color:#9aa0a7;line-height:1.3333333333rem}.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text-disabled-only-color{color:#5f6468}.w-input-small-text-icon,.w-input-small-select-options-text{color:#1f2224}.w-input-medium-label-text-typography,.w-input-medium-label-text,.w-input-medium-label-disabled{font-size:14px;font-weight:600;line-height:16px}.w-input-medium-label-text,.w-input-medium-label-disabled{color:#1f2224}.w-input-medium-label-disabled{color:#9aa0a7}.w-input-medium-placeholder-text-typography,.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text{font-size:16px;font-weight:400;line-height:24px}.w-input-medium-placeholder-text,.w-input-medium-placeholder-text-only-color{color:#1f2224}.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text-disabled-only-color{color:#5f6468}.w-input-medium-text-icon{color:#1f2224}.w-input-medium-select-options-text{font-size:16px;font-weight:400;line-height:24px;color:#1f2224}.w-input-success-alert-text{color:#00db5d;padding:8px 8px 0;margin-top:0}.w-input-warning-alert-text,.w-message-note{color:#eeae00;padding:0 4px;margin-top:-2px}.w-input-error-alert-text{color:#e50000;padding:0 4px;margin-top:-2px}.w-input-alert-message-height{height:32px}.w-error-message{color:#e50000;padding:0 4px;margin-top:-2px}.w-message-note{font-weight:600;color:#e2a500}.w-sidebar-title-text,.w-panel-title-text,.w-panel-subtitle-text{color:#1f2224}.w-panel-content{color:#5f6468}.w-tab-text,.w-chip-text{color:#1f2224}.w-badge-text{font-size:10px;font-weight:700;line-height:8px}.w-table-th-text{color:#1f2224}.w-table-td-text{color:#5f6468}.w-table-height{padding:6px 8px 5px}.w-table-no-buttons-height{padding:16px 8px 15px!important}.w-tree-table-height{padding:8px 8px 7px}.w-image-file-uploader-navigators-text{font-size:12px;color:#fff}.grid{margin:0}::ng-deep .p-tooltip,.p-tooltip{filter:0px 0px 1px 0px rgba(0,0,0,.1) inset,1px 1px 5px rgba(0,0,0,.06),1px 1px 1px rgba(0,0,0,.08)}::ng-deep .p-tooltip .p-tooltip-text,.p-tooltip .p-tooltip-text{background:#fff!important;color:#1f2224;padding:12px 16px;max-width:192px;width:max-content;margin-left:3px;pointer-events:none}::ng-deep .p-tooltip.p-tooltip-left,.p-tooltip.p-tooltip-left{margin-right:6px;width:max-content;transform:translate(-6px)}::ng-deep .p-tooltip.p-tooltip-left .p-tooltip-arrow,.p-tooltip.p-tooltip-left .p-tooltip-arrow{border-left-color:#fff!important;top:50%;right:-3px;margin-top:-4px;border-width:4px 0 4px 6px!important}::ng-deep .p-tooltip.p-tooltip-right,.p-tooltip.p-tooltip-right{margin-left:6px;width:max-content;transform:translateY(-1px)}::ng-deep .p-tooltip.p-tooltip-right .p-tooltip-arrow,.p-tooltip.p-tooltip-right .p-tooltip-arrow{border-right-color:#fff!important;top:50%;left:0;margin-top:-4px;border-width:4px 6px 4px 0!important}::ng-deep .p-tooltip.p-tooltip-bottom .p-tooltip-arrow,.p-tooltip.p-tooltip-bottom .p-tooltip-arrow{border-bottom-color:#fff!important;border-width:0 4px 6px 4px!important;margin-top:-3px}:host{display:block}.w-schema-form-secret{display:flex;flex-direction:column;gap:4px}.w-schema-form-secret__entry{display:flex;align-items:center;gap:8px}.w-schema-form-secret__input{flex:1 1 auto;min-width:0}.w-schema-form-secret__status{color:#1f2224;font-weight:600}.w-schema-form-secret__hint{color:#5f6468}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "directive", type: i3.ButtonIcon, selector: "[pButtonIcon]", inputs: ["ptButtonIcon", "pButtonIconPT", "pButtonUnstyled"] }] }); }
|
|
93
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: WSchemaFormSecretFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
94
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.27", type: WSchemaFormSecretFieldComponent, isStandalone: true, selector: "w-schema-form-secret-field", usesInheritance: true, ngImport: i0, template: "<div class=\"w-schema-form-secret\">\r\n <div class=\"w-schema-form-secret__entry\">\r\n <input\r\n pInputText\r\n class=\"w-schema-form-secret__input\"\r\n [id]=\"id\"\r\n [type]=\"inputType\"\r\n autocomplete=\"new-password\"\r\n spellcheck=\"false\"\r\n [formControl]=\"control\"\r\n [attr.aria-describedby]=\"describedBy\" />\r\n <button\r\n type=\"button\"\r\n pButton\r\n [text]=\"true\"\r\n class=\"w-schema-form-secret__toggle\"\r\n [attr.aria-label]=\"toggleLabel\"\r\n [attr.aria-pressed]=\"visible\"\r\n [attr.aria-controls]=\"id\"\r\n (click)=\"toggleVisibility()\">\r\n <i pButtonIcon class=\"pi\" [class.pi-eye]=\"!visible\" [class.pi-eye-slash]=\"visible\" aria-hidden=\"true\"></i>\r\n </button>\r\n </div>\r\n <small [id]=\"statusId\" class=\"w-schema-form-secret__status\">{{ statusText }}</small>\r\n @if (hint) {\r\n <small [id]=\"hintId\" class=\"w-schema-form-secret__hint\">{{ hint }}</small>\r\n }\r\n</div>\r\n", styles: [".heading1{font-size:2.6666666667rem;line-height:3rem;font-weight:700}.heading2{font-size:2.3333333333rem;line-height:2.6666666667rem;font-weight:700}.heading3{font-size:2rem;line-height:2.3333333333rem;font-weight:700}.heading4{font-size:1.6666666667rem;line-height:2rem;font-weight:700}.heading5,.w-sidebar-title-text{font-size:1.5rem;line-height:1.8333333333rem;font-weight:700}.heading6{font-size:1.3333333333rem;line-height:1.6666666667rem;font-weight:700}.subtitle1,.w-tab-text,.w-panel-title-text{font-size:1.1666666667rem;line-height:1.3333333333rem;font-weight:700}.subtitle2,.w-table-th-text,.w-panel-subtitle-text,.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled,.w-view-small-label-text-typography,.w-view-small-label-text,.w-button-small-text-label-text-typography,.w-button-small-text-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:600}.body,.w-image-file-uploader-navigators-text,.w-table-td-text,.w-chip-text,.w-panel-content,.w-input-small-select-options-text,.w-input-small-placeholder-text-typography,.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text,.w-view-small-value-text-typography,.w-view-small-value-text,.w-button-small-label-text-typography,.w-button-small-tertiary-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:400}.caption,.w-input-success-alert-text{font-size:.6666666667rem;line-height:1rem;font-weight:400}.light,.w-input-small-placeholder-text-only-color{font-size:.9166666667rem;line-height:1.0833333333rem;font-weight:300}.small,.w-schema-form-secret__hint,.w-schema-form-secret__status,.w-error-message,.w-input-error-alert-text,.w-input-warning-alert-text,.w-message-note,.w-button-small-label-text-typography-sm{font-size:.8333333333rem;line-height:1rem;font-weight:400}.textMainColor{color:#1f2224}.textSoftColor{color:#5f6468}.textSofterColor{color:#9aa0a7}.textSoftestColor{color:#e8ebee}.textInverseColor{color:#fff}.spacingXXS{padding:4px}.spacingXSM{padding:6px}.spacingXSMDivider{height:6px}.spacingXS{padding:8px}.spacingS{padding:12px}.spacingM{padding:16px}.spacingL{padding:20px}.spacingXL{padding:24px}.spacingXXL{padding:28px}.spacingXXXL{padding:32px}.panel-title-gap-divider{height:20px}.panel-section-gap-divider{height:32px}.input-vertical-gap-divider{height:24px}.input-label-gap-divider{height:6px}.focusedInput{border:1px solid rgba(0,157,253,.25);box-shadow:0 0 10px #00b3eb40}.focus{box-shadow:0 0 8px #00a6e980}.hover{border-radius:8px;border:1px solid #00b3eb}.hoveredInput{border-radius:8px;border:1px solid rgba(0,179,235,.5)}.input-generic-valid{border-radius:8px;border:1px solid #B3FFD3}.input-generic-valid-focus{border-radius:8px;border:1px solid #B3FFD3!important;box-shadow:0 0 8px #46ff9b80!important;padding-left:16px}.input-generic-warning{border-radius:8px;border:1px solid #FFECB8!important}.input-generic-warning-focus{border-radius:8px;border:1px solid #FFECB8!important;box-shadow:0 0 8px #ffcd4680!important;padding-left:16px}.input-generic-error-focus{border-radius:8px;border:1px solid #FFBDBD!important;box-shadow:0 0 8px #ff555580!important;padding-left:16px}.input-generic-error{border-radius:8px;border:1px solid #FFBDBD}.toggle-small-typography{font-size:12px;line-height:16px;font-weight:600}.w-button-small-label-text-typography,.w-button-small-tertiary-label-text,.w-button-small-label-text-typography-sm{font-weight:600}.w-button-small-tertiary-label-text{color:#5f6468}.w-button-small-text-label-text{color:#1f2224}.w-button-small-icon-text{font-size:12px;font-weight:600}.w-table-button-small-icon-text{font-size:12px;color:#9aa0a7}.w-control-button-small-label-text{font-size:12px;font-weight:600;line-height:16px}.w-control-button-x-small-icon-text{font-size:10px;font-weight:700}.w-control-button-small-icon-text{font-size:8px;font-weight:700}.w-button-medium-label-text-typography,.w-button-medium-tertiary-label-text{font-size:16px;font-weight:600;line-height:16px}.w-button-medium-tertiary-label-text{color:#1f2224}.w-button-medium-icon-text{font-size:16px}.w-control-button-medium-label-text{font-size:14px;font-weight:600;line-height:16px}.w-control-button-medium-icon-text{font-size:12px;font-weight:700}.w-button-large-label-text-typography,.w-button-large-tertiary-label-text{font-size:20px;font-weight:600;line-height:24px}.w-button-large-tertiary-label-text{color:#1f2224}.w-button-x-small-label-text{font-size:10px;font-weight:600;line-height:10px}.w-button-small-only-label-text{font-size:12px;font-weight:600;line-height:16px}.w-button-large-icon-text{font-size:24px}.w-view-small-label-text{color:#1f2224}.w-view-small-value-text{color:#5f6468}.w-input-no-label-height{height:14px}.w-input-disabled{background-color:#f8f9fa!important;border-color:#e8ebee!important;opacity:.6!important}.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled{height:fit-content}.w-input-small-label-text,.w-input-small-label-disabled{color:#1f2224}.w-input-small-label-disabled{color:#9aa0a7}.w-input-small-label-text-content{padding:12px 8px 8px 0;margin:0}.w-input-small-label-text-content-no-top{padding-top:0}.w-input-small-placeholder-text{color:#1f2224}.w-input-small-placeholder-text-only-color{color:#9aa0a7;line-height:1.3333333333rem}.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text-disabled-only-color{color:#5f6468}.w-input-small-text-icon,.w-input-small-select-options-text{color:#1f2224}.w-input-medium-label-text-typography,.w-input-medium-label-text,.w-input-medium-label-disabled{font-size:14px;font-weight:600;line-height:16px}.w-input-medium-label-text,.w-input-medium-label-disabled{color:#1f2224}.w-input-medium-label-disabled{color:#9aa0a7}.w-input-medium-placeholder-text-typography,.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text{font-size:16px;font-weight:400;line-height:24px}.w-input-medium-placeholder-text,.w-input-medium-placeholder-text-only-color{color:#1f2224}.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text-disabled-only-color{color:#5f6468}.w-input-medium-text-icon{color:#1f2224}.w-input-medium-select-options-text{font-size:16px;font-weight:400;line-height:24px;color:#1f2224}.w-input-success-alert-text{color:#00db5d;padding:8px 8px 0;margin-top:0}.w-input-warning-alert-text,.w-message-note{color:#eeae00;padding:0 4px;margin-top:-2px}.w-input-error-alert-text{color:#e50000;padding:0 4px;margin-top:-2px}.w-input-alert-message-height{height:32px}.w-error-message{color:#e50000;padding:0 4px;margin-top:-2px}.w-message-note{font-weight:600;color:#e2a500}.w-sidebar-title-text,.w-panel-title-text,.w-panel-subtitle-text{color:#1f2224}.w-panel-content{color:#5f6468}.w-tab-text,.w-chip-text{color:#1f2224}.w-badge-text{font-size:10px;font-weight:700;line-height:8px}.w-table-th-text{color:#1f2224}.w-table-td-text{color:#5f6468}.w-table-height{padding:6px 8px 5px}.w-table-no-buttons-height{padding:16px 8px 15px!important}.w-tree-table-height{padding:8px 8px 7px}.w-image-file-uploader-navigators-text{font-size:12px;color:#fff}.grid{margin:0}::ng-deep .p-tooltip,.p-tooltip{filter:0px 0px 1px 0px rgba(0,0,0,.1) inset,1px 1px 5px rgba(0,0,0,.06),1px 1px 1px rgba(0,0,0,.08)}::ng-deep .p-tooltip .p-tooltip-text,.p-tooltip .p-tooltip-text{background:#fff!important;color:#1f2224;padding:12px 16px;max-width:192px;width:max-content;margin-left:3px;pointer-events:none}::ng-deep .p-tooltip.p-tooltip-left,.p-tooltip.p-tooltip-left{margin-right:6px;width:max-content;transform:translate(-6px)}::ng-deep .p-tooltip.p-tooltip-left .p-tooltip-arrow,.p-tooltip.p-tooltip-left .p-tooltip-arrow{border-left-color:#fff!important;top:50%;right:-3px;margin-top:-4px;border-width:4px 0 4px 6px!important}::ng-deep .p-tooltip.p-tooltip-right,.p-tooltip.p-tooltip-right{margin-left:6px;width:max-content;transform:translateY(-1px)}::ng-deep .p-tooltip.p-tooltip-right .p-tooltip-arrow,.p-tooltip.p-tooltip-right .p-tooltip-arrow{border-right-color:#fff!important;top:50%;left:0;margin-top:-4px;border-width:4px 6px 4px 0!important}::ng-deep .p-tooltip.p-tooltip-bottom .p-tooltip-arrow,.p-tooltip.p-tooltip-bottom .p-tooltip-arrow{border-bottom-color:#fff!important;border-width:0 4px 6px 4px!important;margin-top:-3px}:host{display:block}.w-schema-form-secret{display:flex;flex-direction:column;gap:4px}.w-schema-form-secret__entry{display:flex;align-items:center;gap:8px}.w-schema-form-secret__input{flex:1 1 auto;min-width:0}.w-schema-form-secret__status{color:#1f2224;font-weight:600}.w-schema-form-secret__hint{color:#5f6468}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "directive", type: i3.ButtonIcon, selector: "[pButtonIcon]", inputs: ["ptButtonIcon", "pButtonIconPT", "pButtonUnstyled"] }] }); }
|
|
78
95
|
}
|
|
79
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: WSchemaFormSecretFieldComponent, decorators: [{
|
|
80
97
|
type: Component,
|
|
81
98
|
args: [{ selector: 'w-schema-form-secret-field', standalone: true, imports: [ReactiveFormsModule, InputTextModule, ButtonModule], template: "<div class=\"w-schema-form-secret\">\r\n <div class=\"w-schema-form-secret__entry\">\r\n <input\r\n pInputText\r\n class=\"w-schema-form-secret__input\"\r\n [id]=\"id\"\r\n [type]=\"inputType\"\r\n autocomplete=\"new-password\"\r\n spellcheck=\"false\"\r\n [formControl]=\"control\"\r\n [attr.aria-describedby]=\"describedBy\" />\r\n <button\r\n type=\"button\"\r\n pButton\r\n [text]=\"true\"\r\n class=\"w-schema-form-secret__toggle\"\r\n [attr.aria-label]=\"toggleLabel\"\r\n [attr.aria-pressed]=\"visible\"\r\n [attr.aria-controls]=\"id\"\r\n (click)=\"toggleVisibility()\">\r\n <i pButtonIcon class=\"pi\" [class.pi-eye]=\"!visible\" [class.pi-eye-slash]=\"visible\" aria-hidden=\"true\"></i>\r\n </button>\r\n </div>\r\n <small [id]=\"statusId\" class=\"w-schema-form-secret__status\">{{ statusText }}</small>\r\n @if (hint) {\r\n <small [id]=\"hintId\" class=\"w-schema-form-secret__hint\">{{ hint }}</small>\r\n }\r\n</div>\r\n", styles: [".heading1{font-size:2.6666666667rem;line-height:3rem;font-weight:700}.heading2{font-size:2.3333333333rem;line-height:2.6666666667rem;font-weight:700}.heading3{font-size:2rem;line-height:2.3333333333rem;font-weight:700}.heading4{font-size:1.6666666667rem;line-height:2rem;font-weight:700}.heading5,.w-sidebar-title-text{font-size:1.5rem;line-height:1.8333333333rem;font-weight:700}.heading6{font-size:1.3333333333rem;line-height:1.6666666667rem;font-weight:700}.subtitle1,.w-tab-text,.w-panel-title-text{font-size:1.1666666667rem;line-height:1.3333333333rem;font-weight:700}.subtitle2,.w-table-th-text,.w-panel-subtitle-text,.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled,.w-view-small-label-text-typography,.w-view-small-label-text,.w-button-small-text-label-text-typography,.w-button-small-text-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:600}.body,.w-image-file-uploader-navigators-text,.w-table-td-text,.w-chip-text,.w-panel-content,.w-input-small-select-options-text,.w-input-small-placeholder-text-typography,.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text,.w-view-small-value-text-typography,.w-view-small-value-text,.w-button-small-label-text-typography,.w-button-small-tertiary-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:400}.caption,.w-input-success-alert-text{font-size:.6666666667rem;line-height:1rem;font-weight:400}.light,.w-input-small-placeholder-text-only-color{font-size:.9166666667rem;line-height:1.0833333333rem;font-weight:300}.small,.w-schema-form-secret__hint,.w-schema-form-secret__status,.w-error-message,.w-input-error-alert-text,.w-input-warning-alert-text,.w-message-note,.w-button-small-label-text-typography-sm{font-size:.8333333333rem;line-height:1rem;font-weight:400}.textMainColor{color:#1f2224}.textSoftColor{color:#5f6468}.textSofterColor{color:#9aa0a7}.textSoftestColor{color:#e8ebee}.textInverseColor{color:#fff}.spacingXXS{padding:4px}.spacingXSM{padding:6px}.spacingXSMDivider{height:6px}.spacingXS{padding:8px}.spacingS{padding:12px}.spacingM{padding:16px}.spacingL{padding:20px}.spacingXL{padding:24px}.spacingXXL{padding:28px}.spacingXXXL{padding:32px}.panel-title-gap-divider{height:20px}.panel-section-gap-divider{height:32px}.input-vertical-gap-divider{height:24px}.input-label-gap-divider{height:6px}.focusedInput{border:1px solid rgba(0,157,253,.25);box-shadow:0 0 10px #00b3eb40}.focus{box-shadow:0 0 8px #00a6e980}.hover{border-radius:8px;border:1px solid #00b3eb}.hoveredInput{border-radius:8px;border:1px solid rgba(0,179,235,.5)}.input-generic-valid{border-radius:8px;border:1px solid #B3FFD3}.input-generic-valid-focus{border-radius:8px;border:1px solid #B3FFD3!important;box-shadow:0 0 8px #46ff9b80!important;padding-left:16px}.input-generic-warning{border-radius:8px;border:1px solid #FFECB8!important}.input-generic-warning-focus{border-radius:8px;border:1px solid #FFECB8!important;box-shadow:0 0 8px #ffcd4680!important;padding-left:16px}.input-generic-error-focus{border-radius:8px;border:1px solid #FFBDBD!important;box-shadow:0 0 8px #ff555580!important;padding-left:16px}.input-generic-error{border-radius:8px;border:1px solid #FFBDBD}.toggle-small-typography{font-size:12px;line-height:16px;font-weight:600}.w-button-small-label-text-typography,.w-button-small-tertiary-label-text,.w-button-small-label-text-typography-sm{font-weight:600}.w-button-small-tertiary-label-text{color:#5f6468}.w-button-small-text-label-text{color:#1f2224}.w-button-small-icon-text{font-size:12px;font-weight:600}.w-table-button-small-icon-text{font-size:12px;color:#9aa0a7}.w-control-button-small-label-text{font-size:12px;font-weight:600;line-height:16px}.w-control-button-x-small-icon-text{font-size:10px;font-weight:700}.w-control-button-small-icon-text{font-size:8px;font-weight:700}.w-button-medium-label-text-typography,.w-button-medium-tertiary-label-text{font-size:16px;font-weight:600;line-height:16px}.w-button-medium-tertiary-label-text{color:#1f2224}.w-button-medium-icon-text{font-size:16px}.w-control-button-medium-label-text{font-size:14px;font-weight:600;line-height:16px}.w-control-button-medium-icon-text{font-size:12px;font-weight:700}.w-button-large-label-text-typography,.w-button-large-tertiary-label-text{font-size:20px;font-weight:600;line-height:24px}.w-button-large-tertiary-label-text{color:#1f2224}.w-button-x-small-label-text{font-size:10px;font-weight:600;line-height:10px}.w-button-small-only-label-text{font-size:12px;font-weight:600;line-height:16px}.w-button-large-icon-text{font-size:24px}.w-view-small-label-text{color:#1f2224}.w-view-small-value-text{color:#5f6468}.w-input-no-label-height{height:14px}.w-input-disabled{background-color:#f8f9fa!important;border-color:#e8ebee!important;opacity:.6!important}.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled{height:fit-content}.w-input-small-label-text,.w-input-small-label-disabled{color:#1f2224}.w-input-small-label-disabled{color:#9aa0a7}.w-input-small-label-text-content{padding:12px 8px 8px 0;margin:0}.w-input-small-label-text-content-no-top{padding-top:0}.w-input-small-placeholder-text{color:#1f2224}.w-input-small-placeholder-text-only-color{color:#9aa0a7;line-height:1.3333333333rem}.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text-disabled-only-color{color:#5f6468}.w-input-small-text-icon,.w-input-small-select-options-text{color:#1f2224}.w-input-medium-label-text-typography,.w-input-medium-label-text,.w-input-medium-label-disabled{font-size:14px;font-weight:600;line-height:16px}.w-input-medium-label-text,.w-input-medium-label-disabled{color:#1f2224}.w-input-medium-label-disabled{color:#9aa0a7}.w-input-medium-placeholder-text-typography,.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text{font-size:16px;font-weight:400;line-height:24px}.w-input-medium-placeholder-text,.w-input-medium-placeholder-text-only-color{color:#1f2224}.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text-disabled-only-color{color:#5f6468}.w-input-medium-text-icon{color:#1f2224}.w-input-medium-select-options-text{font-size:16px;font-weight:400;line-height:24px;color:#1f2224}.w-input-success-alert-text{color:#00db5d;padding:8px 8px 0;margin-top:0}.w-input-warning-alert-text,.w-message-note{color:#eeae00;padding:0 4px;margin-top:-2px}.w-input-error-alert-text{color:#e50000;padding:0 4px;margin-top:-2px}.w-input-alert-message-height{height:32px}.w-error-message{color:#e50000;padding:0 4px;margin-top:-2px}.w-message-note{font-weight:600;color:#e2a500}.w-sidebar-title-text,.w-panel-title-text,.w-panel-subtitle-text{color:#1f2224}.w-panel-content{color:#5f6468}.w-tab-text,.w-chip-text{color:#1f2224}.w-badge-text{font-size:10px;font-weight:700;line-height:8px}.w-table-th-text{color:#1f2224}.w-table-td-text{color:#5f6468}.w-table-height{padding:6px 8px 5px}.w-table-no-buttons-height{padding:16px 8px 15px!important}.w-tree-table-height{padding:8px 8px 7px}.w-image-file-uploader-navigators-text{font-size:12px;color:#fff}.grid{margin:0}::ng-deep .p-tooltip,.p-tooltip{filter:0px 0px 1px 0px rgba(0,0,0,.1) inset,1px 1px 5px rgba(0,0,0,.06),1px 1px 1px rgba(0,0,0,.08)}::ng-deep .p-tooltip .p-tooltip-text,.p-tooltip .p-tooltip-text{background:#fff!important;color:#1f2224;padding:12px 16px;max-width:192px;width:max-content;margin-left:3px;pointer-events:none}::ng-deep .p-tooltip.p-tooltip-left,.p-tooltip.p-tooltip-left{margin-right:6px;width:max-content;transform:translate(-6px)}::ng-deep .p-tooltip.p-tooltip-left .p-tooltip-arrow,.p-tooltip.p-tooltip-left .p-tooltip-arrow{border-left-color:#fff!important;top:50%;right:-3px;margin-top:-4px;border-width:4px 0 4px 6px!important}::ng-deep .p-tooltip.p-tooltip-right,.p-tooltip.p-tooltip-right{margin-left:6px;width:max-content;transform:translateY(-1px)}::ng-deep .p-tooltip.p-tooltip-right .p-tooltip-arrow,.p-tooltip.p-tooltip-right .p-tooltip-arrow{border-right-color:#fff!important;top:50%;left:0;margin-top:-4px;border-width:4px 6px 4px 0!important}::ng-deep .p-tooltip.p-tooltip-bottom .p-tooltip-arrow,.p-tooltip.p-tooltip-bottom .p-tooltip-arrow{border-bottom-color:#fff!important;border-width:0 4px 6px 4px!important;margin-top:-3px}:host{display:block}.w-schema-form-secret{display:flex;flex-direction:column;gap:4px}.w-schema-form-secret__entry{display:flex;align-items:center;gap:8px}.w-schema-form-secret__input{flex:1 1 auto;min-width:0}.w-schema-form-secret__status{color:#1f2224;font-weight:600}.w-schema-form-secret__hint{color:#5f6468}\n"] }]
|
|
82
99
|
}] });
|
|
83
100
|
|
|
101
|
+
/** Formly type name of the color field (internal to `w-schema-form`). */
|
|
102
|
+
const W_SCHEMA_FORM_COLOR_FIELD_TYPE = 'w-schema-form-color';
|
|
103
|
+
const HEX_COLOR = /^#[0-9A-Fa-f]{6}$/;
|
|
104
|
+
/**
|
|
105
|
+
* Text entry plus PrimeNG color picker for `x-wapping-widget: "color"` string fields (SF-010).
|
|
106
|
+
* Both edit the same control; the picker only follows valid `#rrggbb` values (SFCW-D05).
|
|
107
|
+
*/
|
|
108
|
+
class WSchemaFormColorFieldComponent extends FieldType {
|
|
109
|
+
get pickerValue() {
|
|
110
|
+
const value = this.formControl.value;
|
|
111
|
+
return typeof value === 'string' && HEX_COLOR.test(value) ? value : null;
|
|
112
|
+
}
|
|
113
|
+
onPick(value) {
|
|
114
|
+
if (typeof value !== 'string' || !HEX_COLOR.test(value) || value === this.formControl.value) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
this.formControl.setValue(value);
|
|
118
|
+
this.formControl.markAsDirty();
|
|
119
|
+
this.formControl.markAsTouched();
|
|
120
|
+
}
|
|
121
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: WSchemaFormColorFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
122
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.27", type: WSchemaFormColorFieldComponent, isStandalone: true, selector: "w-schema-form-color-field", usesInheritance: true, ngImport: i0, template: "<div class=\"w-schema-form-color\" [class.w-schema-form-color--empty]=\"!pickerValue\">\r\n <input\r\n pInputText\r\n class=\"w-schema-form-color__input\"\r\n type=\"text\"\r\n spellcheck=\"false\"\r\n autocomplete=\"off\"\r\n [id]=\"id\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\" />\r\n <p-colorpicker\r\n class=\"w-schema-form-color__picker\"\r\n format=\"hex\"\r\n appendTo=\"body\"\r\n [ngModel]=\"pickerValue\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [disabled]=\"formControl.disabled\"\r\n (ngModelChange)=\"onPick($event)\">\r\n </p-colorpicker>\r\n</div>\r\n", styles: [".heading1{font-size:2.6666666667rem;line-height:3rem;font-weight:700}.heading2{font-size:2.3333333333rem;line-height:2.6666666667rem;font-weight:700}.heading3{font-size:2rem;line-height:2.3333333333rem;font-weight:700}.heading4{font-size:1.6666666667rem;line-height:2rem;font-weight:700}.heading5,.w-sidebar-title-text{font-size:1.5rem;line-height:1.8333333333rem;font-weight:700}.heading6{font-size:1.3333333333rem;line-height:1.6666666667rem;font-weight:700}.subtitle1,.w-tab-text,.w-panel-title-text{font-size:1.1666666667rem;line-height:1.3333333333rem;font-weight:700}.subtitle2,.w-table-th-text,.w-panel-subtitle-text,.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled,.w-view-small-label-text-typography,.w-view-small-label-text,.w-button-small-text-label-text-typography,.w-button-small-text-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:600}.body,.w-image-file-uploader-navigators-text,.w-table-td-text,.w-chip-text,.w-panel-content,.w-input-small-select-options-text,.w-input-small-placeholder-text-typography,.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text,.w-view-small-value-text-typography,.w-view-small-value-text,.w-button-small-label-text-typography,.w-button-small-tertiary-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:400}.caption,.w-input-success-alert-text{font-size:.6666666667rem;line-height:1rem;font-weight:400}.light,.w-input-small-placeholder-text-only-color{font-size:.9166666667rem;line-height:1.0833333333rem;font-weight:300}.small,.w-error-message,.w-input-error-alert-text,.w-input-warning-alert-text,.w-message-note,.w-button-small-label-text-typography-sm{font-size:.8333333333rem;line-height:1rem;font-weight:400}.textMainColor{color:#1f2224}.textSoftColor{color:#5f6468}.textSofterColor{color:#9aa0a7}.textSoftestColor{color:#e8ebee}.textInverseColor{color:#fff}.spacingXXS{padding:4px}.spacingXSM{padding:6px}.spacingXSMDivider{height:6px}.spacingXS{padding:8px}.spacingS{padding:12px}.spacingM{padding:16px}.spacingL{padding:20px}.spacingXL{padding:24px}.spacingXXL{padding:28px}.spacingXXXL{padding:32px}.panel-title-gap-divider{height:20px}.panel-section-gap-divider{height:32px}.input-vertical-gap-divider{height:24px}.input-label-gap-divider{height:6px}.focusedInput{border:1px solid rgba(0,157,253,.25);box-shadow:0 0 10px #00b3eb40}.focus{box-shadow:0 0 8px #00a6e980}.hover{border-radius:8px;border:1px solid #00b3eb}.hoveredInput{border-radius:8px;border:1px solid rgba(0,179,235,.5)}.input-generic-valid{border-radius:8px;border:1px solid #B3FFD3}.input-generic-valid-focus{border-radius:8px;border:1px solid #B3FFD3!important;box-shadow:0 0 8px #46ff9b80!important;padding-left:16px}.input-generic-warning{border-radius:8px;border:1px solid #FFECB8!important}.input-generic-warning-focus{border-radius:8px;border:1px solid #FFECB8!important;box-shadow:0 0 8px #ffcd4680!important;padding-left:16px}.input-generic-error-focus{border-radius:8px;border:1px solid #FFBDBD!important;box-shadow:0 0 8px #ff555580!important;padding-left:16px}.input-generic-error{border-radius:8px;border:1px solid #FFBDBD}.toggle-small-typography{font-size:12px;line-height:16px;font-weight:600}.w-button-small-label-text-typography,.w-button-small-tertiary-label-text,.w-button-small-label-text-typography-sm{font-weight:600}.w-button-small-tertiary-label-text{color:#5f6468}.w-button-small-text-label-text{color:#1f2224}.w-button-small-icon-text{font-size:12px;font-weight:600}.w-table-button-small-icon-text{font-size:12px;color:#9aa0a7}.w-control-button-small-label-text{font-size:12px;font-weight:600;line-height:16px}.w-control-button-x-small-icon-text{font-size:10px;font-weight:700}.w-control-button-small-icon-text{font-size:8px;font-weight:700}.w-button-medium-label-text-typography,.w-button-medium-tertiary-label-text{font-size:16px;font-weight:600;line-height:16px}.w-button-medium-tertiary-label-text{color:#1f2224}.w-button-medium-icon-text{font-size:16px}.w-control-button-medium-label-text{font-size:14px;font-weight:600;line-height:16px}.w-control-button-medium-icon-text{font-size:12px;font-weight:700}.w-button-large-label-text-typography,.w-button-large-tertiary-label-text{font-size:20px;font-weight:600;line-height:24px}.w-button-large-tertiary-label-text{color:#1f2224}.w-button-x-small-label-text{font-size:10px;font-weight:600;line-height:10px}.w-button-small-only-label-text{font-size:12px;font-weight:600;line-height:16px}.w-button-large-icon-text{font-size:24px}.w-view-small-label-text{color:#1f2224}.w-view-small-value-text{color:#5f6468}.w-input-no-label-height{height:14px}.w-input-disabled{background-color:#f8f9fa!important;border-color:#e8ebee!important;opacity:.6!important}.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled{height:fit-content}.w-input-small-label-text,.w-input-small-label-disabled{color:#1f2224}.w-input-small-label-disabled{color:#9aa0a7}.w-input-small-label-text-content{padding:12px 8px 8px 0;margin:0}.w-input-small-label-text-content-no-top{padding-top:0}.w-input-small-placeholder-text{color:#1f2224}.w-input-small-placeholder-text-only-color{color:#9aa0a7;line-height:1.3333333333rem}.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text-disabled-only-color{color:#5f6468}.w-input-small-text-icon,.w-input-small-select-options-text{color:#1f2224}.w-input-medium-label-text-typography,.w-input-medium-label-text,.w-input-medium-label-disabled{font-size:14px;font-weight:600;line-height:16px}.w-input-medium-label-text,.w-input-medium-label-disabled{color:#1f2224}.w-input-medium-label-disabled{color:#9aa0a7}.w-input-medium-placeholder-text-typography,.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text{font-size:16px;font-weight:400;line-height:24px}.w-input-medium-placeholder-text,.w-input-medium-placeholder-text-only-color{color:#1f2224}.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text-disabled-only-color{color:#5f6468}.w-input-medium-text-icon{color:#1f2224}.w-input-medium-select-options-text{font-size:16px;font-weight:400;line-height:24px;color:#1f2224}.w-input-success-alert-text{color:#00db5d;padding:8px 8px 0;margin-top:0}.w-input-warning-alert-text,.w-message-note{color:#eeae00;padding:0 4px;margin-top:-2px}.w-input-error-alert-text{color:#e50000;padding:0 4px;margin-top:-2px}.w-input-alert-message-height{height:32px}.w-error-message{color:#e50000;padding:0 4px;margin-top:-2px}.w-message-note{font-weight:600;color:#e2a500}.w-sidebar-title-text,.w-panel-title-text,.w-panel-subtitle-text{color:#1f2224}.w-panel-content{color:#5f6468}.w-tab-text,.w-chip-text{color:#1f2224}.w-badge-text{font-size:10px;font-weight:700;line-height:8px}.w-table-th-text{color:#1f2224}.w-table-td-text{color:#5f6468}.w-table-height{padding:6px 8px 5px}.w-table-no-buttons-height{padding:16px 8px 15px!important}.w-tree-table-height{padding:8px 8px 7px}.w-image-file-uploader-navigators-text{font-size:12px;color:#fff}.grid{margin:0}::ng-deep .p-tooltip,.p-tooltip{filter:0px 0px 1px 0px rgba(0,0,0,.1) inset,1px 1px 5px rgba(0,0,0,.06),1px 1px 1px rgba(0,0,0,.08)}::ng-deep .p-tooltip .p-tooltip-text,.p-tooltip .p-tooltip-text{background:#fff!important;color:#1f2224;padding:12px 16px;max-width:192px;width:max-content;margin-left:3px;pointer-events:none}::ng-deep .p-tooltip.p-tooltip-left,.p-tooltip.p-tooltip-left{margin-right:6px;width:max-content;transform:translate(-6px)}::ng-deep .p-tooltip.p-tooltip-left .p-tooltip-arrow,.p-tooltip.p-tooltip-left .p-tooltip-arrow{border-left-color:#fff!important;top:50%;right:-3px;margin-top:-4px;border-width:4px 0 4px 6px!important}::ng-deep .p-tooltip.p-tooltip-right,.p-tooltip.p-tooltip-right{margin-left:6px;width:max-content;transform:translateY(-1px)}::ng-deep .p-tooltip.p-tooltip-right .p-tooltip-arrow,.p-tooltip.p-tooltip-right .p-tooltip-arrow{border-right-color:#fff!important;top:50%;left:0;margin-top:-4px;border-width:4px 6px 4px 0!important}::ng-deep .p-tooltip.p-tooltip-bottom .p-tooltip-arrow,.p-tooltip.p-tooltip-bottom .p-tooltip-arrow{border-bottom-color:#fff!important;border-width:0 4px 6px 4px!important;margin-top:-3px}:host{display:block}.w-schema-form-color{display:flex;align-items:center;gap:12px}.w-schema-form-color__input{flex:1 1 auto;min-width:0}.w-schema-form-color__picker{flex:0 0 28px}:host ::ng-deep .w-schema-form-color__picker .p-colorpicker-preview{width:28px;height:28px;border:1px solid #e8ebee;border-radius:8px}:host ::ng-deep .w-schema-form-color--empty .w-schema-form-color__picker .p-colorpicker-preview{background:linear-gradient(to top right,transparent calc(50% - 1px),#bdc1c6 50%,transparent calc(50% + 1px)),#fff!important}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i1$1.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: ColorPickerModule }, { kind: "component", type: i4.ColorPicker, selector: "p-colorPicker, p-colorpicker, p-color-picker", inputs: ["styleClass", "showTransitionOptions", "hideTransitionOptions", "inline", "format", "tabindex", "inputId", "autoZIndex", "autofocus", "defaultColor", "appendTo", "overlayOptions", "motionOptions"], outputs: ["onChange", "onShow", "onHide"] }] }); }
|
|
123
|
+
}
|
|
124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: WSchemaFormColorFieldComponent, decorators: [{
|
|
125
|
+
type: Component,
|
|
126
|
+
args: [{ selector: 'w-schema-form-color-field', standalone: true, imports: [ReactiveFormsModule, FormsModule, FormlyModule, InputTextModule, ColorPickerModule], template: "<div class=\"w-schema-form-color\" [class.w-schema-form-color--empty]=\"!pickerValue\">\r\n <input\r\n pInputText\r\n class=\"w-schema-form-color__input\"\r\n type=\"text\"\r\n spellcheck=\"false\"\r\n autocomplete=\"off\"\r\n [id]=\"id\"\r\n [formControl]=\"formControl\"\r\n [formlyAttributes]=\"field\" />\r\n <p-colorpicker\r\n class=\"w-schema-form-color__picker\"\r\n format=\"hex\"\r\n appendTo=\"body\"\r\n [ngModel]=\"pickerValue\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [disabled]=\"formControl.disabled\"\r\n (ngModelChange)=\"onPick($event)\">\r\n </p-colorpicker>\r\n</div>\r\n", styles: [".heading1{font-size:2.6666666667rem;line-height:3rem;font-weight:700}.heading2{font-size:2.3333333333rem;line-height:2.6666666667rem;font-weight:700}.heading3{font-size:2rem;line-height:2.3333333333rem;font-weight:700}.heading4{font-size:1.6666666667rem;line-height:2rem;font-weight:700}.heading5,.w-sidebar-title-text{font-size:1.5rem;line-height:1.8333333333rem;font-weight:700}.heading6{font-size:1.3333333333rem;line-height:1.6666666667rem;font-weight:700}.subtitle1,.w-tab-text,.w-panel-title-text{font-size:1.1666666667rem;line-height:1.3333333333rem;font-weight:700}.subtitle2,.w-table-th-text,.w-panel-subtitle-text,.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled,.w-view-small-label-text-typography,.w-view-small-label-text,.w-button-small-text-label-text-typography,.w-button-small-text-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:600}.body,.w-image-file-uploader-navigators-text,.w-table-td-text,.w-chip-text,.w-panel-content,.w-input-small-select-options-text,.w-input-small-placeholder-text-typography,.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text,.w-view-small-value-text-typography,.w-view-small-value-text,.w-button-small-label-text-typography,.w-button-small-tertiary-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:400}.caption,.w-input-success-alert-text{font-size:.6666666667rem;line-height:1rem;font-weight:400}.light,.w-input-small-placeholder-text-only-color{font-size:.9166666667rem;line-height:1.0833333333rem;font-weight:300}.small,.w-error-message,.w-input-error-alert-text,.w-input-warning-alert-text,.w-message-note,.w-button-small-label-text-typography-sm{font-size:.8333333333rem;line-height:1rem;font-weight:400}.textMainColor{color:#1f2224}.textSoftColor{color:#5f6468}.textSofterColor{color:#9aa0a7}.textSoftestColor{color:#e8ebee}.textInverseColor{color:#fff}.spacingXXS{padding:4px}.spacingXSM{padding:6px}.spacingXSMDivider{height:6px}.spacingXS{padding:8px}.spacingS{padding:12px}.spacingM{padding:16px}.spacingL{padding:20px}.spacingXL{padding:24px}.spacingXXL{padding:28px}.spacingXXXL{padding:32px}.panel-title-gap-divider{height:20px}.panel-section-gap-divider{height:32px}.input-vertical-gap-divider{height:24px}.input-label-gap-divider{height:6px}.focusedInput{border:1px solid rgba(0,157,253,.25);box-shadow:0 0 10px #00b3eb40}.focus{box-shadow:0 0 8px #00a6e980}.hover{border-radius:8px;border:1px solid #00b3eb}.hoveredInput{border-radius:8px;border:1px solid rgba(0,179,235,.5)}.input-generic-valid{border-radius:8px;border:1px solid #B3FFD3}.input-generic-valid-focus{border-radius:8px;border:1px solid #B3FFD3!important;box-shadow:0 0 8px #46ff9b80!important;padding-left:16px}.input-generic-warning{border-radius:8px;border:1px solid #FFECB8!important}.input-generic-warning-focus{border-radius:8px;border:1px solid #FFECB8!important;box-shadow:0 0 8px #ffcd4680!important;padding-left:16px}.input-generic-error-focus{border-radius:8px;border:1px solid #FFBDBD!important;box-shadow:0 0 8px #ff555580!important;padding-left:16px}.input-generic-error{border-radius:8px;border:1px solid #FFBDBD}.toggle-small-typography{font-size:12px;line-height:16px;font-weight:600}.w-button-small-label-text-typography,.w-button-small-tertiary-label-text,.w-button-small-label-text-typography-sm{font-weight:600}.w-button-small-tertiary-label-text{color:#5f6468}.w-button-small-text-label-text{color:#1f2224}.w-button-small-icon-text{font-size:12px;font-weight:600}.w-table-button-small-icon-text{font-size:12px;color:#9aa0a7}.w-control-button-small-label-text{font-size:12px;font-weight:600;line-height:16px}.w-control-button-x-small-icon-text{font-size:10px;font-weight:700}.w-control-button-small-icon-text{font-size:8px;font-weight:700}.w-button-medium-label-text-typography,.w-button-medium-tertiary-label-text{font-size:16px;font-weight:600;line-height:16px}.w-button-medium-tertiary-label-text{color:#1f2224}.w-button-medium-icon-text{font-size:16px}.w-control-button-medium-label-text{font-size:14px;font-weight:600;line-height:16px}.w-control-button-medium-icon-text{font-size:12px;font-weight:700}.w-button-large-label-text-typography,.w-button-large-tertiary-label-text{font-size:20px;font-weight:600;line-height:24px}.w-button-large-tertiary-label-text{color:#1f2224}.w-button-x-small-label-text{font-size:10px;font-weight:600;line-height:10px}.w-button-small-only-label-text{font-size:12px;font-weight:600;line-height:16px}.w-button-large-icon-text{font-size:24px}.w-view-small-label-text{color:#1f2224}.w-view-small-value-text{color:#5f6468}.w-input-no-label-height{height:14px}.w-input-disabled{background-color:#f8f9fa!important;border-color:#e8ebee!important;opacity:.6!important}.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled{height:fit-content}.w-input-small-label-text,.w-input-small-label-disabled{color:#1f2224}.w-input-small-label-disabled{color:#9aa0a7}.w-input-small-label-text-content{padding:12px 8px 8px 0;margin:0}.w-input-small-label-text-content-no-top{padding-top:0}.w-input-small-placeholder-text{color:#1f2224}.w-input-small-placeholder-text-only-color{color:#9aa0a7;line-height:1.3333333333rem}.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text-disabled-only-color{color:#5f6468}.w-input-small-text-icon,.w-input-small-select-options-text{color:#1f2224}.w-input-medium-label-text-typography,.w-input-medium-label-text,.w-input-medium-label-disabled{font-size:14px;font-weight:600;line-height:16px}.w-input-medium-label-text,.w-input-medium-label-disabled{color:#1f2224}.w-input-medium-label-disabled{color:#9aa0a7}.w-input-medium-placeholder-text-typography,.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text{font-size:16px;font-weight:400;line-height:24px}.w-input-medium-placeholder-text,.w-input-medium-placeholder-text-only-color{color:#1f2224}.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text-disabled-only-color{color:#5f6468}.w-input-medium-text-icon{color:#1f2224}.w-input-medium-select-options-text{font-size:16px;font-weight:400;line-height:24px;color:#1f2224}.w-input-success-alert-text{color:#00db5d;padding:8px 8px 0;margin-top:0}.w-input-warning-alert-text,.w-message-note{color:#eeae00;padding:0 4px;margin-top:-2px}.w-input-error-alert-text{color:#e50000;padding:0 4px;margin-top:-2px}.w-input-alert-message-height{height:32px}.w-error-message{color:#e50000;padding:0 4px;margin-top:-2px}.w-message-note{font-weight:600;color:#e2a500}.w-sidebar-title-text,.w-panel-title-text,.w-panel-subtitle-text{color:#1f2224}.w-panel-content{color:#5f6468}.w-tab-text,.w-chip-text{color:#1f2224}.w-badge-text{font-size:10px;font-weight:700;line-height:8px}.w-table-th-text{color:#1f2224}.w-table-td-text{color:#5f6468}.w-table-height{padding:6px 8px 5px}.w-table-no-buttons-height{padding:16px 8px 15px!important}.w-tree-table-height{padding:8px 8px 7px}.w-image-file-uploader-navigators-text{font-size:12px;color:#fff}.grid{margin:0}::ng-deep .p-tooltip,.p-tooltip{filter:0px 0px 1px 0px rgba(0,0,0,.1) inset,1px 1px 5px rgba(0,0,0,.06),1px 1px 1px rgba(0,0,0,.08)}::ng-deep .p-tooltip .p-tooltip-text,.p-tooltip .p-tooltip-text{background:#fff!important;color:#1f2224;padding:12px 16px;max-width:192px;width:max-content;margin-left:3px;pointer-events:none}::ng-deep .p-tooltip.p-tooltip-left,.p-tooltip.p-tooltip-left{margin-right:6px;width:max-content;transform:translate(-6px)}::ng-deep .p-tooltip.p-tooltip-left .p-tooltip-arrow,.p-tooltip.p-tooltip-left .p-tooltip-arrow{border-left-color:#fff!important;top:50%;right:-3px;margin-top:-4px;border-width:4px 0 4px 6px!important}::ng-deep .p-tooltip.p-tooltip-right,.p-tooltip.p-tooltip-right{margin-left:6px;width:max-content;transform:translateY(-1px)}::ng-deep .p-tooltip.p-tooltip-right .p-tooltip-arrow,.p-tooltip.p-tooltip-right .p-tooltip-arrow{border-right-color:#fff!important;top:50%;left:0;margin-top:-4px;border-width:4px 6px 4px 0!important}::ng-deep .p-tooltip.p-tooltip-bottom .p-tooltip-arrow,.p-tooltip.p-tooltip-bottom .p-tooltip-arrow{border-bottom-color:#fff!important;border-width:0 4px 6px 4px!important;margin-top:-3px}:host{display:block}.w-schema-form-color{display:flex;align-items:center;gap:12px}.w-schema-form-color__input{flex:1 1 auto;min-width:0}.w-schema-form-color__picker{flex:0 0 28px}:host ::ng-deep .w-schema-form-color__picker .p-colorpicker-preview{width:28px;height:28px;border:1px solid #e8ebee;border-radius:8px}:host ::ng-deep .w-schema-form-color--empty .w-schema-form-color__picker .p-colorpicker-preview{background:linear-gradient(to top right,transparent calc(50% - 1px),#bdc1c6 50%,transparent calc(50% + 1px)),#fff!important}\n"] }]
|
|
127
|
+
}] });
|
|
128
|
+
|
|
84
129
|
const DRAFT_07_URI = 'http://json-schema.org/draft-07/schema#';
|
|
85
130
|
const DRAFT_2020_12_URI = 'https://json-schema.org/draft/2020-12/schema';
|
|
86
131
|
const SECRET_KEYWORD = 'x-wapping-secret';
|
|
132
|
+
/** Rendering annotation for custom Formly fields. */
|
|
133
|
+
const WIDGET_KEYWORD = 'x-wapping-widget';
|
|
134
|
+
const COLOR_WIDGET = 'color';
|
|
135
|
+
const IMAGE_WIDGET = 'image';
|
|
136
|
+
const REFERENCE_WIDGETS = new Set([
|
|
137
|
+
'menu-item', 'service-program', 'product-list', 'store'
|
|
138
|
+
]);
|
|
139
|
+
const GROUP_KEYWORD = 'x-wapping-group';
|
|
140
|
+
/** SFP-007: groups declared at the root of the schema (key, title, optional description, order). */
|
|
141
|
+
const GROUPS_KEYWORD = 'x-wapping-groups';
|
|
87
142
|
/** Internal Formly prop carrying the JSON Pointer of a property field. */
|
|
88
143
|
const POINTER_PROP = 'wSchemaFormPointer';
|
|
89
144
|
const ALLOWED_KEYWORDS = new Set([
|
|
90
145
|
'$schema', '$id', '$comment', 'title', 'description', 'type', 'properties', 'required',
|
|
91
146
|
'additionalProperties', 'enum', 'const', 'default', 'minimum', 'maximum', 'minLength',
|
|
92
147
|
'maxLength', 'pattern', 'items', 'uniqueItems', '$ref', '$defs', 'definitions', 'readOnly',
|
|
93
|
-
'writeOnly', SECRET_KEYWORD
|
|
148
|
+
'writeOnly', 'oneOf', 'anyOf', SECRET_KEYWORD, WIDGET_KEYWORD, GROUP_KEYWORD, GROUPS_KEYWORD
|
|
94
149
|
]);
|
|
150
|
+
const OPTION_KEYWORDS = new Set(['const', 'title', 'description']);
|
|
151
|
+
const OPTION_LISTS = ['oneOf', 'anyOf'];
|
|
152
|
+
const ROOT_PROPERTY = /^#\/properties\/[^/]+$/;
|
|
153
|
+
const GROUPS = new Set(W_SCHEMA_FORM_GROUPS);
|
|
154
|
+
const GROUP_KEY = /^[a-z][a-zA-Z0-9-]*$/;
|
|
155
|
+
const GROUP_MEMBERS = new Set(['key', 'title', 'description']);
|
|
95
156
|
const SUPPORTED_TYPES = new Set(['object', 'string', 'number', 'integer', 'boolean', 'array']);
|
|
96
157
|
const LOCAL_REFERENCE = /^#\/(\$defs|definitions)\/[^/]+$/;
|
|
97
158
|
/** Configuration problem of the schema or of the inputs. Messages never contain values. */
|
|
@@ -100,6 +161,15 @@ class SchemaFormConfigurationError extends Error {
|
|
|
100
161
|
function isRecord(value) {
|
|
101
162
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
102
163
|
}
|
|
164
|
+
/** SFP-004: options declared as `oneOf`/`anyOf` of `const` (+ optional `title`), shown by title, stored by const. */
|
|
165
|
+
function hasConstOptions(schema) {
|
|
166
|
+
return isRecord(schema) && OPTION_LISTS.some(keyword => isConstOptionList(schema[keyword]));
|
|
167
|
+
}
|
|
168
|
+
function isConstOptionList(value) {
|
|
169
|
+
return Array.isArray(value) && value.length > 0 && value.every(option => isRecord(option) && Object.prototype.hasOwnProperty.call(option, 'const') &&
|
|
170
|
+
Object.keys(option).every(keyword => OPTION_KEYWORDS.has(keyword)) &&
|
|
171
|
+
(option['title'] === undefined || typeof option['title'] === 'string'));
|
|
172
|
+
}
|
|
103
173
|
function escapePointerSegment(segment) {
|
|
104
174
|
return segment.replace(/~/g, '~0').replace(/\//g, '~1');
|
|
105
175
|
}
|
|
@@ -136,11 +206,37 @@ function inspectSchema(schema) {
|
|
|
136
206
|
if (schema.type !== 'object') {
|
|
137
207
|
throw new SchemaFormConfigurationError('The schema root must be an object schema.');
|
|
138
208
|
}
|
|
209
|
+
const groups = readDeclaredGroups(schema);
|
|
139
210
|
const secrets = [];
|
|
140
|
-
visit(schema, '#', '', secrets);
|
|
211
|
+
visit(schema, '#', '', secrets, groups ? new Set(groups.map(group => group.key)) : GROUPS);
|
|
141
212
|
return secrets;
|
|
142
213
|
}
|
|
143
|
-
|
|
214
|
+
/** SFP-007: the declared groups of the root, or undefined when the schema does not declare them. */
|
|
215
|
+
function readDeclaredGroups(schema) {
|
|
216
|
+
if (!(GROUPS_KEYWORD in schema)) {
|
|
217
|
+
return undefined;
|
|
218
|
+
}
|
|
219
|
+
const groups = schema[GROUPS_KEYWORD];
|
|
220
|
+
const keys = new Set();
|
|
221
|
+
const valid = Array.isArray(groups) && groups.length > 0 && groups.every(group => {
|
|
222
|
+
if (!isRecord(group) || !Object.keys(group).every(member => GROUP_MEMBERS.has(member))) {
|
|
223
|
+
return false;
|
|
224
|
+
}
|
|
225
|
+
const { key, title, description } = group;
|
|
226
|
+
if (typeof key !== 'string' || !GROUP_KEY.test(key) || keys.has(key) ||
|
|
227
|
+
typeof title !== 'string' || title.trim() === '' ||
|
|
228
|
+
(description !== undefined && typeof description !== 'string')) {
|
|
229
|
+
return false;
|
|
230
|
+
}
|
|
231
|
+
keys.add(key);
|
|
232
|
+
return true;
|
|
233
|
+
});
|
|
234
|
+
if (!valid) {
|
|
235
|
+
throw new SchemaFormConfigurationError(`${GROUPS_KEYWORD} must be a non-empty list of groups with a unique key, a title and an optional description.`);
|
|
236
|
+
}
|
|
237
|
+
return groups;
|
|
238
|
+
}
|
|
239
|
+
function visit(node, at, instancePath, secrets, groups) {
|
|
144
240
|
if (!isRecord(node)) {
|
|
145
241
|
throw new SchemaFormConfigurationError(`The schema at ${at} must be an object.`);
|
|
146
242
|
}
|
|
@@ -149,6 +245,9 @@ function visit(node, at, instancePath, secrets) {
|
|
|
149
245
|
throw new SchemaFormConfigurationError(`Unsupported keyword "${keyword}" at ${at}.`);
|
|
150
246
|
}
|
|
151
247
|
}
|
|
248
|
+
if (GROUPS_KEYWORD in node && at !== '#') {
|
|
249
|
+
throw new SchemaFormConfigurationError(`${GROUPS_KEYWORD} is supported only at the root, not at ${at}.`);
|
|
250
|
+
}
|
|
152
251
|
const type = node['type'];
|
|
153
252
|
if (type !== undefined && (typeof type !== 'string' || !SUPPORTED_TYPES.has(type))) {
|
|
154
253
|
throw new SchemaFormConfigurationError(`Unsupported type at ${at}; a single supported type is required.`);
|
|
@@ -156,6 +255,12 @@ function visit(node, at, instancePath, secrets) {
|
|
|
156
255
|
if ('additionalProperties' in node && node['additionalProperties'] !== false) {
|
|
157
256
|
throw new SchemaFormConfigurationError(`Only additionalProperties false is supported at ${at}.`);
|
|
158
257
|
}
|
|
258
|
+
for (const keyword of OPTION_LISTS) {
|
|
259
|
+
if (keyword in node && (!isConstOptionList(node[keyword]) || type === 'object' || type === 'array' ||
|
|
260
|
+
'enum' in node || 'properties' in node)) {
|
|
261
|
+
throw new SchemaFormConfigurationError(`${keyword} is supported only as a list of const options of a scalar field at ${at}.`);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
159
264
|
if ('$ref' in node) {
|
|
160
265
|
const reference = node['$ref'];
|
|
161
266
|
if (typeof reference !== 'string' || !LOCAL_REFERENCE.test(reference)) {
|
|
@@ -164,10 +269,11 @@ function visit(node, at, instancePath, secrets) {
|
|
|
164
269
|
}
|
|
165
270
|
if (type === 'array' || 'items' in node || 'uniqueItems' in node) {
|
|
166
271
|
const items = node['items'];
|
|
167
|
-
if (type !== 'array' || node['uniqueItems'] !== true || !isRecord(items) ||
|
|
272
|
+
if (type !== 'array' || node['uniqueItems'] !== true || !isRecord(items) ||
|
|
273
|
+
!(Array.isArray(items['enum']) || hasConstOptions(items))) {
|
|
168
274
|
throw new SchemaFormConfigurationError(`Arrays are supported only with uniqueItems and an items enum at ${at}.`);
|
|
169
275
|
}
|
|
170
|
-
visit(items, `${at}/items`, null, secrets);
|
|
276
|
+
visit(items, `${at}/items`, null, secrets, groups);
|
|
171
277
|
}
|
|
172
278
|
if ('properties' in node) {
|
|
173
279
|
const properties = node['properties'];
|
|
@@ -176,7 +282,7 @@ function visit(node, at, instancePath, secrets) {
|
|
|
176
282
|
}
|
|
177
283
|
for (const [name, child] of Object.entries(properties)) {
|
|
178
284
|
const segment = escapePointerSegment(name);
|
|
179
|
-
visit(child, `${at}/properties/${segment}`, instancePath === null ? null : `${instancePath}/${segment}`, secrets);
|
|
285
|
+
visit(child, `${at}/properties/${segment}`, instancePath === null ? null : `${instancePath}/${segment}`, secrets, groups);
|
|
180
286
|
}
|
|
181
287
|
}
|
|
182
288
|
for (const definitionsKeyword of ['$defs', 'definitions']) {
|
|
@@ -186,7 +292,7 @@ function visit(node, at, instancePath, secrets) {
|
|
|
186
292
|
throw new SchemaFormConfigurationError(`${definitionsKeyword} must be an object at ${at}.`);
|
|
187
293
|
}
|
|
188
294
|
for (const [name, child] of Object.entries(definitions)) {
|
|
189
|
-
visit(child, `${at}/${definitionsKeyword}/${escapePointerSegment(name)}`, null, secrets);
|
|
295
|
+
visit(child, `${at}/${definitionsKeyword}/${escapePointerSegment(name)}`, null, secrets, groups);
|
|
190
296
|
}
|
|
191
297
|
}
|
|
192
298
|
}
|
|
@@ -197,6 +303,20 @@ function visit(node, at, instancePath, secrets) {
|
|
|
197
303
|
}
|
|
198
304
|
secrets.push(instancePath);
|
|
199
305
|
}
|
|
306
|
+
if (WIDGET_KEYWORD in node) {
|
|
307
|
+
const widget = node[WIDGET_KEYWORD];
|
|
308
|
+
const colorOrImage = widget === COLOR_WIDGET || widget === IMAGE_WIDGET;
|
|
309
|
+
const reference = typeof widget === 'string' && REFERENCE_WIDGETS.has(widget);
|
|
310
|
+
if ((!colorOrImage && !reference) ||
|
|
311
|
+
(colorOrImage && type !== 'string') ||
|
|
312
|
+
(reference && type !== 'integer') ||
|
|
313
|
+
'enum' in node || 'const' in node || node['writeOnly'] === true || SECRET_KEYWORD in node) {
|
|
314
|
+
throw new SchemaFormConfigurationError(`${WIDGET_KEYWORD} supports color/image on editable strings and reference selectors on editable integers without enum or const at ${at}.`);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
if (GROUP_KEYWORD in node && (!ROOT_PROPERTY.test(at) || !groups.has(node[GROUP_KEYWORD]))) {
|
|
318
|
+
throw new SchemaFormConfigurationError(`${GROUP_KEYWORD} requires one of ${[...groups].join(', ')} on a direct property of the root at ${at}.`);
|
|
319
|
+
}
|
|
200
320
|
}
|
|
201
321
|
/** Reads the property schema at a JSON Pointer following only `properties`. */
|
|
202
322
|
function readPropertySchema(schema, pointer) {
|
|
@@ -295,56 +415,208 @@ class WSchemaFormFieldWrapperComponent extends FieldWrapper {
|
|
|
295
415
|
get helpId() {
|
|
296
416
|
return `${this.id}-help`;
|
|
297
417
|
}
|
|
298
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
299
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: WSchemaFormFieldWrapperComponent, isStandalone: true, selector: "w-schema-form-field-wrapper", usesInheritance: true, ngImport: i0, template: "<div class=\"w-schema-form-field\">\r\n @if (showLabel || props.description) {\r\n <div class=\"w-schema-form-field__label\">\r\n @if (showLabel) {\r\n <label class=\"w-schema-form-field__label-text\" [for]=\"id\">\r\n {{ props.label }}\r\n @if (props.required && props['hideRequiredMarker'] !== true) {\r\n <span class=\"w-schema-form-field__required\" aria-hidden=\"true\">*</span>\r\n }\r\n </label>\r\n }\r\n @if (props.description) {\r\n <span\r\n class=\"w-schema-form-field__help\"\r\n role=\"img\"\r\n tabindex=\"0\"\r\n [id]=\"helpId\"\r\n [attr.aria-label]=\"props.description\"\r\n [pTooltip]=\"props.description\"\r\n tooltipPosition=\"right\"\r\n tooltipEvent=\"both\">\r\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\r\n <path d=\"M6 0C2.7 0 0 2.7 0 6C0 9.3 2.7 12 6 12C9.3 12 12 9.3 12 6C12 2.7 9.3 0 6 0ZM6 9.75C5.586 9.75 5.25 9.414 5.25 9C5.25 8.586 5.586 8.25 6 8.25C6.414 8.25 6.75 8.586 6.75 9C6.75 9.414 6.414 9.75 6 9.75ZM7.21725 6.069C6.8445 6.38925 6.75 6.49725 6.75 6.75C6.75 7.16475 6.414 7.5 6 7.5C5.586 7.5 5.25 7.16475 5.25 6.75C5.25 5.7795 5.84625 5.268 6.2415 4.92975C6.61425 4.611 6.70875 4.50225 6.70875 4.25025C6.70875 4.113 6.70875 3.75 6.00075 3.75C5.67375 3.768 5.325 3.918 5.05725 4.17075C4.7565 4.45425 4.281 4.44 3.99675 4.14C3.7125 3.8385 3.726 3.36375 4.0275 3.0795C4.554 2.58375 5.24025 2.289 5.96175 2.2515H5.964C7.323 2.2515 8.20875 3.05475 8.20875 4.251C8.20875 5.22075 7.6125 5.73225 7.218 6.06975L7.21725 6.069Z\" />\r\n </svg>\r\n </span>\r\n }\r\n </div>\r\n }\r\n <ng-container #fieldComponent></ng-container>\r\n @if (showError) {\r\n <small class=\"w-schema-form-field__error\">\r\n <formly-validation-message [field]=\"field\"></formly-validation-message>\r\n </small>\r\n }\r\n</div>\r\n", styles: [".heading1{font-size:2.6666666667rem;line-height:3rem;font-weight:700}.heading2{font-size:2.3333333333rem;line-height:2.6666666667rem;font-weight:700}.heading3{font-size:2rem;line-height:2.3333333333rem;font-weight:700}.heading4{font-size:1.6666666667rem;line-height:2rem;font-weight:700}.heading5,.w-sidebar-title-text{font-size:1.5rem;line-height:1.8333333333rem;font-weight:700}.heading6{font-size:1.3333333333rem;line-height:1.6666666667rem;font-weight:700}.subtitle1,.w-tab-text,.w-panel-title-text{font-size:1.1666666667rem;line-height:1.3333333333rem;font-weight:700}.subtitle2,.w-table-th-text,.w-panel-subtitle-text,.w-input-small-label-text-typography,.w-schema-form-field__label-text,.w-input-small-label-text,.w-input-small-label-disabled,.w-view-small-label-text-typography,.w-view-small-label-text,.w-button-small-text-label-text-typography,.w-button-small-text-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:600}.body,.w-image-file-uploader-navigators-text,.w-table-td-text,.w-chip-text,.w-panel-content,.w-input-small-select-options-text,.w-input-small-placeholder-text-typography,.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text,.w-view-small-value-text-typography,.w-view-small-value-text,.w-button-small-label-text-typography,.w-button-small-tertiary-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:400}.caption,.w-input-success-alert-text{font-size:.6666666667rem;line-height:1rem;font-weight:400}.light,.w-input-small-placeholder-text-only-color{font-size:.9166666667rem;line-height:1.0833333333rem;font-weight:300}.small,.w-schema-form-field__error,.w-error-message,.w-input-error-alert-text,.w-input-warning-alert-text,.w-message-note,.w-button-small-label-text-typography-sm{font-size:.8333333333rem;line-height:1rem;font-weight:400}.textMainColor{color:#1f2224}.textSoftColor{color:#5f6468}.textSofterColor{color:#9aa0a7}.textSoftestColor{color:#e8ebee}.textInverseColor{color:#fff}.spacingXXS{padding:4px}.spacingXSM{padding:6px}.spacingXSMDivider{height:6px}.spacingXS{padding:8px}.spacingS{padding:12px}.spacingM{padding:16px}.spacingL{padding:20px}.spacingXL{padding:24px}.spacingXXL{padding:28px}.spacingXXXL{padding:32px}.panel-title-gap-divider{height:20px}.panel-section-gap-divider{height:32px}.input-vertical-gap-divider{height:24px}.input-label-gap-divider{height:6px}.focusedInput{border:1px solid rgba(0,157,253,.25);box-shadow:0 0 10px #00b3eb40}.focus{box-shadow:0 0 8px #00a6e980}.hover{border-radius:8px;border:1px solid #00b3eb}.hoveredInput{border-radius:8px;border:1px solid rgba(0,179,235,.5)}.input-generic-valid{border-radius:8px;border:1px solid #B3FFD3}.input-generic-valid-focus{border-radius:8px;border:1px solid #B3FFD3!important;box-shadow:0 0 8px #46ff9b80!important;padding-left:16px}.input-generic-warning{border-radius:8px;border:1px solid #FFECB8!important}.input-generic-warning-focus{border-radius:8px;border:1px solid #FFECB8!important;box-shadow:0 0 8px #ffcd4680!important;padding-left:16px}.input-generic-error-focus{border-radius:8px;border:1px solid #FFBDBD!important;box-shadow:0 0 8px #ff555580!important;padding-left:16px}.input-generic-error{border-radius:8px;border:1px solid #FFBDBD}.toggle-small-typography{font-size:12px;line-height:16px;font-weight:600}.w-button-small-label-text-typography,.w-button-small-tertiary-label-text,.w-button-small-label-text-typography-sm{font-weight:600}.w-button-small-tertiary-label-text{color:#5f6468}.w-button-small-text-label-text{color:#1f2224}.w-button-small-icon-text{font-size:12px;font-weight:600}.w-table-button-small-icon-text{font-size:12px;color:#9aa0a7}.w-control-button-small-label-text{font-size:12px;font-weight:600;line-height:16px}.w-control-button-x-small-icon-text{font-size:10px;font-weight:700}.w-control-button-small-icon-text{font-size:8px;font-weight:700}.w-button-medium-label-text-typography,.w-button-medium-tertiary-label-text{font-size:16px;font-weight:600;line-height:16px}.w-button-medium-tertiary-label-text{color:#1f2224}.w-button-medium-icon-text{font-size:16px}.w-control-button-medium-label-text{font-size:14px;font-weight:600;line-height:16px}.w-control-button-medium-icon-text{font-size:12px;font-weight:700}.w-button-large-label-text-typography,.w-button-large-tertiary-label-text{font-size:20px;font-weight:600;line-height:24px}.w-button-large-tertiary-label-text{color:#1f2224}.w-button-x-small-label-text{font-size:10px;font-weight:600;line-height:10px}.w-button-small-only-label-text{font-size:12px;font-weight:600;line-height:16px}.w-button-large-icon-text{font-size:24px}.w-view-small-label-text{color:#1f2224}.w-view-small-value-text{color:#5f6468}.w-input-no-label-height{height:14px}.w-input-disabled{background-color:#f8f9fa!important;border-color:#e8ebee!important;opacity:.6!important}.w-input-small-label-text-typography,.w-schema-form-field__label-text,.w-input-small-label-text,.w-input-small-label-disabled{height:fit-content}.w-input-small-label-text,.w-input-small-label-disabled{color:#1f2224}.w-input-small-label-disabled{color:#9aa0a7}.w-input-small-label-text-content{padding:12px 8px 8px 0;margin:0}.w-input-small-label-text-content-no-top{padding-top:0}.w-input-small-placeholder-text{color:#1f2224}.w-input-small-placeholder-text-only-color{color:#9aa0a7;line-height:1.3333333333rem}.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text-disabled-only-color{color:#5f6468}.w-input-small-text-icon,.w-input-small-select-options-text{color:#1f2224}.w-input-medium-label-text-typography,.w-input-medium-label-text,.w-input-medium-label-disabled{font-size:14px;font-weight:600;line-height:16px}.w-input-medium-label-text,.w-input-medium-label-disabled{color:#1f2224}.w-input-medium-label-disabled{color:#9aa0a7}.w-input-medium-placeholder-text-typography,.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text{font-size:16px;font-weight:400;line-height:24px}.w-input-medium-placeholder-text,.w-input-medium-placeholder-text-only-color{color:#1f2224}.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text-disabled-only-color{color:#5f6468}.w-input-medium-text-icon{color:#1f2224}.w-input-medium-select-options-text{font-size:16px;font-weight:400;line-height:24px;color:#1f2224}.w-input-success-alert-text{color:#00db5d;padding:8px 8px 0;margin-top:0}.w-input-warning-alert-text,.w-message-note{color:#eeae00;padding:0 4px;margin-top:-2px}.w-input-error-alert-text{color:#e50000;padding:0 4px;margin-top:-2px}.w-input-alert-message-height{height:32px}.w-error-message{color:#e50000;padding:0 4px;margin-top:-2px}.w-message-note{font-weight:600;color:#e2a500}.w-sidebar-title-text,.w-panel-title-text,.w-panel-subtitle-text{color:#1f2224}.w-panel-content{color:#5f6468}.w-tab-text,.w-chip-text{color:#1f2224}.w-badge-text{font-size:10px;font-weight:700;line-height:8px}.w-table-th-text{color:#1f2224}.w-table-td-text{color:#5f6468}.w-table-height{padding:6px 8px 5px}.w-table-no-buttons-height{padding:16px 8px 15px!important}.w-tree-table-height{padding:8px 8px 7px}.w-image-file-uploader-navigators-text{font-size:12px;color:#fff}.grid{margin:0}::ng-deep .p-tooltip,.p-tooltip{filter:0px 0px 1px 0px rgba(0,0,0,.1) inset,1px 1px 5px rgba(0,0,0,.06),1px 1px 1px rgba(0,0,0,.08)}::ng-deep .p-tooltip .p-tooltip-text,.p-tooltip .p-tooltip-text{background:#fff!important;color:#1f2224;padding:12px 16px;max-width:192px;width:max-content;margin-left:3px;pointer-events:none}::ng-deep .p-tooltip.p-tooltip-left,.p-tooltip.p-tooltip-left{margin-right:6px;width:max-content;transform:translate(-6px)}::ng-deep .p-tooltip.p-tooltip-left .p-tooltip-arrow,.p-tooltip.p-tooltip-left .p-tooltip-arrow{border-left-color:#fff!important;top:50%;right:-3px;margin-top:-4px;border-width:4px 0 4px 6px!important}::ng-deep .p-tooltip.p-tooltip-right,.p-tooltip.p-tooltip-right{margin-left:6px;width:max-content;transform:translateY(-1px)}::ng-deep .p-tooltip.p-tooltip-right .p-tooltip-arrow,.p-tooltip.p-tooltip-right .p-tooltip-arrow{border-right-color:#fff!important;top:50%;left:0;margin-top:-4px;border-width:4px 6px 4px 0!important}::ng-deep .p-tooltip.p-tooltip-bottom .p-tooltip-arrow,.p-tooltip.p-tooltip-bottom .p-tooltip-arrow{border-bottom-color:#fff!important;border-width:0 4px 6px 4px!important;margin-top:-3px}:host{display:block}.w-schema-form-field{display:flex;flex-direction:column;gap:4px}.w-schema-form-field__label{display:flex;align-items:center;gap:6px}.w-schema-form-field__label-text{color:#1f2224}.w-schema-form-field__required{color:#e50000}.w-schema-form-field__help{display:inline-flex;align-items:center;cursor:help}.w-schema-form-field__help path{fill:#9aa0a7}.w-schema-form-field__help:hover path,.w-schema-form-field__help:focus-visible path{fill:#00b3eb}.w-schema-form-field__error{color:#e50000}\n"], dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$1.LegacyFormlyValidationMessage, selector: "formly-validation-message" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }] }); }
|
|
418
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: WSchemaFormFieldWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
419
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.27", type: WSchemaFormFieldWrapperComponent, isStandalone: true, selector: "w-schema-form-field-wrapper", usesInheritance: true, ngImport: i0, template: "<div class=\"w-schema-form-field\">\r\n @if (showLabel || props.description) {\r\n <div class=\"w-schema-form-field__label\">\r\n @if (showLabel) {\r\n <label class=\"w-schema-form-field__label-text\" [for]=\"id\">\r\n {{ props.label }}\r\n @if (props.required && props['hideRequiredMarker'] !== true) {\r\n <span class=\"w-schema-form-field__required\" aria-hidden=\"true\">*</span>\r\n }\r\n </label>\r\n }\r\n @if (props.description) {\r\n <span\r\n class=\"w-schema-form-field__help\"\r\n role=\"img\"\r\n tabindex=\"0\"\r\n [id]=\"helpId\"\r\n [attr.aria-label]=\"props.description\"\r\n [pTooltip]=\"props.description\"\r\n tooltipPosition=\"right\"\r\n tooltipEvent=\"both\">\r\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\r\n <path d=\"M6 0C2.7 0 0 2.7 0 6C0 9.3 2.7 12 6 12C9.3 12 12 9.3 12 6C12 2.7 9.3 0 6 0ZM6 9.75C5.586 9.75 5.25 9.414 5.25 9C5.25 8.586 5.586 8.25 6 8.25C6.414 8.25 6.75 8.586 6.75 9C6.75 9.414 6.414 9.75 6 9.75ZM7.21725 6.069C6.8445 6.38925 6.75 6.49725 6.75 6.75C6.75 7.16475 6.414 7.5 6 7.5C5.586 7.5 5.25 7.16475 5.25 6.75C5.25 5.7795 5.84625 5.268 6.2415 4.92975C6.61425 4.611 6.70875 4.50225 6.70875 4.25025C6.70875 4.113 6.70875 3.75 6.00075 3.75C5.67375 3.768 5.325 3.918 5.05725 4.17075C4.7565 4.45425 4.281 4.44 3.99675 4.14C3.7125 3.8385 3.726 3.36375 4.0275 3.0795C4.554 2.58375 5.24025 2.289 5.96175 2.2515H5.964C7.323 2.2515 8.20875 3.05475 8.20875 4.251C8.20875 5.22075 7.6125 5.73225 7.218 6.06975L7.21725 6.069Z\" />\r\n </svg>\r\n </span>\r\n }\r\n </div>\r\n }\r\n <ng-container #fieldComponent></ng-container>\r\n @if (showError) {\r\n <small class=\"w-schema-form-field__error\">\r\n <formly-validation-message [field]=\"field\"></formly-validation-message>\r\n </small>\r\n }\r\n</div>\r\n", styles: [".heading1{font-size:2.6666666667rem;line-height:3rem;font-weight:700}.heading2{font-size:2.3333333333rem;line-height:2.6666666667rem;font-weight:700}.heading3{font-size:2rem;line-height:2.3333333333rem;font-weight:700}.heading4{font-size:1.6666666667rem;line-height:2rem;font-weight:700}.heading5,.w-sidebar-title-text{font-size:1.5rem;line-height:1.8333333333rem;font-weight:700}.heading6{font-size:1.3333333333rem;line-height:1.6666666667rem;font-weight:700}.subtitle1,.w-tab-text,.w-panel-title-text{font-size:1.1666666667rem;line-height:1.3333333333rem;font-weight:700}.subtitle2,.w-table-th-text,.w-panel-subtitle-text,.w-input-small-label-text-typography,.w-schema-form-field__label-text,.w-input-small-label-text,.w-input-small-label-disabled,.w-view-small-label-text-typography,.w-view-small-label-text,.w-button-small-text-label-text-typography,.w-button-small-text-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:600}.body,.w-image-file-uploader-navigators-text,.w-table-td-text,.w-chip-text,.w-panel-content,.w-input-small-select-options-text,.w-input-small-placeholder-text-typography,.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text,.w-view-small-value-text-typography,.w-view-small-value-text,.w-button-small-label-text-typography,.w-button-small-tertiary-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:400}.caption,.w-input-success-alert-text{font-size:.6666666667rem;line-height:1rem;font-weight:400}.light,.w-input-small-placeholder-text-only-color{font-size:.9166666667rem;line-height:1.0833333333rem;font-weight:300}.small,.w-schema-form-field__error,.w-error-message,.w-input-error-alert-text,.w-input-warning-alert-text,.w-message-note,.w-button-small-label-text-typography-sm{font-size:.8333333333rem;line-height:1rem;font-weight:400}.textMainColor{color:#1f2224}.textSoftColor{color:#5f6468}.textSofterColor{color:#9aa0a7}.textSoftestColor{color:#e8ebee}.textInverseColor{color:#fff}.spacingXXS{padding:4px}.spacingXSM{padding:6px}.spacingXSMDivider{height:6px}.spacingXS{padding:8px}.spacingS{padding:12px}.spacingM{padding:16px}.spacingL{padding:20px}.spacingXL{padding:24px}.spacingXXL{padding:28px}.spacingXXXL{padding:32px}.panel-title-gap-divider{height:20px}.panel-section-gap-divider{height:32px}.input-vertical-gap-divider{height:24px}.input-label-gap-divider{height:6px}.focusedInput{border:1px solid rgba(0,157,253,.25);box-shadow:0 0 10px #00b3eb40}.focus{box-shadow:0 0 8px #00a6e980}.hover{border-radius:8px;border:1px solid #00b3eb}.hoveredInput{border-radius:8px;border:1px solid rgba(0,179,235,.5)}.input-generic-valid{border-radius:8px;border:1px solid #B3FFD3}.input-generic-valid-focus{border-radius:8px;border:1px solid #B3FFD3!important;box-shadow:0 0 8px #46ff9b80!important;padding-left:16px}.input-generic-warning{border-radius:8px;border:1px solid #FFECB8!important}.input-generic-warning-focus{border-radius:8px;border:1px solid #FFECB8!important;box-shadow:0 0 8px #ffcd4680!important;padding-left:16px}.input-generic-error-focus{border-radius:8px;border:1px solid #FFBDBD!important;box-shadow:0 0 8px #ff555580!important;padding-left:16px}.input-generic-error{border-radius:8px;border:1px solid #FFBDBD}.toggle-small-typography{font-size:12px;line-height:16px;font-weight:600}.w-button-small-label-text-typography,.w-button-small-tertiary-label-text,.w-button-small-label-text-typography-sm{font-weight:600}.w-button-small-tertiary-label-text{color:#5f6468}.w-button-small-text-label-text{color:#1f2224}.w-button-small-icon-text{font-size:12px;font-weight:600}.w-table-button-small-icon-text{font-size:12px;color:#9aa0a7}.w-control-button-small-label-text{font-size:12px;font-weight:600;line-height:16px}.w-control-button-x-small-icon-text{font-size:10px;font-weight:700}.w-control-button-small-icon-text{font-size:8px;font-weight:700}.w-button-medium-label-text-typography,.w-button-medium-tertiary-label-text{font-size:16px;font-weight:600;line-height:16px}.w-button-medium-tertiary-label-text{color:#1f2224}.w-button-medium-icon-text{font-size:16px}.w-control-button-medium-label-text{font-size:14px;font-weight:600;line-height:16px}.w-control-button-medium-icon-text{font-size:12px;font-weight:700}.w-button-large-label-text-typography,.w-button-large-tertiary-label-text{font-size:20px;font-weight:600;line-height:24px}.w-button-large-tertiary-label-text{color:#1f2224}.w-button-x-small-label-text{font-size:10px;font-weight:600;line-height:10px}.w-button-small-only-label-text{font-size:12px;font-weight:600;line-height:16px}.w-button-large-icon-text{font-size:24px}.w-view-small-label-text{color:#1f2224}.w-view-small-value-text{color:#5f6468}.w-input-no-label-height{height:14px}.w-input-disabled{background-color:#f8f9fa!important;border-color:#e8ebee!important;opacity:.6!important}.w-input-small-label-text-typography,.w-schema-form-field__label-text,.w-input-small-label-text,.w-input-small-label-disabled{height:fit-content}.w-input-small-label-text,.w-input-small-label-disabled{color:#1f2224}.w-input-small-label-disabled{color:#9aa0a7}.w-input-small-label-text-content{padding:12px 8px 8px 0;margin:0}.w-input-small-label-text-content-no-top{padding-top:0}.w-input-small-placeholder-text{color:#1f2224}.w-input-small-placeholder-text-only-color{color:#9aa0a7;line-height:1.3333333333rem}.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text-disabled-only-color{color:#5f6468}.w-input-small-text-icon,.w-input-small-select-options-text{color:#1f2224}.w-input-medium-label-text-typography,.w-input-medium-label-text,.w-input-medium-label-disabled{font-size:14px;font-weight:600;line-height:16px}.w-input-medium-label-text,.w-input-medium-label-disabled{color:#1f2224}.w-input-medium-label-disabled{color:#9aa0a7}.w-input-medium-placeholder-text-typography,.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text{font-size:16px;font-weight:400;line-height:24px}.w-input-medium-placeholder-text,.w-input-medium-placeholder-text-only-color{color:#1f2224}.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text-disabled-only-color{color:#5f6468}.w-input-medium-text-icon{color:#1f2224}.w-input-medium-select-options-text{font-size:16px;font-weight:400;line-height:24px;color:#1f2224}.w-input-success-alert-text{color:#00db5d;padding:8px 8px 0;margin-top:0}.w-input-warning-alert-text,.w-message-note{color:#eeae00;padding:0 4px;margin-top:-2px}.w-input-error-alert-text{color:#e50000;padding:0 4px;margin-top:-2px}.w-input-alert-message-height{height:32px}.w-error-message{color:#e50000;padding:0 4px;margin-top:-2px}.w-message-note{font-weight:600;color:#e2a500}.w-sidebar-title-text,.w-panel-title-text,.w-panel-subtitle-text{color:#1f2224}.w-panel-content{color:#5f6468}.w-tab-text,.w-chip-text{color:#1f2224}.w-badge-text{font-size:10px;font-weight:700;line-height:8px}.w-table-th-text{color:#1f2224}.w-table-td-text{color:#5f6468}.w-table-height{padding:6px 8px 5px}.w-table-no-buttons-height{padding:16px 8px 15px!important}.w-tree-table-height{padding:8px 8px 7px}.w-image-file-uploader-navigators-text{font-size:12px;color:#fff}.grid{margin:0}::ng-deep .p-tooltip,.p-tooltip{filter:0px 0px 1px 0px rgba(0,0,0,.1) inset,1px 1px 5px rgba(0,0,0,.06),1px 1px 1px rgba(0,0,0,.08)}::ng-deep .p-tooltip .p-tooltip-text,.p-tooltip .p-tooltip-text{background:#fff!important;color:#1f2224;padding:12px 16px;max-width:192px;width:max-content;margin-left:3px;pointer-events:none}::ng-deep .p-tooltip.p-tooltip-left,.p-tooltip.p-tooltip-left{margin-right:6px;width:max-content;transform:translate(-6px)}::ng-deep .p-tooltip.p-tooltip-left .p-tooltip-arrow,.p-tooltip.p-tooltip-left .p-tooltip-arrow{border-left-color:#fff!important;top:50%;right:-3px;margin-top:-4px;border-width:4px 0 4px 6px!important}::ng-deep .p-tooltip.p-tooltip-right,.p-tooltip.p-tooltip-right{margin-left:6px;width:max-content;transform:translateY(-1px)}::ng-deep .p-tooltip.p-tooltip-right .p-tooltip-arrow,.p-tooltip.p-tooltip-right .p-tooltip-arrow{border-right-color:#fff!important;top:50%;left:0;margin-top:-4px;border-width:4px 6px 4px 0!important}::ng-deep .p-tooltip.p-tooltip-bottom .p-tooltip-arrow,.p-tooltip.p-tooltip-bottom .p-tooltip-arrow{border-bottom-color:#fff!important;border-width:0 4px 6px 4px!important;margin-top:-3px}:host{display:block}.w-schema-form-field{display:flex;flex-direction:column;gap:4px;width:100%;min-width:0;max-width:100%}.w-schema-form-field__label{display:flex;align-items:center;gap:6px}.w-schema-form-field__label-text{color:#1f2224}.w-schema-form-field__required{color:#e50000}.w-schema-form-field__help{display:inline-flex;align-items:center;cursor:help}.w-schema-form-field__help path{fill:#9aa0a7}.w-schema-form-field__help:hover path,.w-schema-form-field__help:focus-visible path{fill:#00b3eb}.w-schema-form-field__error{color:#e50000}\n"], dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$1.LegacyFormlyValidationMessage, selector: "formly-validation-message" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }] }); }
|
|
420
|
+
}
|
|
421
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: WSchemaFormFieldWrapperComponent, decorators: [{
|
|
422
|
+
type: Component,
|
|
423
|
+
args: [{ selector: 'w-schema-form-field-wrapper', standalone: true, imports: [FormlyModule, TooltipModule], template: "<div class=\"w-schema-form-field\">\r\n @if (showLabel || props.description) {\r\n <div class=\"w-schema-form-field__label\">\r\n @if (showLabel) {\r\n <label class=\"w-schema-form-field__label-text\" [for]=\"id\">\r\n {{ props.label }}\r\n @if (props.required && props['hideRequiredMarker'] !== true) {\r\n <span class=\"w-schema-form-field__required\" aria-hidden=\"true\">*</span>\r\n }\r\n </label>\r\n }\r\n @if (props.description) {\r\n <span\r\n class=\"w-schema-form-field__help\"\r\n role=\"img\"\r\n tabindex=\"0\"\r\n [id]=\"helpId\"\r\n [attr.aria-label]=\"props.description\"\r\n [pTooltip]=\"props.description\"\r\n tooltipPosition=\"right\"\r\n tooltipEvent=\"both\">\r\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\r\n <path d=\"M6 0C2.7 0 0 2.7 0 6C0 9.3 2.7 12 6 12C9.3 12 12 9.3 12 6C12 2.7 9.3 0 6 0ZM6 9.75C5.586 9.75 5.25 9.414 5.25 9C5.25 8.586 5.586 8.25 6 8.25C6.414 8.25 6.75 8.586 6.75 9C6.75 9.414 6.414 9.75 6 9.75ZM7.21725 6.069C6.8445 6.38925 6.75 6.49725 6.75 6.75C6.75 7.16475 6.414 7.5 6 7.5C5.586 7.5 5.25 7.16475 5.25 6.75C5.25 5.7795 5.84625 5.268 6.2415 4.92975C6.61425 4.611 6.70875 4.50225 6.70875 4.25025C6.70875 4.113 6.70875 3.75 6.00075 3.75C5.67375 3.768 5.325 3.918 5.05725 4.17075C4.7565 4.45425 4.281 4.44 3.99675 4.14C3.7125 3.8385 3.726 3.36375 4.0275 3.0795C4.554 2.58375 5.24025 2.289 5.96175 2.2515H5.964C7.323 2.2515 8.20875 3.05475 8.20875 4.251C8.20875 5.22075 7.6125 5.73225 7.218 6.06975L7.21725 6.069Z\" />\r\n </svg>\r\n </span>\r\n }\r\n </div>\r\n }\r\n <ng-container #fieldComponent></ng-container>\r\n @if (showError) {\r\n <small class=\"w-schema-form-field__error\">\r\n <formly-validation-message [field]=\"field\"></formly-validation-message>\r\n </small>\r\n }\r\n</div>\r\n", styles: [".heading1{font-size:2.6666666667rem;line-height:3rem;font-weight:700}.heading2{font-size:2.3333333333rem;line-height:2.6666666667rem;font-weight:700}.heading3{font-size:2rem;line-height:2.3333333333rem;font-weight:700}.heading4{font-size:1.6666666667rem;line-height:2rem;font-weight:700}.heading5,.w-sidebar-title-text{font-size:1.5rem;line-height:1.8333333333rem;font-weight:700}.heading6{font-size:1.3333333333rem;line-height:1.6666666667rem;font-weight:700}.subtitle1,.w-tab-text,.w-panel-title-text{font-size:1.1666666667rem;line-height:1.3333333333rem;font-weight:700}.subtitle2,.w-table-th-text,.w-panel-subtitle-text,.w-input-small-label-text-typography,.w-schema-form-field__label-text,.w-input-small-label-text,.w-input-small-label-disabled,.w-view-small-label-text-typography,.w-view-small-label-text,.w-button-small-text-label-text-typography,.w-button-small-text-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:600}.body,.w-image-file-uploader-navigators-text,.w-table-td-text,.w-chip-text,.w-panel-content,.w-input-small-select-options-text,.w-input-small-placeholder-text-typography,.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text,.w-view-small-value-text-typography,.w-view-small-value-text,.w-button-small-label-text-typography,.w-button-small-tertiary-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:400}.caption,.w-input-success-alert-text{font-size:.6666666667rem;line-height:1rem;font-weight:400}.light,.w-input-small-placeholder-text-only-color{font-size:.9166666667rem;line-height:1.0833333333rem;font-weight:300}.small,.w-schema-form-field__error,.w-error-message,.w-input-error-alert-text,.w-input-warning-alert-text,.w-message-note,.w-button-small-label-text-typography-sm{font-size:.8333333333rem;line-height:1rem;font-weight:400}.textMainColor{color:#1f2224}.textSoftColor{color:#5f6468}.textSofterColor{color:#9aa0a7}.textSoftestColor{color:#e8ebee}.textInverseColor{color:#fff}.spacingXXS{padding:4px}.spacingXSM{padding:6px}.spacingXSMDivider{height:6px}.spacingXS{padding:8px}.spacingS{padding:12px}.spacingM{padding:16px}.spacingL{padding:20px}.spacingXL{padding:24px}.spacingXXL{padding:28px}.spacingXXXL{padding:32px}.panel-title-gap-divider{height:20px}.panel-section-gap-divider{height:32px}.input-vertical-gap-divider{height:24px}.input-label-gap-divider{height:6px}.focusedInput{border:1px solid rgba(0,157,253,.25);box-shadow:0 0 10px #00b3eb40}.focus{box-shadow:0 0 8px #00a6e980}.hover{border-radius:8px;border:1px solid #00b3eb}.hoveredInput{border-radius:8px;border:1px solid rgba(0,179,235,.5)}.input-generic-valid{border-radius:8px;border:1px solid #B3FFD3}.input-generic-valid-focus{border-radius:8px;border:1px solid #B3FFD3!important;box-shadow:0 0 8px #46ff9b80!important;padding-left:16px}.input-generic-warning{border-radius:8px;border:1px solid #FFECB8!important}.input-generic-warning-focus{border-radius:8px;border:1px solid #FFECB8!important;box-shadow:0 0 8px #ffcd4680!important;padding-left:16px}.input-generic-error-focus{border-radius:8px;border:1px solid #FFBDBD!important;box-shadow:0 0 8px #ff555580!important;padding-left:16px}.input-generic-error{border-radius:8px;border:1px solid #FFBDBD}.toggle-small-typography{font-size:12px;line-height:16px;font-weight:600}.w-button-small-label-text-typography,.w-button-small-tertiary-label-text,.w-button-small-label-text-typography-sm{font-weight:600}.w-button-small-tertiary-label-text{color:#5f6468}.w-button-small-text-label-text{color:#1f2224}.w-button-small-icon-text{font-size:12px;font-weight:600}.w-table-button-small-icon-text{font-size:12px;color:#9aa0a7}.w-control-button-small-label-text{font-size:12px;font-weight:600;line-height:16px}.w-control-button-x-small-icon-text{font-size:10px;font-weight:700}.w-control-button-small-icon-text{font-size:8px;font-weight:700}.w-button-medium-label-text-typography,.w-button-medium-tertiary-label-text{font-size:16px;font-weight:600;line-height:16px}.w-button-medium-tertiary-label-text{color:#1f2224}.w-button-medium-icon-text{font-size:16px}.w-control-button-medium-label-text{font-size:14px;font-weight:600;line-height:16px}.w-control-button-medium-icon-text{font-size:12px;font-weight:700}.w-button-large-label-text-typography,.w-button-large-tertiary-label-text{font-size:20px;font-weight:600;line-height:24px}.w-button-large-tertiary-label-text{color:#1f2224}.w-button-x-small-label-text{font-size:10px;font-weight:600;line-height:10px}.w-button-small-only-label-text{font-size:12px;font-weight:600;line-height:16px}.w-button-large-icon-text{font-size:24px}.w-view-small-label-text{color:#1f2224}.w-view-small-value-text{color:#5f6468}.w-input-no-label-height{height:14px}.w-input-disabled{background-color:#f8f9fa!important;border-color:#e8ebee!important;opacity:.6!important}.w-input-small-label-text-typography,.w-schema-form-field__label-text,.w-input-small-label-text,.w-input-small-label-disabled{height:fit-content}.w-input-small-label-text,.w-input-small-label-disabled{color:#1f2224}.w-input-small-label-disabled{color:#9aa0a7}.w-input-small-label-text-content{padding:12px 8px 8px 0;margin:0}.w-input-small-label-text-content-no-top{padding-top:0}.w-input-small-placeholder-text{color:#1f2224}.w-input-small-placeholder-text-only-color{color:#9aa0a7;line-height:1.3333333333rem}.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text-disabled-only-color{color:#5f6468}.w-input-small-text-icon,.w-input-small-select-options-text{color:#1f2224}.w-input-medium-label-text-typography,.w-input-medium-label-text,.w-input-medium-label-disabled{font-size:14px;font-weight:600;line-height:16px}.w-input-medium-label-text,.w-input-medium-label-disabled{color:#1f2224}.w-input-medium-label-disabled{color:#9aa0a7}.w-input-medium-placeholder-text-typography,.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text{font-size:16px;font-weight:400;line-height:24px}.w-input-medium-placeholder-text,.w-input-medium-placeholder-text-only-color{color:#1f2224}.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text-disabled-only-color{color:#5f6468}.w-input-medium-text-icon{color:#1f2224}.w-input-medium-select-options-text{font-size:16px;font-weight:400;line-height:24px;color:#1f2224}.w-input-success-alert-text{color:#00db5d;padding:8px 8px 0;margin-top:0}.w-input-warning-alert-text,.w-message-note{color:#eeae00;padding:0 4px;margin-top:-2px}.w-input-error-alert-text{color:#e50000;padding:0 4px;margin-top:-2px}.w-input-alert-message-height{height:32px}.w-error-message{color:#e50000;padding:0 4px;margin-top:-2px}.w-message-note{font-weight:600;color:#e2a500}.w-sidebar-title-text,.w-panel-title-text,.w-panel-subtitle-text{color:#1f2224}.w-panel-content{color:#5f6468}.w-tab-text,.w-chip-text{color:#1f2224}.w-badge-text{font-size:10px;font-weight:700;line-height:8px}.w-table-th-text{color:#1f2224}.w-table-td-text{color:#5f6468}.w-table-height{padding:6px 8px 5px}.w-table-no-buttons-height{padding:16px 8px 15px!important}.w-tree-table-height{padding:8px 8px 7px}.w-image-file-uploader-navigators-text{font-size:12px;color:#fff}.grid{margin:0}::ng-deep .p-tooltip,.p-tooltip{filter:0px 0px 1px 0px rgba(0,0,0,.1) inset,1px 1px 5px rgba(0,0,0,.06),1px 1px 1px rgba(0,0,0,.08)}::ng-deep .p-tooltip .p-tooltip-text,.p-tooltip .p-tooltip-text{background:#fff!important;color:#1f2224;padding:12px 16px;max-width:192px;width:max-content;margin-left:3px;pointer-events:none}::ng-deep .p-tooltip.p-tooltip-left,.p-tooltip.p-tooltip-left{margin-right:6px;width:max-content;transform:translate(-6px)}::ng-deep .p-tooltip.p-tooltip-left .p-tooltip-arrow,.p-tooltip.p-tooltip-left .p-tooltip-arrow{border-left-color:#fff!important;top:50%;right:-3px;margin-top:-4px;border-width:4px 0 4px 6px!important}::ng-deep .p-tooltip.p-tooltip-right,.p-tooltip.p-tooltip-right{margin-left:6px;width:max-content;transform:translateY(-1px)}::ng-deep .p-tooltip.p-tooltip-right .p-tooltip-arrow,.p-tooltip.p-tooltip-right .p-tooltip-arrow{border-right-color:#fff!important;top:50%;left:0;margin-top:-4px;border-width:4px 6px 4px 0!important}::ng-deep .p-tooltip.p-tooltip-bottom .p-tooltip-arrow,.p-tooltip.p-tooltip-bottom .p-tooltip-arrow{border-bottom-color:#fff!important;border-width:0 4px 6px 4px!important;margin-top:-3px}:host{display:block}.w-schema-form-field{display:flex;flex-direction:column;gap:4px;width:100%;min-width:0;max-width:100%}.w-schema-form-field__label{display:flex;align-items:center;gap:6px}.w-schema-form-field__label-text{color:#1f2224}.w-schema-form-field__required{color:#e50000}.w-schema-form-field__help{display:inline-flex;align-items:center;cursor:help}.w-schema-form-field__help path{fill:#9aa0a7}.w-schema-form-field__help:hover path,.w-schema-form-field__help:focus-visible path{fill:#00b3eb}.w-schema-form-field__error{color:#e50000}\n"] }]
|
|
424
|
+
}] });
|
|
425
|
+
|
|
426
|
+
/** Formly wrapper name of the `x-wapping-group` presentation groups (internal). */
|
|
427
|
+
const W_SCHEMA_FORM_GROUP_WRAPPER = 'w-schema-form-group';
|
|
428
|
+
/** Class set on the field group rendered inside the wrapper. */
|
|
429
|
+
const W_SCHEMA_FORM_GROUP_FIELDS_CLASS = 'w-schema-form-group__fields';
|
|
430
|
+
/**
|
|
431
|
+
* Presentation group (SFP-001): a `fieldset` with its heading as `legend`. The wrapped field group has no key,
|
|
432
|
+
* so grouping never adds model entries nor changes the JSON Pointers of the fields.
|
|
433
|
+
*/
|
|
434
|
+
class WSchemaFormGroupComponent extends FieldWrapper {
|
|
435
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: WSchemaFormGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
436
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.27", type: WSchemaFormGroupComponent, isStandalone: true, selector: "w-schema-form-group", usesInheritance: true, ngImport: i0, template: "<fieldset class=\"w-schema-form-group\">\r\n <legend class=\"w-schema-form-group__legend\">{{ props.label }}</legend>\r\n @if (props.description) {\r\n <p class=\"w-schema-form-group__description\">{{ props.description }}</p>\r\n }\r\n <ng-container #fieldComponent></ng-container>\r\n</fieldset>\r\n", styles: [".heading1{font-size:2.6666666667rem;line-height:3rem;font-weight:700}.heading2{font-size:2.3333333333rem;line-height:2.6666666667rem;font-weight:700}.heading3{font-size:2rem;line-height:2.3333333333rem;font-weight:700}.heading4{font-size:1.6666666667rem;line-height:2rem;font-weight:700}.heading5,.w-sidebar-title-text{font-size:1.5rem;line-height:1.8333333333rem;font-weight:700}.heading6{font-size:1.3333333333rem;line-height:1.6666666667rem;font-weight:700}.subtitle1,.w-tab-text,.w-panel-title-text,.w-schema-form-group__legend{font-size:1.1666666667rem;line-height:1.3333333333rem;font-weight:700}.subtitle2,.w-table-th-text,.w-panel-subtitle-text,.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled,.w-view-small-label-text-typography,.w-view-small-label-text,.w-button-small-text-label-text-typography,.w-button-small-text-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:600}.body,.w-image-file-uploader-navigators-text,.w-table-td-text,.w-chip-text,.w-panel-content,.w-input-small-select-options-text,.w-input-small-placeholder-text-typography,.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text,.w-view-small-value-text-typography,.w-view-small-value-text,.w-button-small-label-text-typography,.w-button-small-tertiary-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:400}.caption,.w-input-success-alert-text{font-size:.6666666667rem;line-height:1rem;font-weight:400}.light,.w-input-small-placeholder-text-only-color{font-size:.9166666667rem;line-height:1.0833333333rem;font-weight:300}.small,.w-error-message,.w-input-error-alert-text,.w-input-warning-alert-text,.w-message-note,.w-button-small-label-text-typography-sm{font-size:.8333333333rem;line-height:1rem;font-weight:400}.textMainColor{color:#1f2224}.textSoftColor{color:#5f6468}.textSofterColor{color:#9aa0a7}.textSoftestColor{color:#e8ebee}.textInverseColor{color:#fff}.spacingXXS{padding:4px}.spacingXSM{padding:6px}.spacingXSMDivider{height:6px}.spacingXS{padding:8px}.spacingS{padding:12px}.spacingM{padding:16px}.spacingL{padding:20px}.spacingXL{padding:24px}.spacingXXL{padding:28px}.spacingXXXL{padding:32px}.panel-title-gap-divider{height:20px}.panel-section-gap-divider{height:32px}.input-vertical-gap-divider{height:24px}.input-label-gap-divider{height:6px}.focusedInput{border:1px solid rgba(0,157,253,.25);box-shadow:0 0 10px #00b3eb40}.focus{box-shadow:0 0 8px #00a6e980}.hover{border-radius:8px;border:1px solid #00b3eb}.hoveredInput{border-radius:8px;border:1px solid rgba(0,179,235,.5)}.input-generic-valid{border-radius:8px;border:1px solid #B3FFD3}.input-generic-valid-focus{border-radius:8px;border:1px solid #B3FFD3!important;box-shadow:0 0 8px #46ff9b80!important;padding-left:16px}.input-generic-warning{border-radius:8px;border:1px solid #FFECB8!important}.input-generic-warning-focus{border-radius:8px;border:1px solid #FFECB8!important;box-shadow:0 0 8px #ffcd4680!important;padding-left:16px}.input-generic-error-focus{border-radius:8px;border:1px solid #FFBDBD!important;box-shadow:0 0 8px #ff555580!important;padding-left:16px}.input-generic-error{border-radius:8px;border:1px solid #FFBDBD}.toggle-small-typography{font-size:12px;line-height:16px;font-weight:600}.w-button-small-label-text-typography,.w-button-small-tertiary-label-text,.w-button-small-label-text-typography-sm{font-weight:600}.w-button-small-tertiary-label-text{color:#5f6468}.w-button-small-text-label-text{color:#1f2224}.w-button-small-icon-text{font-size:12px;font-weight:600}.w-table-button-small-icon-text{font-size:12px;color:#9aa0a7}.w-control-button-small-label-text{font-size:12px;font-weight:600;line-height:16px}.w-control-button-x-small-icon-text{font-size:10px;font-weight:700}.w-control-button-small-icon-text{font-size:8px;font-weight:700}.w-button-medium-label-text-typography,.w-button-medium-tertiary-label-text{font-size:16px;font-weight:600;line-height:16px}.w-button-medium-tertiary-label-text{color:#1f2224}.w-button-medium-icon-text{font-size:16px}.w-control-button-medium-label-text{font-size:14px;font-weight:600;line-height:16px}.w-control-button-medium-icon-text{font-size:12px;font-weight:700}.w-button-large-label-text-typography,.w-button-large-tertiary-label-text{font-size:20px;font-weight:600;line-height:24px}.w-button-large-tertiary-label-text{color:#1f2224}.w-button-x-small-label-text{font-size:10px;font-weight:600;line-height:10px}.w-button-small-only-label-text{font-size:12px;font-weight:600;line-height:16px}.w-button-large-icon-text{font-size:24px}.w-view-small-label-text{color:#1f2224}.w-view-small-value-text{color:#5f6468}.w-input-no-label-height{height:14px}.w-input-disabled{background-color:#f8f9fa!important;border-color:#e8ebee!important;opacity:.6!important}.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled{height:fit-content}.w-input-small-label-text,.w-input-small-label-disabled{color:#1f2224}.w-input-small-label-disabled{color:#9aa0a7}.w-input-small-label-text-content{padding:12px 8px 8px 0;margin:0}.w-input-small-label-text-content-no-top{padding-top:0}.w-input-small-placeholder-text{color:#1f2224}.w-input-small-placeholder-text-only-color{color:#9aa0a7;line-height:1.3333333333rem}.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text-disabled-only-color{color:#5f6468}.w-input-small-text-icon,.w-input-small-select-options-text{color:#1f2224}.w-input-medium-label-text-typography,.w-input-medium-label-text,.w-input-medium-label-disabled{font-size:14px;font-weight:600;line-height:16px}.w-input-medium-label-text,.w-input-medium-label-disabled{color:#1f2224}.w-input-medium-label-disabled{color:#9aa0a7}.w-input-medium-placeholder-text-typography,.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text{font-size:16px;font-weight:400;line-height:24px}.w-input-medium-placeholder-text,.w-input-medium-placeholder-text-only-color{color:#1f2224}.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text-disabled-only-color{color:#5f6468}.w-input-medium-text-icon{color:#1f2224}.w-input-medium-select-options-text{font-size:16px;font-weight:400;line-height:24px;color:#1f2224}.w-input-success-alert-text{color:#00db5d;padding:8px 8px 0;margin-top:0}.w-input-warning-alert-text,.w-message-note{color:#eeae00;padding:0 4px;margin-top:-2px}.w-input-error-alert-text{color:#e50000;padding:0 4px;margin-top:-2px}.w-input-alert-message-height{height:32px}.w-error-message{color:#e50000;padding:0 4px;margin-top:-2px}.w-message-note{font-weight:600;color:#e2a500}.w-sidebar-title-text,.w-panel-title-text,.w-schema-form-group__legend,.w-panel-subtitle-text{color:#1f2224}.w-panel-content{color:#5f6468}.w-tab-text,.w-chip-text{color:#1f2224}.w-badge-text{font-size:10px;font-weight:700;line-height:8px}.w-table-th-text{color:#1f2224}.w-table-td-text{color:#5f6468}.w-table-height{padding:6px 8px 5px}.w-table-no-buttons-height{padding:16px 8px 15px!important}.w-tree-table-height{padding:8px 8px 7px}.w-image-file-uploader-navigators-text{font-size:12px;color:#fff}.grid{margin:0}::ng-deep .p-tooltip,.p-tooltip{filter:0px 0px 1px 0px rgba(0,0,0,.1) inset,1px 1px 5px rgba(0,0,0,.06),1px 1px 1px rgba(0,0,0,.08)}::ng-deep .p-tooltip .p-tooltip-text,.p-tooltip .p-tooltip-text{background:#fff!important;color:#1f2224;padding:12px 16px;max-width:192px;width:max-content;margin-left:3px;pointer-events:none}::ng-deep .p-tooltip.p-tooltip-left,.p-tooltip.p-tooltip-left{margin-right:6px;width:max-content;transform:translate(-6px)}::ng-deep .p-tooltip.p-tooltip-left .p-tooltip-arrow,.p-tooltip.p-tooltip-left .p-tooltip-arrow{border-left-color:#fff!important;top:50%;right:-3px;margin-top:-4px;border-width:4px 0 4px 6px!important}::ng-deep .p-tooltip.p-tooltip-right,.p-tooltip.p-tooltip-right{margin-left:6px;width:max-content;transform:translateY(-1px)}::ng-deep .p-tooltip.p-tooltip-right .p-tooltip-arrow,.p-tooltip.p-tooltip-right .p-tooltip-arrow{border-right-color:#fff!important;top:50%;left:0;margin-top:-4px;border-width:4px 6px 4px 0!important}::ng-deep .p-tooltip.p-tooltip-bottom .p-tooltip-arrow,.p-tooltip.p-tooltip-bottom .p-tooltip-arrow{border-bottom-color:#fff!important;border-width:0 4px 6px 4px!important;margin-top:-3px}:host{display:block}.w-schema-form-group{margin:0;padding:16px;box-sizing:border-box;width:100%;min-width:0;max-width:100%;border:1px solid #dadce0;border-radius:8px}.w-schema-form-group__legend{padding:0 4px}.w-schema-form-group__description{margin:0 0 12px;color:#9aa0a7}:host ::ng-deep .w-schema-form-group__fields{display:flex;flex-direction:column;gap:20px;width:100%;min-width:0;max-width:100%}\n"] }); }
|
|
437
|
+
}
|
|
438
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: WSchemaFormGroupComponent, decorators: [{
|
|
439
|
+
type: Component,
|
|
440
|
+
args: [{ selector: 'w-schema-form-group', standalone: true, template: "<fieldset class=\"w-schema-form-group\">\r\n <legend class=\"w-schema-form-group__legend\">{{ props.label }}</legend>\r\n @if (props.description) {\r\n <p class=\"w-schema-form-group__description\">{{ props.description }}</p>\r\n }\r\n <ng-container #fieldComponent></ng-container>\r\n</fieldset>\r\n", styles: [".heading1{font-size:2.6666666667rem;line-height:3rem;font-weight:700}.heading2{font-size:2.3333333333rem;line-height:2.6666666667rem;font-weight:700}.heading3{font-size:2rem;line-height:2.3333333333rem;font-weight:700}.heading4{font-size:1.6666666667rem;line-height:2rem;font-weight:700}.heading5,.w-sidebar-title-text{font-size:1.5rem;line-height:1.8333333333rem;font-weight:700}.heading6{font-size:1.3333333333rem;line-height:1.6666666667rem;font-weight:700}.subtitle1,.w-tab-text,.w-panel-title-text,.w-schema-form-group__legend{font-size:1.1666666667rem;line-height:1.3333333333rem;font-weight:700}.subtitle2,.w-table-th-text,.w-panel-subtitle-text,.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled,.w-view-small-label-text-typography,.w-view-small-label-text,.w-button-small-text-label-text-typography,.w-button-small-text-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:600}.body,.w-image-file-uploader-navigators-text,.w-table-td-text,.w-chip-text,.w-panel-content,.w-input-small-select-options-text,.w-input-small-placeholder-text-typography,.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text,.w-view-small-value-text-typography,.w-view-small-value-text,.w-button-small-label-text-typography,.w-button-small-tertiary-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:400}.caption,.w-input-success-alert-text{font-size:.6666666667rem;line-height:1rem;font-weight:400}.light,.w-input-small-placeholder-text-only-color{font-size:.9166666667rem;line-height:1.0833333333rem;font-weight:300}.small,.w-error-message,.w-input-error-alert-text,.w-input-warning-alert-text,.w-message-note,.w-button-small-label-text-typography-sm{font-size:.8333333333rem;line-height:1rem;font-weight:400}.textMainColor{color:#1f2224}.textSoftColor{color:#5f6468}.textSofterColor{color:#9aa0a7}.textSoftestColor{color:#e8ebee}.textInverseColor{color:#fff}.spacingXXS{padding:4px}.spacingXSM{padding:6px}.spacingXSMDivider{height:6px}.spacingXS{padding:8px}.spacingS{padding:12px}.spacingM{padding:16px}.spacingL{padding:20px}.spacingXL{padding:24px}.spacingXXL{padding:28px}.spacingXXXL{padding:32px}.panel-title-gap-divider{height:20px}.panel-section-gap-divider{height:32px}.input-vertical-gap-divider{height:24px}.input-label-gap-divider{height:6px}.focusedInput{border:1px solid rgba(0,157,253,.25);box-shadow:0 0 10px #00b3eb40}.focus{box-shadow:0 0 8px #00a6e980}.hover{border-radius:8px;border:1px solid #00b3eb}.hoveredInput{border-radius:8px;border:1px solid rgba(0,179,235,.5)}.input-generic-valid{border-radius:8px;border:1px solid #B3FFD3}.input-generic-valid-focus{border-radius:8px;border:1px solid #B3FFD3!important;box-shadow:0 0 8px #46ff9b80!important;padding-left:16px}.input-generic-warning{border-radius:8px;border:1px solid #FFECB8!important}.input-generic-warning-focus{border-radius:8px;border:1px solid #FFECB8!important;box-shadow:0 0 8px #ffcd4680!important;padding-left:16px}.input-generic-error-focus{border-radius:8px;border:1px solid #FFBDBD!important;box-shadow:0 0 8px #ff555580!important;padding-left:16px}.input-generic-error{border-radius:8px;border:1px solid #FFBDBD}.toggle-small-typography{font-size:12px;line-height:16px;font-weight:600}.w-button-small-label-text-typography,.w-button-small-tertiary-label-text,.w-button-small-label-text-typography-sm{font-weight:600}.w-button-small-tertiary-label-text{color:#5f6468}.w-button-small-text-label-text{color:#1f2224}.w-button-small-icon-text{font-size:12px;font-weight:600}.w-table-button-small-icon-text{font-size:12px;color:#9aa0a7}.w-control-button-small-label-text{font-size:12px;font-weight:600;line-height:16px}.w-control-button-x-small-icon-text{font-size:10px;font-weight:700}.w-control-button-small-icon-text{font-size:8px;font-weight:700}.w-button-medium-label-text-typography,.w-button-medium-tertiary-label-text{font-size:16px;font-weight:600;line-height:16px}.w-button-medium-tertiary-label-text{color:#1f2224}.w-button-medium-icon-text{font-size:16px}.w-control-button-medium-label-text{font-size:14px;font-weight:600;line-height:16px}.w-control-button-medium-icon-text{font-size:12px;font-weight:700}.w-button-large-label-text-typography,.w-button-large-tertiary-label-text{font-size:20px;font-weight:600;line-height:24px}.w-button-large-tertiary-label-text{color:#1f2224}.w-button-x-small-label-text{font-size:10px;font-weight:600;line-height:10px}.w-button-small-only-label-text{font-size:12px;font-weight:600;line-height:16px}.w-button-large-icon-text{font-size:24px}.w-view-small-label-text{color:#1f2224}.w-view-small-value-text{color:#5f6468}.w-input-no-label-height{height:14px}.w-input-disabled{background-color:#f8f9fa!important;border-color:#e8ebee!important;opacity:.6!important}.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled{height:fit-content}.w-input-small-label-text,.w-input-small-label-disabled{color:#1f2224}.w-input-small-label-disabled{color:#9aa0a7}.w-input-small-label-text-content{padding:12px 8px 8px 0;margin:0}.w-input-small-label-text-content-no-top{padding-top:0}.w-input-small-placeholder-text{color:#1f2224}.w-input-small-placeholder-text-only-color{color:#9aa0a7;line-height:1.3333333333rem}.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text-disabled-only-color{color:#5f6468}.w-input-small-text-icon,.w-input-small-select-options-text{color:#1f2224}.w-input-medium-label-text-typography,.w-input-medium-label-text,.w-input-medium-label-disabled{font-size:14px;font-weight:600;line-height:16px}.w-input-medium-label-text,.w-input-medium-label-disabled{color:#1f2224}.w-input-medium-label-disabled{color:#9aa0a7}.w-input-medium-placeholder-text-typography,.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text{font-size:16px;font-weight:400;line-height:24px}.w-input-medium-placeholder-text,.w-input-medium-placeholder-text-only-color{color:#1f2224}.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text-disabled-only-color{color:#5f6468}.w-input-medium-text-icon{color:#1f2224}.w-input-medium-select-options-text{font-size:16px;font-weight:400;line-height:24px;color:#1f2224}.w-input-success-alert-text{color:#00db5d;padding:8px 8px 0;margin-top:0}.w-input-warning-alert-text,.w-message-note{color:#eeae00;padding:0 4px;margin-top:-2px}.w-input-error-alert-text{color:#e50000;padding:0 4px;margin-top:-2px}.w-input-alert-message-height{height:32px}.w-error-message{color:#e50000;padding:0 4px;margin-top:-2px}.w-message-note{font-weight:600;color:#e2a500}.w-sidebar-title-text,.w-panel-title-text,.w-schema-form-group__legend,.w-panel-subtitle-text{color:#1f2224}.w-panel-content{color:#5f6468}.w-tab-text,.w-chip-text{color:#1f2224}.w-badge-text{font-size:10px;font-weight:700;line-height:8px}.w-table-th-text{color:#1f2224}.w-table-td-text{color:#5f6468}.w-table-height{padding:6px 8px 5px}.w-table-no-buttons-height{padding:16px 8px 15px!important}.w-tree-table-height{padding:8px 8px 7px}.w-image-file-uploader-navigators-text{font-size:12px;color:#fff}.grid{margin:0}::ng-deep .p-tooltip,.p-tooltip{filter:0px 0px 1px 0px rgba(0,0,0,.1) inset,1px 1px 5px rgba(0,0,0,.06),1px 1px 1px rgba(0,0,0,.08)}::ng-deep .p-tooltip .p-tooltip-text,.p-tooltip .p-tooltip-text{background:#fff!important;color:#1f2224;padding:12px 16px;max-width:192px;width:max-content;margin-left:3px;pointer-events:none}::ng-deep .p-tooltip.p-tooltip-left,.p-tooltip.p-tooltip-left{margin-right:6px;width:max-content;transform:translate(-6px)}::ng-deep .p-tooltip.p-tooltip-left .p-tooltip-arrow,.p-tooltip.p-tooltip-left .p-tooltip-arrow{border-left-color:#fff!important;top:50%;right:-3px;margin-top:-4px;border-width:4px 0 4px 6px!important}::ng-deep .p-tooltip.p-tooltip-right,.p-tooltip.p-tooltip-right{margin-left:6px;width:max-content;transform:translateY(-1px)}::ng-deep .p-tooltip.p-tooltip-right .p-tooltip-arrow,.p-tooltip.p-tooltip-right .p-tooltip-arrow{border-right-color:#fff!important;top:50%;left:0;margin-top:-4px;border-width:4px 6px 4px 0!important}::ng-deep .p-tooltip.p-tooltip-bottom .p-tooltip-arrow,.p-tooltip.p-tooltip-bottom .p-tooltip-arrow{border-bottom-color:#fff!important;border-width:0 4px 6px 4px!important;margin-top:-3px}:host{display:block}.w-schema-form-group{margin:0;padding:16px;box-sizing:border-box;width:100%;min-width:0;max-width:100%;border:1px solid #dadce0;border-radius:8px}.w-schema-form-group__legend{padding:0 4px}.w-schema-form-group__description{margin:0 0 12px;color:#9aa0a7}:host ::ng-deep .w-schema-form-group__fields{display:flex;flex-direction:column;gap:20px;width:100%;min-width:0;max-width:100%}\n"] }]
|
|
441
|
+
}] });
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Gives the native control rendered by a Wapping control the accessible name of the field wrapper
|
|
445
|
+
* (`<label for>`), its help and its required state, without changing the public API of the control (SFP-002).
|
|
446
|
+
*/
|
|
447
|
+
function linkNativeControl(input, id, props) {
|
|
448
|
+
if (!input) {
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
input.id = id;
|
|
452
|
+
if (props.description) {
|
|
453
|
+
input.setAttribute('aria-describedby', `${id}-help`);
|
|
454
|
+
}
|
|
455
|
+
if (props.required) {
|
|
456
|
+
input.setAttribute('aria-required', 'true');
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/** Formly type name of `uniqueItems` enum arrays (internal; does not replace the global `select` type). */
|
|
461
|
+
const W_SCHEMA_FORM_MULTISELECT_TYPE = 'w-schema-form-multiselect';
|
|
462
|
+
/**
|
|
463
|
+
* Enum array rendered with the library `w-edit-multiselect` (SFP-002). Options keep their technical value and
|
|
464
|
+
* show the translated label (CM-012); label, help and error come from the field wrapper.
|
|
465
|
+
*/
|
|
466
|
+
class WSchemaFormMultiselectComponent extends FieldType {
|
|
467
|
+
constructor() {
|
|
468
|
+
super(...arguments);
|
|
469
|
+
this.host = inject(ElementRef);
|
|
470
|
+
}
|
|
471
|
+
get selectOptions() {
|
|
472
|
+
return Array.isArray(this.props.options) ? this.props.options : [];
|
|
473
|
+
}
|
|
474
|
+
ngAfterViewInit() {
|
|
475
|
+
linkNativeControl(this.host.nativeElement.querySelector('input[role="combobox"]'), this.id, this.props);
|
|
476
|
+
}
|
|
477
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: WSchemaFormMultiselectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
478
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.27", type: WSchemaFormMultiselectComponent, isStandalone: true, selector: "w-schema-form-multiselect", usesInheritance: true, ngImport: i0, template: "<!-- The wrapper shows the required marker and the validation message: the control does not repeat them. -->\r\n<w-edit-multiselect\r\n [formControl]=\"formControl\"\r\n [showLabel]=\"false\"\r\n [options]=\"selectOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"false\"\r\n [showToggleAll]=\"selectOptions.length >= 2\"\r\n [selectAllLabel]=\"props['selectAllLabel'] ?? ''\"\r\n [placeholder]=\"props.placeholder ?? ''\"\r\n appendTo=\"body\"\r\n requiredErrorDescription=\"\">\r\n</w-edit-multiselect>\r\n", dependencies: [{ kind: "ngmodule", type: WappComponentsModule }, { kind: "component", type: i1$2.WEditMultiselectComponent, selector: "w-edit-multiselect", inputs: ["label", "showLabel", "placeholder", "filter", "filterPlaceholder", "disabled", "optionDisabled", "showPanelDisabled", "loading", "readonly", "required", "size", "options", "optionLabel", "optionValue", "appendTo", "showClear", "showToggleAll", "selectAllLabel", "formControl", "requiredErrorDescription", "removePaddingTop", "tooltip", "tooltipPosition", "allowFooterTemplate"], outputs: ["onChange", "onFilterChange"] }] }); }
|
|
300
479
|
}
|
|
301
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
480
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: WSchemaFormMultiselectComponent, decorators: [{
|
|
302
481
|
type: Component,
|
|
303
|
-
args: [{ selector: 'w-schema-form-field-wrapper', standalone: true, imports: [FormlyModule, TooltipModule], template: "<div class=\"w-schema-form-field\">\r\n @if (showLabel || props.description) {\r\n <div class=\"w-schema-form-field__label\">\r\n @if (showLabel) {\r\n <label class=\"w-schema-form-field__label-text\" [for]=\"id\">\r\n {{ props.label }}\r\n @if (props.required && props['hideRequiredMarker'] !== true) {\r\n <span class=\"w-schema-form-field__required\" aria-hidden=\"true\">*</span>\r\n }\r\n </label>\r\n }\r\n @if (props.description) {\r\n <span\r\n class=\"w-schema-form-field__help\"\r\n role=\"img\"\r\n tabindex=\"0\"\r\n [id]=\"helpId\"\r\n [attr.aria-label]=\"props.description\"\r\n [pTooltip]=\"props.description\"\r\n tooltipPosition=\"right\"\r\n tooltipEvent=\"both\">\r\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\r\n <path d=\"M6 0C2.7 0 0 2.7 0 6C0 9.3 2.7 12 6 12C9.3 12 12 9.3 12 6C12 2.7 9.3 0 6 0ZM6 9.75C5.586 9.75 5.25 9.414 5.25 9C5.25 8.586 5.586 8.25 6 8.25C6.414 8.25 6.75 8.586 6.75 9C6.75 9.414 6.414 9.75 6 9.75ZM7.21725 6.069C6.8445 6.38925 6.75 6.49725 6.75 6.75C6.75 7.16475 6.414 7.5 6 7.5C5.586 7.5 5.25 7.16475 5.25 6.75C5.25 5.7795 5.84625 5.268 6.2415 4.92975C6.61425 4.611 6.70875 4.50225 6.70875 4.25025C6.70875 4.113 6.70875 3.75 6.00075 3.75C5.67375 3.768 5.325 3.918 5.05725 4.17075C4.7565 4.45425 4.281 4.44 3.99675 4.14C3.7125 3.8385 3.726 3.36375 4.0275 3.0795C4.554 2.58375 5.24025 2.289 5.96175 2.2515H5.964C7.323 2.2515 8.20875 3.05475 8.20875 4.251C8.20875 5.22075 7.6125 5.73225 7.218 6.06975L7.21725 6.069Z\" />\r\n </svg>\r\n </span>\r\n }\r\n </div>\r\n }\r\n <ng-container #fieldComponent></ng-container>\r\n @if (showError) {\r\n <small class=\"w-schema-form-field__error\">\r\n <formly-validation-message [field]=\"field\"></formly-validation-message>\r\n </small>\r\n }\r\n</div>\r\n", styles: [".heading1{font-size:2.6666666667rem;line-height:3rem;font-weight:700}.heading2{font-size:2.3333333333rem;line-height:2.6666666667rem;font-weight:700}.heading3{font-size:2rem;line-height:2.3333333333rem;font-weight:700}.heading4{font-size:1.6666666667rem;line-height:2rem;font-weight:700}.heading5,.w-sidebar-title-text{font-size:1.5rem;line-height:1.8333333333rem;font-weight:700}.heading6{font-size:1.3333333333rem;line-height:1.6666666667rem;font-weight:700}.subtitle1,.w-tab-text,.w-panel-title-text{font-size:1.1666666667rem;line-height:1.3333333333rem;font-weight:700}.subtitle2,.w-table-th-text,.w-panel-subtitle-text,.w-input-small-label-text-typography,.w-schema-form-field__label-text,.w-input-small-label-text,.w-input-small-label-disabled,.w-view-small-label-text-typography,.w-view-small-label-text,.w-button-small-text-label-text-typography,.w-button-small-text-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:600}.body,.w-image-file-uploader-navigators-text,.w-table-td-text,.w-chip-text,.w-panel-content,.w-input-small-select-options-text,.w-input-small-placeholder-text-typography,.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text,.w-view-small-value-text-typography,.w-view-small-value-text,.w-button-small-label-text-typography,.w-button-small-tertiary-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:400}.caption,.w-input-success-alert-text{font-size:.6666666667rem;line-height:1rem;font-weight:400}.light,.w-input-small-placeholder-text-only-color{font-size:.9166666667rem;line-height:1.0833333333rem;font-weight:300}.small,.w-schema-form-field__error,.w-error-message,.w-input-error-alert-text,.w-input-warning-alert-text,.w-message-note,.w-button-small-label-text-typography-sm{font-size:.8333333333rem;line-height:1rem;font-weight:400}.textMainColor{color:#1f2224}.textSoftColor{color:#5f6468}.textSofterColor{color:#9aa0a7}.textSoftestColor{color:#e8ebee}.textInverseColor{color:#fff}.spacingXXS{padding:4px}.spacingXSM{padding:6px}.spacingXSMDivider{height:6px}.spacingXS{padding:8px}.spacingS{padding:12px}.spacingM{padding:16px}.spacingL{padding:20px}.spacingXL{padding:24px}.spacingXXL{padding:28px}.spacingXXXL{padding:32px}.panel-title-gap-divider{height:20px}.panel-section-gap-divider{height:32px}.input-vertical-gap-divider{height:24px}.input-label-gap-divider{height:6px}.focusedInput{border:1px solid rgba(0,157,253,.25);box-shadow:0 0 10px #00b3eb40}.focus{box-shadow:0 0 8px #00a6e980}.hover{border-radius:8px;border:1px solid #00b3eb}.hoveredInput{border-radius:8px;border:1px solid rgba(0,179,235,.5)}.input-generic-valid{border-radius:8px;border:1px solid #B3FFD3}.input-generic-valid-focus{border-radius:8px;border:1px solid #B3FFD3!important;box-shadow:0 0 8px #46ff9b80!important;padding-left:16px}.input-generic-warning{border-radius:8px;border:1px solid #FFECB8!important}.input-generic-warning-focus{border-radius:8px;border:1px solid #FFECB8!important;box-shadow:0 0 8px #ffcd4680!important;padding-left:16px}.input-generic-error-focus{border-radius:8px;border:1px solid #FFBDBD!important;box-shadow:0 0 8px #ff555580!important;padding-left:16px}.input-generic-error{border-radius:8px;border:1px solid #FFBDBD}.toggle-small-typography{font-size:12px;line-height:16px;font-weight:600}.w-button-small-label-text-typography,.w-button-small-tertiary-label-text,.w-button-small-label-text-typography-sm{font-weight:600}.w-button-small-tertiary-label-text{color:#5f6468}.w-button-small-text-label-text{color:#1f2224}.w-button-small-icon-text{font-size:12px;font-weight:600}.w-table-button-small-icon-text{font-size:12px;color:#9aa0a7}.w-control-button-small-label-text{font-size:12px;font-weight:600;line-height:16px}.w-control-button-x-small-icon-text{font-size:10px;font-weight:700}.w-control-button-small-icon-text{font-size:8px;font-weight:700}.w-button-medium-label-text-typography,.w-button-medium-tertiary-label-text{font-size:16px;font-weight:600;line-height:16px}.w-button-medium-tertiary-label-text{color:#1f2224}.w-button-medium-icon-text{font-size:16px}.w-control-button-medium-label-text{font-size:14px;font-weight:600;line-height:16px}.w-control-button-medium-icon-text{font-size:12px;font-weight:700}.w-button-large-label-text-typography,.w-button-large-tertiary-label-text{font-size:20px;font-weight:600;line-height:24px}.w-button-large-tertiary-label-text{color:#1f2224}.w-button-x-small-label-text{font-size:10px;font-weight:600;line-height:10px}.w-button-small-only-label-text{font-size:12px;font-weight:600;line-height:16px}.w-button-large-icon-text{font-size:24px}.w-view-small-label-text{color:#1f2224}.w-view-small-value-text{color:#5f6468}.w-input-no-label-height{height:14px}.w-input-disabled{background-color:#f8f9fa!important;border-color:#e8ebee!important;opacity:.6!important}.w-input-small-label-text-typography,.w-schema-form-field__label-text,.w-input-small-label-text,.w-input-small-label-disabled{height:fit-content}.w-input-small-label-text,.w-input-small-label-disabled{color:#1f2224}.w-input-small-label-disabled{color:#9aa0a7}.w-input-small-label-text-content{padding:12px 8px 8px 0;margin:0}.w-input-small-label-text-content-no-top{padding-top:0}.w-input-small-placeholder-text{color:#1f2224}.w-input-small-placeholder-text-only-color{color:#9aa0a7;line-height:1.3333333333rem}.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text-disabled-only-color{color:#5f6468}.w-input-small-text-icon,.w-input-small-select-options-text{color:#1f2224}.w-input-medium-label-text-typography,.w-input-medium-label-text,.w-input-medium-label-disabled{font-size:14px;font-weight:600;line-height:16px}.w-input-medium-label-text,.w-input-medium-label-disabled{color:#1f2224}.w-input-medium-label-disabled{color:#9aa0a7}.w-input-medium-placeholder-text-typography,.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text{font-size:16px;font-weight:400;line-height:24px}.w-input-medium-placeholder-text,.w-input-medium-placeholder-text-only-color{color:#1f2224}.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text-disabled-only-color{color:#5f6468}.w-input-medium-text-icon{color:#1f2224}.w-input-medium-select-options-text{font-size:16px;font-weight:400;line-height:24px;color:#1f2224}.w-input-success-alert-text{color:#00db5d;padding:8px 8px 0;margin-top:0}.w-input-warning-alert-text,.w-message-note{color:#eeae00;padding:0 4px;margin-top:-2px}.w-input-error-alert-text{color:#e50000;padding:0 4px;margin-top:-2px}.w-input-alert-message-height{height:32px}.w-error-message{color:#e50000;padding:0 4px;margin-top:-2px}.w-message-note{font-weight:600;color:#e2a500}.w-sidebar-title-text,.w-panel-title-text,.w-panel-subtitle-text{color:#1f2224}.w-panel-content{color:#5f6468}.w-tab-text,.w-chip-text{color:#1f2224}.w-badge-text{font-size:10px;font-weight:700;line-height:8px}.w-table-th-text{color:#1f2224}.w-table-td-text{color:#5f6468}.w-table-height{padding:6px 8px 5px}.w-table-no-buttons-height{padding:16px 8px 15px!important}.w-tree-table-height{padding:8px 8px 7px}.w-image-file-uploader-navigators-text{font-size:12px;color:#fff}.grid{margin:0}::ng-deep .p-tooltip,.p-tooltip{filter:0px 0px 1px 0px rgba(0,0,0,.1) inset,1px 1px 5px rgba(0,0,0,.06),1px 1px 1px rgba(0,0,0,.08)}::ng-deep .p-tooltip .p-tooltip-text,.p-tooltip .p-tooltip-text{background:#fff!important;color:#1f2224;padding:12px 16px;max-width:192px;width:max-content;margin-left:3px;pointer-events:none}::ng-deep .p-tooltip.p-tooltip-left,.p-tooltip.p-tooltip-left{margin-right:6px;width:max-content;transform:translate(-6px)}::ng-deep .p-tooltip.p-tooltip-left .p-tooltip-arrow,.p-tooltip.p-tooltip-left .p-tooltip-arrow{border-left-color:#fff!important;top:50%;right:-3px;margin-top:-4px;border-width:4px 0 4px 6px!important}::ng-deep .p-tooltip.p-tooltip-right,.p-tooltip.p-tooltip-right{margin-left:6px;width:max-content;transform:translateY(-1px)}::ng-deep .p-tooltip.p-tooltip-right .p-tooltip-arrow,.p-tooltip.p-tooltip-right .p-tooltip-arrow{border-right-color:#fff!important;top:50%;left:0;margin-top:-4px;border-width:4px 6px 4px 0!important}::ng-deep .p-tooltip.p-tooltip-bottom .p-tooltip-arrow,.p-tooltip.p-tooltip-bottom .p-tooltip-arrow{border-bottom-color:#fff!important;border-width:0 4px 6px 4px!important;margin-top:-3px}:host{display:block}.w-schema-form-field{display:flex;flex-direction:column;gap:4px}.w-schema-form-field__label{display:flex;align-items:center;gap:6px}.w-schema-form-field__label-text{color:#1f2224}.w-schema-form-field__required{color:#e50000}.w-schema-form-field__help{display:inline-flex;align-items:center;cursor:help}.w-schema-form-field__help path{fill:#9aa0a7}.w-schema-form-field__help:hover path,.w-schema-form-field__help:focus-visible path{fill:#00b3eb}.w-schema-form-field__error{color:#e50000}\n"] }]
|
|
482
|
+
args: [{ selector: 'w-schema-form-multiselect', standalone: true, imports: [WappComponentsModule], template: "<!-- The wrapper shows the required marker and the validation message: the control does not repeat them. -->\r\n<w-edit-multiselect\r\n [formControl]=\"formControl\"\r\n [showLabel]=\"false\"\r\n [options]=\"selectOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"false\"\r\n [showToggleAll]=\"selectOptions.length >= 2\"\r\n [selectAllLabel]=\"props['selectAllLabel'] ?? ''\"\r\n [placeholder]=\"props.placeholder ?? ''\"\r\n appendTo=\"body\"\r\n requiredErrorDescription=\"\">\r\n</w-edit-multiselect>\r\n" }]
|
|
304
483
|
}] });
|
|
305
484
|
|
|
485
|
+
/** Formly type name of boolean fields (internal; does not replace the global `checkbox`/`boolean` types). */
|
|
486
|
+
const W_SCHEMA_FORM_TOGGLE_TYPE = 'w-schema-form-toggle';
|
|
487
|
+
/** Field prop with the boolean schema `default`, shown while the value is absent but never materialized. */
|
|
488
|
+
const W_SCHEMA_FORM_TOGGLE_DEFAULT_PROP = 'schemaDefault';
|
|
489
|
+
/**
|
|
490
|
+
* Boolean field rendered with the library `w-edit-toggle` (SFP-002). Label, help and error come from the
|
|
491
|
+
* field wrapper; an absent value is not materialized as `false` (nor as the schema default) until the user
|
|
492
|
+
* changes the toggle. While absent, the switch shows the effective value: the schema `default`, or off.
|
|
493
|
+
*/
|
|
494
|
+
class WSchemaFormToggleComponent extends FieldType {
|
|
495
|
+
constructor() {
|
|
496
|
+
super();
|
|
497
|
+
// `w-edit-toggle` renders its own label only when `label` is defined; the wrapper already renders it.
|
|
498
|
+
this.noLabel = undefined;
|
|
499
|
+
this.displayControl = new FormControl(false, { nonNullable: true });
|
|
500
|
+
this.host = inject(ElementRef);
|
|
501
|
+
this.displayControl.valueChanges.pipe(takeUntilDestroyed()).subscribe(value => {
|
|
502
|
+
const control = this.formControl;
|
|
503
|
+
if (control && control.value !== value) {
|
|
504
|
+
control.setValue(value);
|
|
505
|
+
control.markAsDirty();
|
|
506
|
+
control.markAsTouched();
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
ngDoCheck() {
|
|
511
|
+
const control = this.field?.formControl;
|
|
512
|
+
if (!control) {
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
const value = control.value;
|
|
516
|
+
const effective = typeof value === 'boolean' ? value : this.props[W_SCHEMA_FORM_TOGGLE_DEFAULT_PROP] === true;
|
|
517
|
+
if (this.displayControl.value !== effective) {
|
|
518
|
+
this.displayControl.setValue(effective, { emitEvent: false });
|
|
519
|
+
}
|
|
520
|
+
if (control.disabled !== this.displayControl.disabled) {
|
|
521
|
+
if (control.disabled) {
|
|
522
|
+
this.displayControl.disable({ emitEvent: false });
|
|
523
|
+
}
|
|
524
|
+
else {
|
|
525
|
+
this.displayControl.enable({ emitEvent: false });
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
ngAfterViewInit() {
|
|
530
|
+
linkNativeControl(this.host.nativeElement.querySelector('input[role="switch"]'), this.id, this.props);
|
|
531
|
+
}
|
|
532
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: WSchemaFormToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
533
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.27", type: WSchemaFormToggleComponent, isStandalone: true, selector: "w-schema-form-toggle", usesInheritance: true, ngImport: i0, template: '<w-edit-toggle [formControl]="displayControl" [label]="noLabel"></w-edit-toggle>', isInline: true, dependencies: [{ kind: "ngmodule", type: WappComponentsModule }, { kind: "component", type: i1$2.WEditToggleComponent, selector: "w-edit-toggle", inputs: ["label", "disabled", "isRequired", "size", "hasAlign", "tooltip", "tooltipPosition", "formControl"], outputs: ["toggleState"] }] }); }
|
|
534
|
+
}
|
|
535
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: WSchemaFormToggleComponent, decorators: [{
|
|
536
|
+
type: Component,
|
|
537
|
+
args: [{
|
|
538
|
+
selector: 'w-schema-form-toggle',
|
|
539
|
+
standalone: true,
|
|
540
|
+
imports: [WappComponentsModule],
|
|
541
|
+
template: '<w-edit-toggle [formControl]="displayControl" [label]="noLabel"></w-edit-toggle>'
|
|
542
|
+
}]
|
|
543
|
+
}], ctorParameters: () => [] });
|
|
544
|
+
|
|
306
545
|
/**
|
|
307
|
-
* Registers the internal
|
|
546
|
+
* Registers the internal field types and wrappers with the same mechanism used by
|
|
308
547
|
* @ngx-formly/primeng (`FormlyModule.forChild`). Formly adds them to the root `FormlyConfig` of the consumer
|
|
309
548
|
* application (see the entry point README); the names are prefixed to avoid collisions.
|
|
310
549
|
*/
|
|
311
550
|
class WSchemaFormFieldTypesModule {
|
|
312
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
313
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.
|
|
314
|
-
|
|
315
|
-
|
|
551
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: WSchemaFormFieldTypesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
552
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.27", ngImport: i0, type: WSchemaFormFieldTypesModule, imports: [WSchemaFormSecretFieldComponent,
|
|
553
|
+
WSchemaFormColorFieldComponent,
|
|
554
|
+
WSchemaFormFieldWrapperComponent,
|
|
555
|
+
WSchemaFormGroupComponent,
|
|
556
|
+
WSchemaFormToggleComponent,
|
|
557
|
+
WSchemaFormMultiselectComponent, i1$1.FormlyModule] }); }
|
|
558
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: WSchemaFormFieldTypesModule, imports: [WSchemaFormSecretFieldComponent,
|
|
559
|
+
WSchemaFormColorFieldComponent,
|
|
316
560
|
WSchemaFormFieldWrapperComponent,
|
|
561
|
+
WSchemaFormToggleComponent,
|
|
562
|
+
WSchemaFormMultiselectComponent,
|
|
317
563
|
FormlyModule.forChild({
|
|
318
|
-
wrappers: [
|
|
564
|
+
wrappers: [
|
|
565
|
+
{ name: W_SCHEMA_FORM_FIELD_WRAPPER, component: WSchemaFormFieldWrapperComponent },
|
|
566
|
+
{ name: W_SCHEMA_FORM_GROUP_WRAPPER, component: WSchemaFormGroupComponent }
|
|
567
|
+
],
|
|
319
568
|
types: [
|
|
320
569
|
{
|
|
321
570
|
name: W_SCHEMA_FORM_SECRET_FIELD_TYPE,
|
|
322
571
|
component: WSchemaFormSecretFieldComponent,
|
|
323
572
|
wrappers: [W_SCHEMA_FORM_FIELD_WRAPPER]
|
|
324
|
-
}
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
name: W_SCHEMA_FORM_COLOR_FIELD_TYPE,
|
|
576
|
+
component: WSchemaFormColorFieldComponent,
|
|
577
|
+
wrappers: [W_SCHEMA_FORM_FIELD_WRAPPER]
|
|
578
|
+
},
|
|
579
|
+
{ name: W_SCHEMA_FORM_TOGGLE_TYPE, component: WSchemaFormToggleComponent },
|
|
580
|
+
{ name: W_SCHEMA_FORM_MULTISELECT_TYPE, component: WSchemaFormMultiselectComponent }
|
|
325
581
|
]
|
|
326
582
|
})] }); }
|
|
327
583
|
}
|
|
328
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
584
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: WSchemaFormFieldTypesModule, decorators: [{
|
|
329
585
|
type: NgModule,
|
|
330
586
|
args: [{
|
|
331
587
|
imports: [
|
|
332
588
|
WSchemaFormSecretFieldComponent,
|
|
589
|
+
WSchemaFormColorFieldComponent,
|
|
333
590
|
WSchemaFormFieldWrapperComponent,
|
|
591
|
+
WSchemaFormGroupComponent,
|
|
592
|
+
WSchemaFormToggleComponent,
|
|
593
|
+
WSchemaFormMultiselectComponent,
|
|
334
594
|
FormlyModule.forChild({
|
|
335
|
-
wrappers: [
|
|
595
|
+
wrappers: [
|
|
596
|
+
{ name: W_SCHEMA_FORM_FIELD_WRAPPER, component: WSchemaFormFieldWrapperComponent },
|
|
597
|
+
{ name: W_SCHEMA_FORM_GROUP_WRAPPER, component: WSchemaFormGroupComponent }
|
|
598
|
+
],
|
|
336
599
|
types: [
|
|
337
600
|
{
|
|
338
601
|
name: W_SCHEMA_FORM_SECRET_FIELD_TYPE,
|
|
339
602
|
component: WSchemaFormSecretFieldComponent,
|
|
340
603
|
wrappers: [W_SCHEMA_FORM_FIELD_WRAPPER]
|
|
341
|
-
}
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
name: W_SCHEMA_FORM_COLOR_FIELD_TYPE,
|
|
607
|
+
component: WSchemaFormColorFieldComponent,
|
|
608
|
+
wrappers: [W_SCHEMA_FORM_FIELD_WRAPPER]
|
|
609
|
+
},
|
|
610
|
+
{ name: W_SCHEMA_FORM_TOGGLE_TYPE, component: WSchemaFormToggleComponent },
|
|
611
|
+
{ name: W_SCHEMA_FORM_MULTISELECT_TYPE, component: WSchemaFormMultiselectComponent }
|
|
342
612
|
]
|
|
343
613
|
})
|
|
344
614
|
]
|
|
345
615
|
}]
|
|
346
616
|
}] });
|
|
347
617
|
|
|
618
|
+
/** Formly type registered by a consumer that provides image upload integration. */
|
|
619
|
+
const W_SCHEMA_FORM_IMAGE_FIELD_TYPE = 'w-schema-form-image';
|
|
348
620
|
/**
|
|
349
621
|
* JSON Schema form (CM-007). Emits the public configuration and the secret replacements separately and
|
|
350
622
|
* never preloads, stores or reports secret values (SF-001..SF-009).
|
|
@@ -355,8 +627,13 @@ class WSchemaFormComponent {
|
|
|
355
627
|
this.values = null;
|
|
356
628
|
this.secretStates = [];
|
|
357
629
|
this.translations = W_SCHEMA_FORM_DEFAULT_TRANSLATIONS;
|
|
630
|
+
this.imageUpload = null;
|
|
631
|
+
/** Options are supplied by the consuming application and scoped to the current business. */
|
|
632
|
+
this.referenceOptions = {};
|
|
358
633
|
this.stateChange = new EventEmitter();
|
|
359
634
|
this.validSubmit = new EventEmitter();
|
|
635
|
+
/** Copy of the public configuration after each user edit (HP-001); never secrets or materialized defaults. */
|
|
636
|
+
this.valueChange = new EventEmitter();
|
|
360
637
|
// Internal rendering state: consumers observe `stateChange` and `validSubmit` only.
|
|
361
638
|
this.form = new FormGroup({});
|
|
362
639
|
this.fields = [];
|
|
@@ -367,10 +644,16 @@ class WSchemaFormComponent {
|
|
|
367
644
|
this.formlyJsonschema = inject(FormlyJsonschema);
|
|
368
645
|
this.secrets = [];
|
|
369
646
|
this.secretSubscriptions = new Subscription();
|
|
647
|
+
this.lastEmittedPublicValues = '';
|
|
370
648
|
}
|
|
371
649
|
ngOnChanges() {
|
|
372
650
|
this.reset();
|
|
373
|
-
|
|
651
|
+
const translations = this.translations ?? {};
|
|
652
|
+
this.texts = {
|
|
653
|
+
...W_SCHEMA_FORM_DEFAULT_TRANSLATIONS,
|
|
654
|
+
...translations,
|
|
655
|
+
groups: { ...W_SCHEMA_FORM_DEFAULT_TRANSLATIONS.groups, ...translations.groups }
|
|
656
|
+
};
|
|
374
657
|
const secretStates = this.secretStates ?? [];
|
|
375
658
|
if (!this.schema || this.schema.type !== 'object' ||
|
|
376
659
|
!this.values || typeof this.values !== 'object' || Array.isArray(this.values)) {
|
|
@@ -391,11 +674,21 @@ class WSchemaFormComponent {
|
|
|
391
674
|
validator: ajv.compile(structuredClone(readPropertySchema(schema, path)))
|
|
392
675
|
}));
|
|
393
676
|
this.model = structuredClone(this.values);
|
|
677
|
+
this.lastEmittedPublicValues = JSON.stringify(this.model) ?? '';
|
|
678
|
+
const groups = new Map();
|
|
394
679
|
const root = this.formlyJsonschema.toFieldConfig(annotatePointers(schema), {
|
|
395
680
|
ignoreImplicitStringDefaults: true,
|
|
396
|
-
map: (field, source) =>
|
|
681
|
+
map: (field, source) => {
|
|
682
|
+
const mapped = this.mapField(field, source);
|
|
683
|
+
const group = source[GROUP_KEYWORD];
|
|
684
|
+
if (typeof group === 'string') {
|
|
685
|
+
// inspectSchema accepts the annotation only on direct properties of the root.
|
|
686
|
+
groups.set(mapped, group);
|
|
687
|
+
}
|
|
688
|
+
return mapped;
|
|
689
|
+
}
|
|
397
690
|
});
|
|
398
|
-
this.fields = root.fieldGroup ?? [];
|
|
691
|
+
this.fields = this.groupFields(root.fieldGroup ?? [], groups, readDeclaredGroups(schema));
|
|
399
692
|
}
|
|
400
693
|
catch (error) {
|
|
401
694
|
this.reset();
|
|
@@ -413,6 +706,7 @@ class WSchemaFormComponent {
|
|
|
413
706
|
onModelChange(model) {
|
|
414
707
|
this.model = model;
|
|
415
708
|
this.validate();
|
|
709
|
+
this.emitPublicValues();
|
|
416
710
|
}
|
|
417
711
|
submit() {
|
|
418
712
|
this.form.markAllAsTouched();
|
|
@@ -456,6 +750,16 @@ class WSchemaFormComponent {
|
|
|
456
750
|
};
|
|
457
751
|
this.stateChange.emit(this.state);
|
|
458
752
|
}
|
|
753
|
+
emitPublicValues() {
|
|
754
|
+
const configuration = structuredClone(this.model);
|
|
755
|
+
const serialized = JSON.stringify(configuration);
|
|
756
|
+
// Formly can report the same model more than once per edit; consumers only see real changes.
|
|
757
|
+
if (serialized === undefined || serialized === this.lastEmittedPublicValues) {
|
|
758
|
+
return;
|
|
759
|
+
}
|
|
760
|
+
this.lastEmittedPublicValues = serialized;
|
|
761
|
+
this.valueChange.emit(configuration);
|
|
762
|
+
}
|
|
459
763
|
fail(message) {
|
|
460
764
|
this.state = {
|
|
461
765
|
status: 'error',
|
|
@@ -500,6 +804,10 @@ class WSchemaFormComponent {
|
|
|
500
804
|
const override = this.texts.fields?.[pointer];
|
|
501
805
|
props.label = override?.label ?? props.label ?? (typeof field.key === 'string' ? field.key : undefined);
|
|
502
806
|
props.description = override?.description ?? props.description;
|
|
807
|
+
const optionLabels = override?.options;
|
|
808
|
+
if (optionLabels && Array.isArray(props.options)) {
|
|
809
|
+
props.options = props.options.map((option) => translateOption(option, optionLabels));
|
|
810
|
+
}
|
|
503
811
|
if (schema.type !== 'object' && !(schema.type === undefined && schema.properties)) {
|
|
504
812
|
field.wrappers = [W_SCHEMA_FORM_FIELD_WRAPPER];
|
|
505
813
|
}
|
|
@@ -518,6 +826,7 @@ class WSchemaFormComponent {
|
|
|
518
826
|
field.parsers = [];
|
|
519
827
|
return field;
|
|
520
828
|
}
|
|
829
|
+
const hasOptions = !!schema.enum || hasConstOptions(schema);
|
|
521
830
|
switch (schema.type) {
|
|
522
831
|
case 'object':
|
|
523
832
|
delete field.type;
|
|
@@ -525,10 +834,10 @@ class WSchemaFormComponent {
|
|
|
525
834
|
case 'string':
|
|
526
835
|
case 'number':
|
|
527
836
|
case 'integer':
|
|
528
|
-
field.type =
|
|
837
|
+
field.type = hasOptions ? 'select' : 'input';
|
|
529
838
|
props.type = schema.type === 'string' ? 'text' : 'number';
|
|
530
839
|
// Clearing a control is not an implicit request to inherit a missing override.
|
|
531
|
-
field.parsers = schema.type === 'string' ||
|
|
840
|
+
field.parsers = schema.type === 'string' || hasOptions ? [] : [
|
|
532
841
|
(value, current) => {
|
|
533
842
|
if (!current?.formControl?.dirty) {
|
|
534
843
|
return typeof current?.key === 'string' ? current.model?.[current.key] : value;
|
|
@@ -539,18 +848,42 @@ class WSchemaFormComponent {
|
|
|
539
848
|
return typeof value === 'string' ? Number(value) : value;
|
|
540
849
|
}
|
|
541
850
|
];
|
|
851
|
+
const widget = schema[WIDGET_KEYWORD];
|
|
852
|
+
if (typeof widget === 'string' && REFERENCE_WIDGETS.has(widget)) {
|
|
853
|
+
field.type = 'select';
|
|
854
|
+
props.options = [...(this.referenceOptions[widget] ?? [])];
|
|
855
|
+
field.parsers = [];
|
|
856
|
+
break;
|
|
857
|
+
}
|
|
858
|
+
if (schema.type === 'string' && widget === COLOR_WIDGET) {
|
|
859
|
+
// SFCW-D04: an emptied color removes the override instead of storing an empty string.
|
|
860
|
+
field.type = W_SCHEMA_FORM_COLOR_FIELD_TYPE;
|
|
861
|
+
field.parsers = [(value) => (value === '' ? undefined : value)];
|
|
862
|
+
}
|
|
863
|
+
if (schema.type === 'string' && widget === IMAGE_WIDGET) {
|
|
864
|
+
if (!this.imageUpload || !this.imageUpload.uploadUrl || !this.imageUpload.headers) {
|
|
865
|
+
throw new SchemaFormConfigurationError('Image fields require an uploadUrl, headers and imageUploadConfig in the imageUpload input.');
|
|
866
|
+
}
|
|
867
|
+
field.type = W_SCHEMA_FORM_IMAGE_FIELD_TYPE;
|
|
868
|
+
field.parsers = [(value) => (value === '' ? undefined : value)];
|
|
869
|
+
props['imageUpload'] = this.imageUpload;
|
|
870
|
+
}
|
|
542
871
|
break;
|
|
543
872
|
case 'boolean':
|
|
544
|
-
field.type =
|
|
873
|
+
field.type = W_SCHEMA_FORM_TOGGLE_TYPE;
|
|
874
|
+
if (typeof schema.default === 'boolean') {
|
|
875
|
+
props[W_SCHEMA_FORM_TOGGLE_DEFAULT_PROP] = schema.default;
|
|
876
|
+
}
|
|
545
877
|
break;
|
|
546
878
|
case 'array':
|
|
547
879
|
// inspectSchema only lets through uniqueItems arrays whose items are an enum.
|
|
548
|
-
field.type =
|
|
880
|
+
field.type = W_SCHEMA_FORM_MULTISELECT_TYPE;
|
|
549
881
|
props['multiple'] = true;
|
|
882
|
+
props['selectAllLabel'] = this.texts.selectAll ?? W_SCHEMA_FORM_DEFAULT_TRANSLATIONS.selectAll;
|
|
550
883
|
field.parsers = [];
|
|
551
884
|
break;
|
|
552
885
|
case undefined:
|
|
553
|
-
if (
|
|
886
|
+
if (hasOptions) {
|
|
554
887
|
field.type = 'select';
|
|
555
888
|
field.parsers = [];
|
|
556
889
|
break;
|
|
@@ -565,6 +898,38 @@ class WSchemaFormComponent {
|
|
|
565
898
|
}
|
|
566
899
|
return field;
|
|
567
900
|
}
|
|
901
|
+
/**
|
|
902
|
+
* SFP-001: ungrouped root fields first, then one keyless group per non-empty `x-wapping-group` in the fixed
|
|
903
|
+
* order. SFP-007: with `x-wapping-groups` the groups, their order and their headings are the declared ones
|
|
904
|
+
* (translation of the key, else the schema title) and the description is shown under the heading. Without
|
|
905
|
+
* annotations the structure is unchanged.
|
|
906
|
+
*/
|
|
907
|
+
groupFields(fields, groups, declared) {
|
|
908
|
+
if (!fields.some(field => groups.has(field))) {
|
|
909
|
+
return fields;
|
|
910
|
+
}
|
|
911
|
+
const headings = declared?.map(group => ({
|
|
912
|
+
key: group.key,
|
|
913
|
+
title: this.translations?.groups?.[group.key] || group.title,
|
|
914
|
+
description: group.description
|
|
915
|
+
})) ?? W_SCHEMA_FORM_GROUPS.map(group => ({
|
|
916
|
+
key: group,
|
|
917
|
+
title: this.texts.groups?.[group] || W_SCHEMA_FORM_DEFAULT_TRANSLATIONS.groups?.[group] || group
|
|
918
|
+
}));
|
|
919
|
+
const grouped = fields.filter(field => !groups.has(field));
|
|
920
|
+
for (const group of headings) {
|
|
921
|
+
const members = fields.filter(field => groups.get(field) === group.key);
|
|
922
|
+
if (members.length > 0) {
|
|
923
|
+
grouped.push({
|
|
924
|
+
wrappers: [W_SCHEMA_FORM_GROUP_WRAPPER],
|
|
925
|
+
fieldGroupClassName: W_SCHEMA_FORM_GROUP_FIELDS_CLASS,
|
|
926
|
+
props: { label: group.title, description: group.description },
|
|
927
|
+
fieldGroup: members
|
|
928
|
+
});
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
return grouped;
|
|
932
|
+
}
|
|
568
933
|
mapSecretField(field, secret) {
|
|
569
934
|
// Without key the field has no control in the form nor entry in the model: the value never
|
|
570
935
|
// reaches `configuration`, `stateChange` or the diagnostics.
|
|
@@ -583,12 +948,12 @@ class WSchemaFormComponent {
|
|
|
583
948
|
Object.assign(field.props ?? (field.props = {}), secretProps);
|
|
584
949
|
return field;
|
|
585
950
|
}
|
|
586
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
587
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
951
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: WSchemaFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
952
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.27", type: WSchemaFormComponent, isStandalone: true, selector: "w-schema-form", inputs: { schema: "schema", values: "values", dialect: "dialect", secretStates: "secretStates", translations: "translations", imageUpload: "imageUpload", referenceOptions: "referenceOptions" }, outputs: { stateChange: "stateChange", validSubmit: "validSubmit", valueChange: "valueChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"w-schema-form\">\r\n @if (state.status === 'error') {\r\n <p role=\"alert\" class=\"w-error-message w-schema-form__alert\">{{ texts.configurationError }}</p>\r\n } @else {\r\n <formly-form\r\n class=\"w-schema-form__fields\"\r\n [form]=\"form\"\r\n [fields]=\"fields\"\r\n [model]=\"model\"\r\n (modelChange)=\"onModelChange($event)\">\r\n </formly-form>\r\n @if (state.status === 'invalid') {\r\n <p role=\"alert\" class=\"w-error-message w-schema-form__alert\">{{ texts.invalidValues }}</p>\r\n }\r\n }\r\n</div>\r\n", styles: [".heading1{font-size:2.6666666667rem;line-height:3rem;font-weight:700}.heading2{font-size:2.3333333333rem;line-height:2.6666666667rem;font-weight:700}.heading3{font-size:2rem;line-height:2.3333333333rem;font-weight:700}.heading4{font-size:1.6666666667rem;line-height:2rem;font-weight:700}.heading5,.w-sidebar-title-text{font-size:1.5rem;line-height:1.8333333333rem;font-weight:700}.heading6{font-size:1.3333333333rem;line-height:1.6666666667rem;font-weight:700}.subtitle1,.w-tab-text,.w-panel-title-text{font-size:1.1666666667rem;line-height:1.3333333333rem;font-weight:700}.subtitle2,.w-table-th-text,.w-panel-subtitle-text,.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled,.w-view-small-label-text-typography,.w-view-small-label-text,.w-button-small-text-label-text-typography,.w-button-small-text-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:600}.body,.w-image-file-uploader-navigators-text,.w-table-td-text,.w-chip-text,.w-panel-content,.w-input-small-select-options-text,.w-input-small-placeholder-text-typography,.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text,.w-view-small-value-text-typography,.w-view-small-value-text,.w-button-small-label-text-typography,.w-button-small-tertiary-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:400}.caption,.w-input-success-alert-text{font-size:.6666666667rem;line-height:1rem;font-weight:400}.light,.w-input-small-placeholder-text-only-color{font-size:.9166666667rem;line-height:1.0833333333rem;font-weight:300}.small,.w-error-message,.w-input-error-alert-text,.w-input-warning-alert-text,.w-message-note,.w-button-small-label-text-typography-sm{font-size:.8333333333rem;line-height:1rem;font-weight:400}.textMainColor{color:#1f2224}.textSoftColor{color:#5f6468}.textSofterColor{color:#9aa0a7}.textSoftestColor{color:#e8ebee}.textInverseColor{color:#fff}.spacingXXS{padding:4px}.spacingXSM{padding:6px}.spacingXSMDivider{height:6px}.spacingXS{padding:8px}.spacingS{padding:12px}.spacingM{padding:16px}.spacingL{padding:20px}.spacingXL{padding:24px}.spacingXXL{padding:28px}.spacingXXXL{padding:32px}.panel-title-gap-divider{height:20px}.panel-section-gap-divider{height:32px}.input-vertical-gap-divider{height:24px}.input-label-gap-divider{height:6px}.focusedInput{border:1px solid rgba(0,157,253,.25);box-shadow:0 0 10px #00b3eb40}.focus{box-shadow:0 0 8px #00a6e980}.hover{border-radius:8px;border:1px solid #00b3eb}.hoveredInput{border-radius:8px;border:1px solid rgba(0,179,235,.5)}.input-generic-valid{border-radius:8px;border:1px solid #B3FFD3}.input-generic-valid-focus{border-radius:8px;border:1px solid #B3FFD3!important;box-shadow:0 0 8px #46ff9b80!important;padding-left:16px}.input-generic-warning{border-radius:8px;border:1px solid #FFECB8!important}.input-generic-warning-focus{border-radius:8px;border:1px solid #FFECB8!important;box-shadow:0 0 8px #ffcd4680!important;padding-left:16px}.input-generic-error-focus{border-radius:8px;border:1px solid #FFBDBD!important;box-shadow:0 0 8px #ff555580!important;padding-left:16px}.input-generic-error{border-radius:8px;border:1px solid #FFBDBD}.toggle-small-typography{font-size:12px;line-height:16px;font-weight:600}.w-button-small-label-text-typography,.w-button-small-tertiary-label-text,.w-button-small-label-text-typography-sm{font-weight:600}.w-button-small-tertiary-label-text{color:#5f6468}.w-button-small-text-label-text{color:#1f2224}.w-button-small-icon-text{font-size:12px;font-weight:600}.w-table-button-small-icon-text{font-size:12px;color:#9aa0a7}.w-control-button-small-label-text{font-size:12px;font-weight:600;line-height:16px}.w-control-button-x-small-icon-text{font-size:10px;font-weight:700}.w-control-button-small-icon-text{font-size:8px;font-weight:700}.w-button-medium-label-text-typography,.w-button-medium-tertiary-label-text{font-size:16px;font-weight:600;line-height:16px}.w-button-medium-tertiary-label-text{color:#1f2224}.w-button-medium-icon-text{font-size:16px}.w-control-button-medium-label-text{font-size:14px;font-weight:600;line-height:16px}.w-control-button-medium-icon-text{font-size:12px;font-weight:700}.w-button-large-label-text-typography,.w-button-large-tertiary-label-text{font-size:20px;font-weight:600;line-height:24px}.w-button-large-tertiary-label-text{color:#1f2224}.w-button-x-small-label-text{font-size:10px;font-weight:600;line-height:10px}.w-button-small-only-label-text{font-size:12px;font-weight:600;line-height:16px}.w-button-large-icon-text{font-size:24px}.w-view-small-label-text{color:#1f2224}.w-view-small-value-text{color:#5f6468}.w-input-no-label-height{height:14px}.w-input-disabled{background-color:#f8f9fa!important;border-color:#e8ebee!important;opacity:.6!important}.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled{height:fit-content}.w-input-small-label-text,.w-input-small-label-disabled{color:#1f2224}.w-input-small-label-disabled{color:#9aa0a7}.w-input-small-label-text-content{padding:12px 8px 8px 0;margin:0}.w-input-small-label-text-content-no-top{padding-top:0}.w-input-small-placeholder-text{color:#1f2224}.w-input-small-placeholder-text-only-color{color:#9aa0a7;line-height:1.3333333333rem}.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text-disabled-only-color{color:#5f6468}.w-input-small-text-icon,.w-input-small-select-options-text{color:#1f2224}.w-input-medium-label-text-typography,.w-input-medium-label-text,.w-input-medium-label-disabled{font-size:14px;font-weight:600;line-height:16px}.w-input-medium-label-text,.w-input-medium-label-disabled{color:#1f2224}.w-input-medium-label-disabled{color:#9aa0a7}.w-input-medium-placeholder-text-typography,.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text{font-size:16px;font-weight:400;line-height:24px}.w-input-medium-placeholder-text,.w-input-medium-placeholder-text-only-color{color:#1f2224}.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text-disabled-only-color{color:#5f6468}.w-input-medium-text-icon{color:#1f2224}.w-input-medium-select-options-text{font-size:16px;font-weight:400;line-height:24px;color:#1f2224}.w-input-success-alert-text{color:#00db5d;padding:8px 8px 0;margin-top:0}.w-input-warning-alert-text,.w-message-note{color:#eeae00;padding:0 4px;margin-top:-2px}.w-input-error-alert-text{color:#e50000;padding:0 4px;margin-top:-2px}.w-input-alert-message-height{height:32px}.w-error-message{color:#e50000;padding:0 4px;margin-top:-2px}.w-message-note{font-weight:600;color:#e2a500}.w-sidebar-title-text,.w-panel-title-text,.w-panel-subtitle-text{color:#1f2224}.w-panel-content{color:#5f6468}.w-tab-text,.w-chip-text{color:#1f2224}.w-badge-text{font-size:10px;font-weight:700;line-height:8px}.w-table-th-text{color:#1f2224}.w-table-td-text{color:#5f6468}.w-table-height{padding:6px 8px 5px}.w-table-no-buttons-height{padding:16px 8px 15px!important}.w-tree-table-height{padding:8px 8px 7px}.w-image-file-uploader-navigators-text{font-size:12px;color:#fff}.grid{margin:0}::ng-deep .p-tooltip,.p-tooltip{filter:0px 0px 1px 0px rgba(0,0,0,.1) inset,1px 1px 5px rgba(0,0,0,.06),1px 1px 1px rgba(0,0,0,.08)}::ng-deep .p-tooltip .p-tooltip-text,.p-tooltip .p-tooltip-text{background:#fff!important;color:#1f2224;padding:12px 16px;max-width:192px;width:max-content;margin-left:3px;pointer-events:none}::ng-deep .p-tooltip.p-tooltip-left,.p-tooltip.p-tooltip-left{margin-right:6px;width:max-content;transform:translate(-6px)}::ng-deep .p-tooltip.p-tooltip-left .p-tooltip-arrow,.p-tooltip.p-tooltip-left .p-tooltip-arrow{border-left-color:#fff!important;top:50%;right:-3px;margin-top:-4px;border-width:4px 0 4px 6px!important}::ng-deep .p-tooltip.p-tooltip-right,.p-tooltip.p-tooltip-right{margin-left:6px;width:max-content;transform:translateY(-1px)}::ng-deep .p-tooltip.p-tooltip-right .p-tooltip-arrow,.p-tooltip.p-tooltip-right .p-tooltip-arrow{border-right-color:#fff!important;top:50%;left:0;margin-top:-4px;border-width:4px 6px 4px 0!important}::ng-deep .p-tooltip.p-tooltip-bottom .p-tooltip-arrow,.p-tooltip.p-tooltip-bottom .p-tooltip-arrow{border-bottom-color:#fff!important;border-width:0 4px 6px 4px!important;margin-top:-3px}:host{display:block}.w-schema-form{display:flex;flex-direction:column;gap:20px;min-width:0;max-width:100%}.w-schema-form__fields{display:flex;flex-direction:column;gap:16px;min-width:0;max-width:100%}.w-schema-form__alert{margin:0}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$1.LegacyFormlyForm, selector: "formly-form" }, { kind: "ngmodule", type: FormlyPrimeNGModule }, { kind: "ngmodule", type: WSchemaFormFieldTypesModule }] }); }
|
|
588
953
|
}
|
|
589
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
954
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: WSchemaFormComponent, decorators: [{
|
|
590
955
|
type: Component,
|
|
591
|
-
args: [{ selector: 'w-schema-form', standalone: true, imports: [ReactiveFormsModule, FormlyModule, FormlyPrimeNGModule, WSchemaFormFieldTypesModule], template: "<div class=\"w-schema-form\">\r\n @if (state.status === 'error') {\r\n <p role=\"alert\" class=\"w-error-message w-schema-form__alert\">{{ texts.configurationError }}</p>\r\n } @else {\r\n <formly-form\r\n [form]=\"form\"\r\n [fields]=\"fields\"\r\n [model]=\"model\"\r\n (modelChange)=\"onModelChange($event)\">\r\n </formly-form>\r\n @if (state.status === 'invalid') {\r\n <p role=\"alert\" class=\"w-error-message w-schema-form__alert\">{{ texts.invalidValues }}</p>\r\n }\r\n }\r\n</div>\r\n", styles: [".heading1{font-size:2.6666666667rem;line-height:3rem;font-weight:700}.heading2{font-size:2.3333333333rem;line-height:2.6666666667rem;font-weight:700}.heading3{font-size:2rem;line-height:2.3333333333rem;font-weight:700}.heading4{font-size:1.6666666667rem;line-height:2rem;font-weight:700}.heading5,.w-sidebar-title-text{font-size:1.5rem;line-height:1.8333333333rem;font-weight:700}.heading6{font-size:1.3333333333rem;line-height:1.6666666667rem;font-weight:700}.subtitle1,.w-tab-text,.w-panel-title-text{font-size:1.1666666667rem;line-height:1.3333333333rem;font-weight:700}.subtitle2,.w-table-th-text,.w-panel-subtitle-text,.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled,.w-view-small-label-text-typography,.w-view-small-label-text,.w-button-small-text-label-text-typography,.w-button-small-text-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:600}.body,.w-image-file-uploader-navigators-text,.w-table-td-text,.w-chip-text,.w-panel-content,.w-input-small-select-options-text,.w-input-small-placeholder-text-typography,.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text,.w-view-small-value-text-typography,.w-view-small-value-text,.w-button-small-label-text-typography,.w-button-small-tertiary-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:400}.caption,.w-input-success-alert-text{font-size:.6666666667rem;line-height:1rem;font-weight:400}.light,.w-input-small-placeholder-text-only-color{font-size:.9166666667rem;line-height:1.0833333333rem;font-weight:300}.small,.w-error-message,.w-input-error-alert-text,.w-input-warning-alert-text,.w-message-note,.w-button-small-label-text-typography-sm{font-size:.8333333333rem;line-height:1rem;font-weight:400}.textMainColor{color:#1f2224}.textSoftColor{color:#5f6468}.textSofterColor{color:#9aa0a7}.textSoftestColor{color:#e8ebee}.textInverseColor{color:#fff}.spacingXXS{padding:4px}.spacingXSM{padding:6px}.spacingXSMDivider{height:6px}.spacingXS{padding:8px}.spacingS{padding:12px}.spacingM{padding:16px}.spacingL{padding:20px}.spacingXL{padding:24px}.spacingXXL{padding:28px}.spacingXXXL{padding:32px}.panel-title-gap-divider{height:20px}.panel-section-gap-divider{height:32px}.input-vertical-gap-divider{height:24px}.input-label-gap-divider{height:6px}.focusedInput{border:1px solid rgba(0,157,253,.25);box-shadow:0 0 10px #00b3eb40}.focus{box-shadow:0 0 8px #00a6e980}.hover{border-radius:8px;border:1px solid #00b3eb}.hoveredInput{border-radius:8px;border:1px solid rgba(0,179,235,.5)}.input-generic-valid{border-radius:8px;border:1px solid #B3FFD3}.input-generic-valid-focus{border-radius:8px;border:1px solid #B3FFD3!important;box-shadow:0 0 8px #46ff9b80!important;padding-left:16px}.input-generic-warning{border-radius:8px;border:1px solid #FFECB8!important}.input-generic-warning-focus{border-radius:8px;border:1px solid #FFECB8!important;box-shadow:0 0 8px #ffcd4680!important;padding-left:16px}.input-generic-error-focus{border-radius:8px;border:1px solid #FFBDBD!important;box-shadow:0 0 8px #ff555580!important;padding-left:16px}.input-generic-error{border-radius:8px;border:1px solid #FFBDBD}.toggle-small-typography{font-size:12px;line-height:16px;font-weight:600}.w-button-small-label-text-typography,.w-button-small-tertiary-label-text,.w-button-small-label-text-typography-sm{font-weight:600}.w-button-small-tertiary-label-text{color:#5f6468}.w-button-small-text-label-text{color:#1f2224}.w-button-small-icon-text{font-size:12px;font-weight:600}.w-table-button-small-icon-text{font-size:12px;color:#9aa0a7}.w-control-button-small-label-text{font-size:12px;font-weight:600;line-height:16px}.w-control-button-x-small-icon-text{font-size:10px;font-weight:700}.w-control-button-small-icon-text{font-size:8px;font-weight:700}.w-button-medium-label-text-typography,.w-button-medium-tertiary-label-text{font-size:16px;font-weight:600;line-height:16px}.w-button-medium-tertiary-label-text{color:#1f2224}.w-button-medium-icon-text{font-size:16px}.w-control-button-medium-label-text{font-size:14px;font-weight:600;line-height:16px}.w-control-button-medium-icon-text{font-size:12px;font-weight:700}.w-button-large-label-text-typography,.w-button-large-tertiary-label-text{font-size:20px;font-weight:600;line-height:24px}.w-button-large-tertiary-label-text{color:#1f2224}.w-button-x-small-label-text{font-size:10px;font-weight:600;line-height:10px}.w-button-small-only-label-text{font-size:12px;font-weight:600;line-height:16px}.w-button-large-icon-text{font-size:24px}.w-view-small-label-text{color:#1f2224}.w-view-small-value-text{color:#5f6468}.w-input-no-label-height{height:14px}.w-input-disabled{background-color:#f8f9fa!important;border-color:#e8ebee!important;opacity:.6!important}.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled{height:fit-content}.w-input-small-label-text,.w-input-small-label-disabled{color:#1f2224}.w-input-small-label-disabled{color:#9aa0a7}.w-input-small-label-text-content{padding:12px 8px 8px 0;margin:0}.w-input-small-label-text-content-no-top{padding-top:0}.w-input-small-placeholder-text{color:#1f2224}.w-input-small-placeholder-text-only-color{color:#9aa0a7;line-height:1.3333333333rem}.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text-disabled-only-color{color:#5f6468}.w-input-small-text-icon,.w-input-small-select-options-text{color:#1f2224}.w-input-medium-label-text-typography,.w-input-medium-label-text,.w-input-medium-label-disabled{font-size:14px;font-weight:600;line-height:16px}.w-input-medium-label-text,.w-input-medium-label-disabled{color:#1f2224}.w-input-medium-label-disabled{color:#9aa0a7}.w-input-medium-placeholder-text-typography,.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text{font-size:16px;font-weight:400;line-height:24px}.w-input-medium-placeholder-text,.w-input-medium-placeholder-text-only-color{color:#1f2224}.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text-disabled-only-color{color:#5f6468}.w-input-medium-text-icon{color:#1f2224}.w-input-medium-select-options-text{font-size:16px;font-weight:400;line-height:24px;color:#1f2224}.w-input-success-alert-text{color:#00db5d;padding:8px 8px 0;margin-top:0}.w-input-warning-alert-text,.w-message-note{color:#eeae00;padding:0 4px;margin-top:-2px}.w-input-error-alert-text{color:#e50000;padding:0 4px;margin-top:-2px}.w-input-alert-message-height{height:32px}.w-error-message{color:#e50000;padding:0 4px;margin-top:-2px}.w-message-note{font-weight:600;color:#e2a500}.w-sidebar-title-text,.w-panel-title-text,.w-panel-subtitle-text{color:#1f2224}.w-panel-content{color:#5f6468}.w-tab-text,.w-chip-text{color:#1f2224}.w-badge-text{font-size:10px;font-weight:700;line-height:8px}.w-table-th-text{color:#1f2224}.w-table-td-text{color:#5f6468}.w-table-height{padding:6px 8px 5px}.w-table-no-buttons-height{padding:16px 8px 15px!important}.w-tree-table-height{padding:8px 8px 7px}.w-image-file-uploader-navigators-text{font-size:12px;color:#fff}.grid{margin:0}::ng-deep .p-tooltip,.p-tooltip{filter:0px 0px 1px 0px rgba(0,0,0,.1) inset,1px 1px 5px rgba(0,0,0,.06),1px 1px 1px rgba(0,0,0,.08)}::ng-deep .p-tooltip .p-tooltip-text,.p-tooltip .p-tooltip-text{background:#fff!important;color:#1f2224;padding:12px 16px;max-width:192px;width:max-content;margin-left:3px;pointer-events:none}::ng-deep .p-tooltip.p-tooltip-left,.p-tooltip.p-tooltip-left{margin-right:6px;width:max-content;transform:translate(-6px)}::ng-deep .p-tooltip.p-tooltip-left .p-tooltip-arrow,.p-tooltip.p-tooltip-left .p-tooltip-arrow{border-left-color:#fff!important;top:50%;right:-3px;margin-top:-4px;border-width:4px 0 4px 6px!important}::ng-deep .p-tooltip.p-tooltip-right,.p-tooltip.p-tooltip-right{margin-left:6px;width:max-content;transform:translateY(-1px)}::ng-deep .p-tooltip.p-tooltip-right .p-tooltip-arrow,.p-tooltip.p-tooltip-right .p-tooltip-arrow{border-right-color:#fff!important;top:50%;left:0;margin-top:-4px;border-width:4px 6px 4px 0!important}::ng-deep .p-tooltip.p-tooltip-bottom .p-tooltip-arrow,.p-tooltip.p-tooltip-bottom .p-tooltip-arrow{border-bottom-color:#fff!important;border-width:0 4px 6px 4px!important;margin-top:-3px}:host{display:block}.w-schema-form{display:flex;flex-direction:column;gap:20px}.w-schema-form__alert{margin:0}\n"] }]
|
|
956
|
+
args: [{ selector: 'w-schema-form', standalone: true, imports: [ReactiveFormsModule, FormlyModule, FormlyPrimeNGModule, WSchemaFormFieldTypesModule], template: "<div class=\"w-schema-form\">\r\n @if (state.status === 'error') {\r\n <p role=\"alert\" class=\"w-error-message w-schema-form__alert\">{{ texts.configurationError }}</p>\r\n } @else {\r\n <formly-form\r\n class=\"w-schema-form__fields\"\r\n [form]=\"form\"\r\n [fields]=\"fields\"\r\n [model]=\"model\"\r\n (modelChange)=\"onModelChange($event)\">\r\n </formly-form>\r\n @if (state.status === 'invalid') {\r\n <p role=\"alert\" class=\"w-error-message w-schema-form__alert\">{{ texts.invalidValues }}</p>\r\n }\r\n }\r\n</div>\r\n", styles: [".heading1{font-size:2.6666666667rem;line-height:3rem;font-weight:700}.heading2{font-size:2.3333333333rem;line-height:2.6666666667rem;font-weight:700}.heading3{font-size:2rem;line-height:2.3333333333rem;font-weight:700}.heading4{font-size:1.6666666667rem;line-height:2rem;font-weight:700}.heading5,.w-sidebar-title-text{font-size:1.5rem;line-height:1.8333333333rem;font-weight:700}.heading6{font-size:1.3333333333rem;line-height:1.6666666667rem;font-weight:700}.subtitle1,.w-tab-text,.w-panel-title-text{font-size:1.1666666667rem;line-height:1.3333333333rem;font-weight:700}.subtitle2,.w-table-th-text,.w-panel-subtitle-text,.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled,.w-view-small-label-text-typography,.w-view-small-label-text,.w-button-small-text-label-text-typography,.w-button-small-text-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:600}.body,.w-image-file-uploader-navigators-text,.w-table-td-text,.w-chip-text,.w-panel-content,.w-input-small-select-options-text,.w-input-small-placeholder-text-typography,.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text,.w-view-small-value-text-typography,.w-view-small-value-text,.w-button-small-label-text-typography,.w-button-small-tertiary-label-text{font-size:1rem;line-height:1.1666666667rem;font-weight:400}.caption,.w-input-success-alert-text{font-size:.6666666667rem;line-height:1rem;font-weight:400}.light,.w-input-small-placeholder-text-only-color{font-size:.9166666667rem;line-height:1.0833333333rem;font-weight:300}.small,.w-error-message,.w-input-error-alert-text,.w-input-warning-alert-text,.w-message-note,.w-button-small-label-text-typography-sm{font-size:.8333333333rem;line-height:1rem;font-weight:400}.textMainColor{color:#1f2224}.textSoftColor{color:#5f6468}.textSofterColor{color:#9aa0a7}.textSoftestColor{color:#e8ebee}.textInverseColor{color:#fff}.spacingXXS{padding:4px}.spacingXSM{padding:6px}.spacingXSMDivider{height:6px}.spacingXS{padding:8px}.spacingS{padding:12px}.spacingM{padding:16px}.spacingL{padding:20px}.spacingXL{padding:24px}.spacingXXL{padding:28px}.spacingXXXL{padding:32px}.panel-title-gap-divider{height:20px}.panel-section-gap-divider{height:32px}.input-vertical-gap-divider{height:24px}.input-label-gap-divider{height:6px}.focusedInput{border:1px solid rgba(0,157,253,.25);box-shadow:0 0 10px #00b3eb40}.focus{box-shadow:0 0 8px #00a6e980}.hover{border-radius:8px;border:1px solid #00b3eb}.hoveredInput{border-radius:8px;border:1px solid rgba(0,179,235,.5)}.input-generic-valid{border-radius:8px;border:1px solid #B3FFD3}.input-generic-valid-focus{border-radius:8px;border:1px solid #B3FFD3!important;box-shadow:0 0 8px #46ff9b80!important;padding-left:16px}.input-generic-warning{border-radius:8px;border:1px solid #FFECB8!important}.input-generic-warning-focus{border-radius:8px;border:1px solid #FFECB8!important;box-shadow:0 0 8px #ffcd4680!important;padding-left:16px}.input-generic-error-focus{border-radius:8px;border:1px solid #FFBDBD!important;box-shadow:0 0 8px #ff555580!important;padding-left:16px}.input-generic-error{border-radius:8px;border:1px solid #FFBDBD}.toggle-small-typography{font-size:12px;line-height:16px;font-weight:600}.w-button-small-label-text-typography,.w-button-small-tertiary-label-text,.w-button-small-label-text-typography-sm{font-weight:600}.w-button-small-tertiary-label-text{color:#5f6468}.w-button-small-text-label-text{color:#1f2224}.w-button-small-icon-text{font-size:12px;font-weight:600}.w-table-button-small-icon-text{font-size:12px;color:#9aa0a7}.w-control-button-small-label-text{font-size:12px;font-weight:600;line-height:16px}.w-control-button-x-small-icon-text{font-size:10px;font-weight:700}.w-control-button-small-icon-text{font-size:8px;font-weight:700}.w-button-medium-label-text-typography,.w-button-medium-tertiary-label-text{font-size:16px;font-weight:600;line-height:16px}.w-button-medium-tertiary-label-text{color:#1f2224}.w-button-medium-icon-text{font-size:16px}.w-control-button-medium-label-text{font-size:14px;font-weight:600;line-height:16px}.w-control-button-medium-icon-text{font-size:12px;font-weight:700}.w-button-large-label-text-typography,.w-button-large-tertiary-label-text{font-size:20px;font-weight:600;line-height:24px}.w-button-large-tertiary-label-text{color:#1f2224}.w-button-x-small-label-text{font-size:10px;font-weight:600;line-height:10px}.w-button-small-only-label-text{font-size:12px;font-weight:600;line-height:16px}.w-button-large-icon-text{font-size:24px}.w-view-small-label-text{color:#1f2224}.w-view-small-value-text{color:#5f6468}.w-input-no-label-height{height:14px}.w-input-disabled{background-color:#f8f9fa!important;border-color:#e8ebee!important;opacity:.6!important}.w-input-small-label-text-typography,.w-input-small-label-text,.w-input-small-label-disabled{height:fit-content}.w-input-small-label-text,.w-input-small-label-disabled{color:#1f2224}.w-input-small-label-disabled{color:#9aa0a7}.w-input-small-label-text-content{padding:12px 8px 8px 0;margin:0}.w-input-small-label-text-content-no-top{padding-top:0}.w-input-small-placeholder-text{color:#1f2224}.w-input-small-placeholder-text-only-color{color:#9aa0a7;line-height:1.3333333333rem}.w-input-small-placeholder-text-disabled,.w-input-small-placeholder-text-disabled-only-color{color:#5f6468}.w-input-small-text-icon,.w-input-small-select-options-text{color:#1f2224}.w-input-medium-label-text-typography,.w-input-medium-label-text,.w-input-medium-label-disabled{font-size:14px;font-weight:600;line-height:16px}.w-input-medium-label-text,.w-input-medium-label-disabled{color:#1f2224}.w-input-medium-label-disabled{color:#9aa0a7}.w-input-medium-placeholder-text-typography,.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text{font-size:16px;font-weight:400;line-height:24px}.w-input-medium-placeholder-text,.w-input-medium-placeholder-text-only-color{color:#1f2224}.w-input-medium-placeholder-text-disabled,.w-input-medium-placeholder-text-disabled-only-color{color:#5f6468}.w-input-medium-text-icon{color:#1f2224}.w-input-medium-select-options-text{font-size:16px;font-weight:400;line-height:24px;color:#1f2224}.w-input-success-alert-text{color:#00db5d;padding:8px 8px 0;margin-top:0}.w-input-warning-alert-text,.w-message-note{color:#eeae00;padding:0 4px;margin-top:-2px}.w-input-error-alert-text{color:#e50000;padding:0 4px;margin-top:-2px}.w-input-alert-message-height{height:32px}.w-error-message{color:#e50000;padding:0 4px;margin-top:-2px}.w-message-note{font-weight:600;color:#e2a500}.w-sidebar-title-text,.w-panel-title-text,.w-panel-subtitle-text{color:#1f2224}.w-panel-content{color:#5f6468}.w-tab-text,.w-chip-text{color:#1f2224}.w-badge-text{font-size:10px;font-weight:700;line-height:8px}.w-table-th-text{color:#1f2224}.w-table-td-text{color:#5f6468}.w-table-height{padding:6px 8px 5px}.w-table-no-buttons-height{padding:16px 8px 15px!important}.w-tree-table-height{padding:8px 8px 7px}.w-image-file-uploader-navigators-text{font-size:12px;color:#fff}.grid{margin:0}::ng-deep .p-tooltip,.p-tooltip{filter:0px 0px 1px 0px rgba(0,0,0,.1) inset,1px 1px 5px rgba(0,0,0,.06),1px 1px 1px rgba(0,0,0,.08)}::ng-deep .p-tooltip .p-tooltip-text,.p-tooltip .p-tooltip-text{background:#fff!important;color:#1f2224;padding:12px 16px;max-width:192px;width:max-content;margin-left:3px;pointer-events:none}::ng-deep .p-tooltip.p-tooltip-left,.p-tooltip.p-tooltip-left{margin-right:6px;width:max-content;transform:translate(-6px)}::ng-deep .p-tooltip.p-tooltip-left .p-tooltip-arrow,.p-tooltip.p-tooltip-left .p-tooltip-arrow{border-left-color:#fff!important;top:50%;right:-3px;margin-top:-4px;border-width:4px 0 4px 6px!important}::ng-deep .p-tooltip.p-tooltip-right,.p-tooltip.p-tooltip-right{margin-left:6px;width:max-content;transform:translateY(-1px)}::ng-deep .p-tooltip.p-tooltip-right .p-tooltip-arrow,.p-tooltip.p-tooltip-right .p-tooltip-arrow{border-right-color:#fff!important;top:50%;left:0;margin-top:-4px;border-width:4px 6px 4px 0!important}::ng-deep .p-tooltip.p-tooltip-bottom .p-tooltip-arrow,.p-tooltip.p-tooltip-bottom .p-tooltip-arrow{border-bottom-color:#fff!important;border-width:0 4px 6px 4px!important;margin-top:-3px}:host{display:block}.w-schema-form{display:flex;flex-direction:column;gap:20px;min-width:0;max-width:100%}.w-schema-form__fields{display:flex;flex-direction:column;gap:16px;min-width:0;max-width:100%}.w-schema-form__alert{margin:0}\n"] }]
|
|
592
957
|
}], propDecorators: { schema: [{
|
|
593
958
|
type: Input,
|
|
594
959
|
args: [{ required: true }]
|
|
@@ -601,18 +966,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
601
966
|
type: Input
|
|
602
967
|
}], translations: [{
|
|
603
968
|
type: Input
|
|
969
|
+
}], imageUpload: [{
|
|
970
|
+
type: Input
|
|
971
|
+
}], referenceOptions: [{
|
|
972
|
+
type: Input
|
|
604
973
|
}], stateChange: [{
|
|
605
974
|
type: Output
|
|
606
975
|
}], validSubmit: [{
|
|
607
976
|
type: Output
|
|
977
|
+
}], valueChange: [{
|
|
978
|
+
type: Output
|
|
608
979
|
}] } });
|
|
609
980
|
function createAjv(dialect) {
|
|
610
981
|
const options = { allErrors: true, ownProperties: true, verbose: false, logger: false };
|
|
611
982
|
const ajv = dialect === '2020-12' ? new Ajv2020(options) : new Ajv(options);
|
|
612
|
-
// Annotation
|
|
983
|
+
// Annotation keywords: strict mode stays enabled for every other unknown keyword.
|
|
613
984
|
ajv.addKeyword(SECRET_KEYWORD);
|
|
985
|
+
ajv.addKeyword(WIDGET_KEYWORD);
|
|
986
|
+
ajv.addKeyword(GROUP_KEYWORD);
|
|
987
|
+
ajv.addKeyword(GROUPS_KEYWORD);
|
|
614
988
|
return ajv;
|
|
615
989
|
}
|
|
990
|
+
/** CM-012: only the label of an enum option is translated; its value stays the technical one. */
|
|
991
|
+
function translateOption(option, labels) {
|
|
992
|
+
if (!isRecord(option)) {
|
|
993
|
+
return option;
|
|
994
|
+
}
|
|
995
|
+
const value = option['value'];
|
|
996
|
+
if (typeof value !== 'string' && typeof value !== 'number') {
|
|
997
|
+
return option;
|
|
998
|
+
}
|
|
999
|
+
const key = String(value);
|
|
1000
|
+
const label = Object.prototype.hasOwnProperty.call(labels, key) ? labels[key] : undefined;
|
|
1001
|
+
return typeof label === 'string' && label !== '' ? { ...option, label } : option;
|
|
1002
|
+
}
|
|
616
1003
|
function toDiagnostic({ instancePath, keyword, message }, basePath) {
|
|
617
1004
|
return { instancePath: `${basePath}${instancePath}`, keyword, message };
|
|
618
1005
|
}
|
|
@@ -627,5 +1014,5 @@ function toDiagnostic({ instancePath, keyword, message }, basePath) {
|
|
|
627
1014
|
* Generated bundle index. Do not edit.
|
|
628
1015
|
*/
|
|
629
1016
|
|
|
630
|
-
export { WSchemaFormComponent, W_SCHEMA_FORM_DEFAULT_TRANSLATIONS };
|
|
1017
|
+
export { WSchemaFormComponent, W_SCHEMA_FORM_DEFAULT_TRANSLATIONS, W_SCHEMA_FORM_GROUPS, W_SCHEMA_FORM_IMAGE_FIELD_TYPE };
|
|
631
1018
|
//# sourceMappingURL=ngx-wapp-components-schema-form.mjs.map
|