@sd-angular/core 19.0.0-beta.93 → 19.0.0-beta.94
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/components/document-builder/src/components/header-footer-builder/header-footer-builder.component.d.ts +4 -1
- package/components/document-builder/src/document-builder.model.d.ts +2 -0
- package/components/editor/src/models/editor.model.d.ts +2 -0
- package/components/editor/src/plugins/image-upload/utils/validate.utils.d.ts +2 -1
- package/components/splitter/src/splitter.component.d.ts +15 -2
- package/components/table/src/components/selector-action/selector-action.component.d.ts +1 -0
- package/components/table/src/table.component.d.ts +1 -0
- package/configurations/src/sd-core.configuration.d.ts +1 -0
- package/fesm2022/sd-angular-core-components-code-editor.mjs +3 -2
- package/fesm2022/sd-angular-core-components-code-editor.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-document-builder.mjs +29 -8
- package/fesm2022/sd-angular-core-components-document-builder.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-editor.mjs +31 -16
- package/fesm2022/sd-angular-core-components-editor.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-form-generic.mjs +68 -61
- package/fesm2022/sd-angular-core-components-form-generic.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-history.mjs +3 -2
- package/fesm2022/sd-angular-core-components-history.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-import-excel.mjs +25 -23
- package/fesm2022/sd-angular-core-components-import-excel.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-preview.mjs +6 -4
- package/fesm2022/sd-angular-core-components-preview.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-splitter.mjs +188 -18
- package/fesm2022/sd-angular-core-components-splitter.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-tab-router.mjs +3 -1
- package/fesm2022/sd-angular-core-components-tab-router.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-table.mjs +30 -23
- package/fesm2022/sd-angular-core-components-table.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-upload-file.mjs +24 -21
- package/fesm2022/sd-angular-core-components-upload-file.mjs.map +1 -1
- package/fesm2022/sd-angular-core-configurations.mjs.map +1 -1
- package/fesm2022/sd-angular-core-directives.mjs +6 -2
- package/fesm2022/sd-angular-core-directives.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-autocomplete.mjs +3 -1
- package/fesm2022/sd-angular-core-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-chip-calendar.mjs +5 -3
- package/fesm2022/sd-angular-core-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-chip.mjs +5 -3
- package/fesm2022/sd-angular-core-forms-chip.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-date-range.mjs +8 -5
- package/fesm2022/sd-angular-core-forms-date-range.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-date.mjs +7 -5
- package/fesm2022/sd-angular-core-forms-date.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-datetime.mjs +10 -8
- package/fesm2022/sd-angular-core-forms-datetime.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input-number.mjs +5 -3
- package/fesm2022/sd-angular-core-forms-input-number.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input.mjs +13 -6
- package/fesm2022/sd-angular-core-forms-input.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-radio.mjs +3 -2
- package/fesm2022/sd-angular-core-forms-radio.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-select.mjs +5 -3
- package/fesm2022/sd-angular-core-forms-select.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-textarea.mjs +8 -5
- package/fesm2022/sd-angular-core-forms-textarea.mjs.map +1 -1
- package/fesm2022/sd-angular-core-handlers.mjs +7 -6
- package/fesm2022/sd-angular-core-handlers.mjs.map +1 -1
- package/fesm2022/sd-angular-core-i18n.mjs +790 -0
- package/fesm2022/sd-angular-core-i18n.mjs.map +1 -0
- package/fesm2022/sd-angular-core-interceptors.mjs +10 -6
- package/fesm2022/sd-angular-core-interceptors.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules-authom.mjs +1 -0
- package/fesm2022/sd-angular-core-modules-authom.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules-keycloak.mjs +1 -0
- package/fesm2022/sd-angular-core-modules-keycloak.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules-layout.mjs +47 -46
- package/fesm2022/sd-angular-core-modules-layout.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-confirm.mjs +15 -13
- package/fesm2022/sd-angular-core-services-confirm.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-docx.mjs +7 -7
- package/fesm2022/sd-angular-core-services-docx.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-excel.mjs +5 -3
- package/fesm2022/sd-angular-core-services-excel.mjs.map +1 -1
- package/fesm2022/sd-angular-core-utilities-extensions.mjs +18 -11
- package/fesm2022/sd-angular-core-utilities-extensions.mjs.map +1 -1
- package/fesm2022/sd-angular-core-utilities-models.mjs +30 -28
- package/fesm2022/sd-angular-core-utilities-models.mjs.map +1 -1
- package/fesm2022/sd-angular-core.mjs +1 -0
- package/fesm2022/sd-angular-core.mjs.map +1 -1
- package/i18n/index.d.ts +5 -0
- package/i18n/src/en.d.ts +2 -0
- package/i18n/src/sd-i18n.messages.d.ts +2 -0
- package/i18n/src/sd-i18n.pipe.d.ts +9 -0
- package/i18n/src/sd-i18n.service.d.ts +12 -0
- package/i18n/src/sd-i18n.token.d.ts +1 -0
- package/i18n/src/sd-i18n.types.d.ts +5 -0
- package/i18n/src/vi.d.ts +312 -0
- package/package.json +53 -49
- package/public-api.d.ts +1 -0
- package/sd-angular-core-19.0.0-beta.94.tgz +0 -0
- package/services/confirm/src/lib/confirm.service.d.ts +1 -0
- package/sd-angular-core-19.0.0-beta.93.tgz +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Inject, Optional, Injectable, Pipe, SecurityContext, Input, ChangeDetectionStrategy, Component, ViewChild, EventEmitter, Output, ViewChildren, QueryList } from '@angular/core';
|
|
2
|
+
import { InjectionToken, Inject, Optional, Injectable, Pipe, SecurityContext, Input, ChangeDetectionStrategy, Component, ViewChild, EventEmitter, Output, ViewChildren, QueryList, inject } from '@angular/core';
|
|
3
3
|
import { SdUtilities, DateUtilities as DateUtilities$1, StringUtilities, ArrayUtilities, NumberUtilities } from '@sd-angular/core/utilities/extensions';
|
|
4
4
|
import { DateUtilities, SdUtilities as SdUtilities$1, StringUtilities as StringUtilities$1 } from '@sd-angular/core/utilities';
|
|
5
5
|
import * as i5 from '@angular/cdk/drag-drop';
|
|
@@ -31,6 +31,7 @@ import * as i1$3 from '@angular/router';
|
|
|
31
31
|
import { SdUploadFile } from '@sd-angular/core/components/upload-file';
|
|
32
32
|
import { SdSideDrawer } from '@sd-angular/core/components/side-drawer';
|
|
33
33
|
import { SdTable, SdTabelCellDefDirective } from '@sd-angular/core/components/table';
|
|
34
|
+
import { SdTPipe, SdI18nService } from '@sd-angular/core/i18n';
|
|
34
35
|
import { SdAutocomplete as SdAutocomplete$1 } from '@sd-angular/core/forms/autocomplete';
|
|
35
36
|
import { SdSelect as SdSelect$1 } from '@sd-angular/core/forms/select';
|
|
36
37
|
import { SdSuffixDefDirective } from '@sd-angular/core/forms/directives';
|
|
@@ -2608,7 +2609,9 @@ class TableComponent {
|
|
|
2608
2609
|
}
|
|
2609
2610
|
};
|
|
2610
2611
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TableComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: FormGenericService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2611
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: TableComponent, isStandalone: true, selector: "lib-table", inputs: { setVariables: "setVariables", form: "form", _component: ["component", "_component"], _required: ["required", "_required"], _viewed: ["viewed", "_viewed"], _model: ["model", "_model"] }, outputs: { modelChange: "modelChange" }, viewQueries: [{ propertyName: "table", first: true, predicate: SdTable, descendants: true }, { propertyName: "sideDrawer", first: true, predicate: SdSideDrawer, descendants: true }, { propertyName: "uploadFiles", predicate: SdUploadFile, descendants: true }], ngImport: i0, template: "@if(component && tableOption) {\r\n <div style=\"width: 100%\">\r\n <sd-table [option]=\"tableOption\">\r\n @for(key of imageKeys; track key) {\r\n <ng-template [sdTableCellDef]=\"key\" let-item=\"item\">\r\n <sd-upload-file\r\n type=\"image\"\r\n [model]=\"item[key]\"\r\n [args]=\"getArgs(key)\"\r\n (modelChange)=\"onFileUploadChange(item, key, $event)\"\r\n align=\"left\"\r\n disabled\r\n previewWidth=\"50px\"\r\n previewHeight=\"50px\"></sd-upload-file>\r\n </ng-template>\r\n }\r\n @for(key of fileKeys; track key) {\r\n <ng-template [sdTableCellDef]=\"key\" let-item=\"item\">\r\n <sd-upload-file\r\n [model]=\"item[key]\"\r\n [args]=\"getArgs(key)\"\r\n (modelChange)=\"onFileUploadChange(item, key, $event)\"\r\n align=\"left\"\r\n disabled\r\n previewWidth=\"50px\"\r\n previewHeight=\"50px\"></sd-upload-file>\r\n </ng-template>\r\n }\r\n </sd-table>\r\n @if(!viewed && !component.properties?.viewed) {\r\n <sd-button\r\n prefixIcon=\"add\"\r\n color=\"primary\"\r\n (click)=\"onDetail()\"\r\n [title]=\"component.properties?.titleButtonCreate || '
|
|
2612
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: TableComponent, isStandalone: true, selector: "lib-table", inputs: { setVariables: "setVariables", form: "form", _component: ["component", "_component"], _required: ["required", "_required"], _viewed: ["viewed", "_viewed"], _model: ["model", "_model"] }, outputs: { modelChange: "modelChange" }, viewQueries: [{ propertyName: "table", first: true, predicate: SdTable, descendants: true }, { propertyName: "sideDrawer", first: true, predicate: SdSideDrawer, descendants: true }, { propertyName: "uploadFiles", predicate: SdUploadFile, descendants: true }], ngImport: i0, template: "@if(component && tableOption) {\r\n <div style=\"width: 100%\">\r\n <sd-table [option]=\"tableOption\">\r\n @for(key of imageKeys; track key) {\r\n <ng-template [sdTableCellDef]=\"key\" let-item=\"item\">\r\n <sd-upload-file\r\n type=\"image\"\r\n [model]=\"item[key]\"\r\n [args]=\"getArgs(key)\"\r\n (modelChange)=\"onFileUploadChange(item, key, $event)\"\r\n align=\"left\"\r\n disabled\r\n previewWidth=\"50px\"\r\n previewHeight=\"50px\"></sd-upload-file>\r\n </ng-template>\r\n }\r\n @for(key of fileKeys; track key) {\r\n <ng-template [sdTableCellDef]=\"key\" let-item=\"item\">\r\n <sd-upload-file\r\n [model]=\"item[key]\"\r\n [args]=\"getArgs(key)\"\r\n (modelChange)=\"onFileUploadChange(item, key, $event)\"\r\n align=\"left\"\r\n disabled\r\n previewWidth=\"50px\"\r\n previewHeight=\"50px\"></sd-upload-file>\r\n </ng-template>\r\n }\r\n </sd-table>\r\n @if(!viewed && !component.properties?.viewed) {\r\n <sd-button\r\n prefixIcon=\"add\"\r\n color=\"primary\"\r\n (click)=\"onDetail()\"\r\n [title]=\"component.properties?.titleButtonCreate || ('core.component.form-builder.add-new' | sdT)\"></sd-button>\r\n }\r\n @if(!viewed && !component.properties?.viewed) {\r\n <sd-side-drawer [title]=\"'core.component.form-builder.detail' | sdT\" width=\"500px\">\r\n <div sdTitle>\r\n <span>{{ 'core.component.form-builder.create-update' | sdT }}</span>\r\n </div>\r\n <div sdBody class=\"c-table-create-update\">\r\n @if(!!component.columns?.length) {\r\n <div class=\"row mx-0\">\r\n @for(column of component.columns;track column.key) {\r\n @let validate = formRenderColumn[column.key].validate;\r\n <div class=\"col-12 px-0 mt-16\">\r\n @if(column.type === 'string') {\r\n <sd-input\r\n [form]=\"form\"\r\n [label]=\"column.label\"\r\n [(model)]=\"row[column.key]\"\r\n [required]=\"validate?.required\"\r\n [pattern]=\"column.validate?.pattern\"\r\n [patternErrorMessage]=\"column.validate?.patternErrorMessage\"></sd-input>\r\n }@else if(column.type === 'number') {\r\n <sd-input-number\r\n [form]=\"form\"\r\n [label]=\"column.label\"\r\n [(model)]=\"row[column.key]\"\r\n [required]=\"validate?.required\"\r\n [min]=\"column.validate?.min\"></sd-input-number>\r\n }@else if(column.type === 'radio') {\r\n <sd-radio\r\n [form]=\"form\"\r\n [label]=\"column.label\"\r\n [name]=\"column.key\"\r\n [items]=\"column.values\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [required]=\"validate?.required\"></sd-radio>\r\n }@else if(column.type === 'values') {\r\n <sd-autocomplete\r\n [form]=\"form\"\r\n [label]=\"column.label\"\r\n [(model)]=\"row[column.key]\"\r\n [items]=\"columnValues[column.key]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [required]=\"validate?.required\"></sd-autocomplete>\r\n }@else if(column.type === 'date') {\r\n <sd-date\r\n [form]=\"form\"\r\n [label]=\"column.label\"\r\n [(model)]=\"row[column.key]\"\r\n [required]=\"validate?.required\"></sd-date>\r\n }@else if(column.type === 'datetime') {\r\n <sd-datetime\r\n [form]=\"form\"\r\n [label]=\"column.label\"\r\n [(model)]=\"row[column.key]\"\r\n [required]=\"validate?.required\"></sd-datetime>\r\n }@else if(column.type === 'image') {\r\n <sd-upload-file\r\n [label]=\"column.label\"\r\n type=\"image\"\r\n [(model)]=\"row[column.key]\"\r\n [args]=\"column.args\"\r\n previewWidth=\"50px\"\r\n previewHeight=\"50px\"\r\n align=\"left\"></sd-upload-file>\r\n }@else if (column.type === 'file') {\r\n <sd-upload-file\r\n [label]=\"column.label\"\r\n type=\"file\"\r\n [(model)]=\"row[column.key]\"\r\n [args]=\"column.args\"\r\n previewWidth=\"50px\"\r\n previewHeight=\"50px\"\r\n align=\"left\"></sd-upload-file>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n \r\n </div>\r\n <div sdFooter class=\"text-right pr-16\">\r\n <sd-button [title]=\"'core.component.form-builder.save' | sdT\" prefixIcon=\"save\" color=\"primary\" type=\"fill\" (click)=\"onAccept()\"></sd-button>\r\n </div>\r\n </sd-side-drawer>\r\n }\r\n </div>\r\n}\r\n\r\n", styles: [":host{display:contents}.c-table-create-update{background:#fff;margin:-16px;padding:16px;height:calc(100vh - 97px)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "tooltip", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber$1, selector: "sd-input-number", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "sdFocusForceBlur"] }, { kind: "component", type: SdAutocomplete, selector: "sd-autocomplete", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "limit", "cacheChecksum", "hyperlink", "items", "hideInlineError", "addable", "required", "disabled", "viewed", "validator", "inlineError", "appearance", "model"], outputs: ["modelChange", "sdChange", "sdSelection", "sdAdd"] }, { kind: "component", type: SdUploadFile, selector: "sd-upload-file", inputs: ["args", "label", "key", "description", "previewWidth", "previewHeight", "align", "upload", "details", "download", "imageValidator", "maxSize", "maxWidth", "maxHeight", "scaleToPixel", "form", "name", "required", "type", "helperText", "max", "maxOfImage", "extensions", "disabled", "model"], outputs: ["loaded", "filesChanged", "modelChange"] }, { kind: "component", type: SdTable, selector: "sd-table", inputs: ["autoId", "option"] }, { kind: "directive", type: SdTabelCellDefDirective, selector: "[sdTableCellDef]", inputs: ["sdTableCellDef"] }, { kind: "component", type: SdSideDrawer, selector: "sd-side-drawer", inputs: ["title", "width", "hideClose", "disableBackdropClose", "drawerClass"], outputs: ["sdClosed"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdRadio, selector: "sd-radio", inputs: ["autoId", "name", "form", "label", "placeholder", "display", "model", "items", "valueField", "displayField", "required", "inlineError", "disabled", "viewed", "hyperlink"], outputs: ["modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "pipe", type:
|
|
2613
|
+
// Pipe cho phần viewed
|
|
2614
|
+
SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2612
2615
|
}
|
|
2613
2616
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TableComponent, decorators: [{
|
|
2614
2617
|
type: Component,
|
|
@@ -2627,7 +2630,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
2627
2630
|
SdDate,
|
|
2628
2631
|
SdDatetime,
|
|
2629
2632
|
// Pipe cho phần viewed
|
|
2630
|
-
|
|
2633
|
+
SdTPipe,
|
|
2634
|
+
], template: "@if(component && tableOption) {\r\n <div style=\"width: 100%\">\r\n <sd-table [option]=\"tableOption\">\r\n @for(key of imageKeys; track key) {\r\n <ng-template [sdTableCellDef]=\"key\" let-item=\"item\">\r\n <sd-upload-file\r\n type=\"image\"\r\n [model]=\"item[key]\"\r\n [args]=\"getArgs(key)\"\r\n (modelChange)=\"onFileUploadChange(item, key, $event)\"\r\n align=\"left\"\r\n disabled\r\n previewWidth=\"50px\"\r\n previewHeight=\"50px\"></sd-upload-file>\r\n </ng-template>\r\n }\r\n @for(key of fileKeys; track key) {\r\n <ng-template [sdTableCellDef]=\"key\" let-item=\"item\">\r\n <sd-upload-file\r\n [model]=\"item[key]\"\r\n [args]=\"getArgs(key)\"\r\n (modelChange)=\"onFileUploadChange(item, key, $event)\"\r\n align=\"left\"\r\n disabled\r\n previewWidth=\"50px\"\r\n previewHeight=\"50px\"></sd-upload-file>\r\n </ng-template>\r\n }\r\n </sd-table>\r\n @if(!viewed && !component.properties?.viewed) {\r\n <sd-button\r\n prefixIcon=\"add\"\r\n color=\"primary\"\r\n (click)=\"onDetail()\"\r\n [title]=\"component.properties?.titleButtonCreate || ('core.component.form-builder.add-new' | sdT)\"></sd-button>\r\n }\r\n @if(!viewed && !component.properties?.viewed) {\r\n <sd-side-drawer [title]=\"'core.component.form-builder.detail' | sdT\" width=\"500px\">\r\n <div sdTitle>\r\n <span>{{ 'core.component.form-builder.create-update' | sdT }}</span>\r\n </div>\r\n <div sdBody class=\"c-table-create-update\">\r\n @if(!!component.columns?.length) {\r\n <div class=\"row mx-0\">\r\n @for(column of component.columns;track column.key) {\r\n @let validate = formRenderColumn[column.key].validate;\r\n <div class=\"col-12 px-0 mt-16\">\r\n @if(column.type === 'string') {\r\n <sd-input\r\n [form]=\"form\"\r\n [label]=\"column.label\"\r\n [(model)]=\"row[column.key]\"\r\n [required]=\"validate?.required\"\r\n [pattern]=\"column.validate?.pattern\"\r\n [patternErrorMessage]=\"column.validate?.patternErrorMessage\"></sd-input>\r\n }@else if(column.type === 'number') {\r\n <sd-input-number\r\n [form]=\"form\"\r\n [label]=\"column.label\"\r\n [(model)]=\"row[column.key]\"\r\n [required]=\"validate?.required\"\r\n [min]=\"column.validate?.min\"></sd-input-number>\r\n }@else if(column.type === 'radio') {\r\n <sd-radio\r\n [form]=\"form\"\r\n [label]=\"column.label\"\r\n [name]=\"column.key\"\r\n [items]=\"column.values\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [required]=\"validate?.required\"></sd-radio>\r\n }@else if(column.type === 'values') {\r\n <sd-autocomplete\r\n [form]=\"form\"\r\n [label]=\"column.label\"\r\n [(model)]=\"row[column.key]\"\r\n [items]=\"columnValues[column.key]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [required]=\"validate?.required\"></sd-autocomplete>\r\n }@else if(column.type === 'date') {\r\n <sd-date\r\n [form]=\"form\"\r\n [label]=\"column.label\"\r\n [(model)]=\"row[column.key]\"\r\n [required]=\"validate?.required\"></sd-date>\r\n }@else if(column.type === 'datetime') {\r\n <sd-datetime\r\n [form]=\"form\"\r\n [label]=\"column.label\"\r\n [(model)]=\"row[column.key]\"\r\n [required]=\"validate?.required\"></sd-datetime>\r\n }@else if(column.type === 'image') {\r\n <sd-upload-file\r\n [label]=\"column.label\"\r\n type=\"image\"\r\n [(model)]=\"row[column.key]\"\r\n [args]=\"column.args\"\r\n previewWidth=\"50px\"\r\n previewHeight=\"50px\"\r\n align=\"left\"></sd-upload-file>\r\n }@else if (column.type === 'file') {\r\n <sd-upload-file\r\n [label]=\"column.label\"\r\n type=\"file\"\r\n [(model)]=\"row[column.key]\"\r\n [args]=\"column.args\"\r\n previewWidth=\"50px\"\r\n previewHeight=\"50px\"\r\n align=\"left\"></sd-upload-file>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n \r\n </div>\r\n <div sdFooter class=\"text-right pr-16\">\r\n <sd-button [title]=\"'core.component.form-builder.save' | sdT\" prefixIcon=\"save\" color=\"primary\" type=\"fill\" (click)=\"onAccept()\"></sd-button>\r\n </div>\r\n </sd-side-drawer>\r\n }\r\n </div>\r\n}\r\n\r\n", styles: [":host{display:contents}.c-table-create-update{background:#fff;margin:-16px;padding:16px;height:calc(100vh - 97px)}\n"] }]
|
|
2631
2635
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: FormGenericService }], propDecorators: { uploadFiles: [{
|
|
2632
2636
|
type: ViewChildren,
|
|
2633
2637
|
args: [SdUploadFile]
|
|
@@ -3253,7 +3257,7 @@ class ExpressionBuilderComponent {
|
|
|
3253
3257
|
}
|
|
3254
3258
|
};
|
|
3255
3259
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ExpressionBuilderComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3256
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ExpressionBuilderComponent, isStandalone: true, selector: "expression-builder", inputs: { label: "label", _attributes: ["attributes", "_attributes"], _model: ["model", "_model"] }, outputs: { modelChange: "modelChange", sdChange: "sdChange", edit: "edit" }, viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true }], ngImport: i0, template: "<!-- <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ (model | expressionQuery) || '--' }}</a> -->\r\n<sd-input [label]=\"label\" style=\"width: 100%;\" [model]=\"(model | expressionQuery) || '--'\" disabled hideInlineError>\r\n <ng-template sdSuffixDef>\r\n <sd-button\r\n prefixIcon=\"edit\"\r\n color=\"primary\"\r\n (click)=\"onEdit()\"\r\n type=\"link\"></sd-button>\r\n </ng-template>\r\n</sd-input>\r\n@if (expression) {\r\n <sd-modal title=\"Thi\u1EBFt l\u1EADp bi\u1EC3u th\u1EE9c\">\r\n <div class=\"c-builder\">\r\n <div class=\"d-flex justify-content-end\">\r\n <sd-button\r\n prefixIcon=\"calculate\"\r\n class=\"mr-4\"\r\n title=\"Nh\u00F3m \u0111i\u1EC1u ki\u1EC7n\"\r\n color=\"primary\"\r\n (click)=\"addCombinator(expression.conditions)\"></sd-button>\r\n <sd-button\r\n prefixIcon=\"add\"\r\n title=\"\u0110i\u1EC1u ki\u1EC7n\"\r\n color=\"primary\"\r\n (click)=\"addCondition(expression.conditions)\"\r\n type=\"fill\"></sd-button>\r\n </div>\r\n <!-- C\u1EA5p 1 -->\r\n @for (conditionLv1 of expression.conditions; track conditionLv1.key; let idxLv1 = $index) {\r\n <div class=\"d-flex align-items-end py-8\" style=\"gap: 8px\">\r\n <div class=\"c-condition\">\r\n <!-- D\u00F2ng 1 ch\u1EC9 hi\u1EC7n WHERE -->\r\n @if (idxLv1 === 0) {\r\n <div class=\"c-where\">WHERE</div>\r\n }\r\n <!-- D\u00F2ng 2 hi\u1EC3n th\u1ECB combinator -->\r\n @if (idxLv1 === 1) {\r\n <div class=\"c-select\">\r\n <sd-select\r\n size=\"sm\"\r\n [(model)]=\"expression.combinator\"\r\n [items]=\"[\r\n { value: '&&', display: 'AND' },\r\n { value: '||', display: 'OR' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError=\"\"></sd-select>\r\n </div>\r\n }\r\n </div>\r\n @if (conditionLv1.type === 'condition') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 200px\"\r\n [(model)]=\"conditionLv1.field\"\r\n [items]=\"attributes\"\r\n (sdChange)=\"onChangeAttribute(conditionLv1)\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n @let fieldAttribute = attribute[conditionLv1.field!];\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 100px\"\r\n [(model)]=\"conditionLv1.operator\"\r\n [items]=\"attributeOperators[fieldAttribute?.type || 'string']\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [disabled]=\"!fieldAttribute?.type\"\r\n required\r\n hideInlineError></sd-select>\r\n @if (\r\n !!fieldAttribute?.type && conditionLv1.operator && conditionLv1.operator !== 'NULL' && conditionLv1.operator !== 'NOT_NULL'\r\n ) {\r\n @if (fieldAttribute.type === 'string') {\r\n <sd-input size=\"sm\" [form]=\"form\" style=\"flex: 1\" [(model)]=\"conditionLv1.value\" required hideInlineError></sd-input>\r\n } @else if (fieldAttribute.type === 'number') {\r\n <sd-input-number size=\"sm\" [form]=\"form\" style=\"flex: 1\" [(model)]=\"conditionLv1.value\" hideInlineError></sd-input-number>\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n [items]=\"numberAttributes\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n hideInlineError></sd-autocomplete>\r\n } @else if (fieldAttribute.type === 'datetime' && conditionLv1.dayInfo) {\r\n <sd-select\r\n size=\"sm\"\r\n placeholder=\"Th\u1EDDi \u0111i\u1EC3m\"\r\n [form]=\"form\"\r\n style=\"width: 150px\"\r\n [items]=\"types\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"conditionLv1.dayInfo.type\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv1)\"\r\n required\r\n hideInlineError>\r\n </sd-select>\r\n @if (conditionLv1.dayInfo.type === 'RELATED') {\r\n <sd-input-number\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 80px\"\r\n [(model)]=\"conditionLv1.dayInfo.relatedValue\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv1)\"\r\n [min]=\"1\"\r\n required\r\n hideInlineError>\r\n </sd-input-number>\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [items]=\"previouses\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"conditionLv1.dayInfo.related\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv1)\"\r\n required\r\n hideInlineError>\r\n </sd-select>\r\n } @else if (conditionLv1.dayInfo.type === 'DATETIME') {\r\n <sd-datetime\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv1)\"\r\n required\r\n hideInlineError>\r\n </sd-datetime>\r\n } @else if (conditionLv1.dayInfo.type === 'ATTRIBUTE') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n [items]=\"dateAttributes\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n hideInlineError></sd-autocomplete>\r\n }\r\n } @else if (fieldAttribute.type === 'boolean') {\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n [items]=\"[\r\n { value: true, display: fieldAttribute.displayOnTrue },\r\n { value: false, display: fieldAttribute.displayOnFalse }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-select>\r\n } @else if (fieldAttribute.type === 'values') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n [items]=\"fieldAttribute.values\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n }\r\n }\r\n <sd-button class=\"ml-auto\" prefixIcon=\"delete\" tooltip=\"X\u00F3a\" (click)=\"remove(expression.conditions, idxLv1)\"></sd-button>\r\n } @else if (conditionLv1.type === 'combinator') {\r\n <div class=\"c-builder\">\r\n <div class=\"d-flex justify-content-end\">\r\n <sd-button class=\"mr-4\" prefixIcon=\"delete\" tooltip=\"X\u00F3a\" (click)=\"remove(expression.conditions, idxLv1)\"></sd-button>\r\n <sd-button\r\n prefixIcon=\"add\"\r\n title=\"\u0110i\u1EC1u ki\u1EC7n\"\r\n size=\"sm\"\r\n color=\"primary\"\r\n (click)=\"addCondition(conditionLv1.conditions)\"\r\n type=\"fill\"></sd-button>\r\n </div>\r\n <!-- C\u1EA5p 2 -->\r\n @for (conditionLv2 of conditionLv1.conditions; track conditionLv2.key; let idxLv2 = $index) {\r\n <div class=\"d-flex align-items-end py-8\" style=\"gap: 8px\">\r\n <div class=\"c-condition\">\r\n <!-- D\u00F2ng 1 ch\u1EC9 hi\u1EC7n WHERE -->\r\n @if (idxLv2 === 0) {\r\n <div class=\"c-where\">WHERE</div>\r\n }\r\n <!-- D\u00F2ng 2 hi\u1EC3n th\u1ECB combinator -->\r\n @if (idxLv2 === 1) {\r\n <div class=\"c-select\">\r\n <sd-select\r\n size=\"sm\"\r\n [(model)]=\"conditionLv1.combinator\"\r\n [items]=\"[\r\n { value: '&&', display: 'AND' },\r\n { value: '||', display: 'OR' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError=\"\"></sd-select>\r\n </div>\r\n }\r\n </div>\r\n @if (conditionLv2.type === 'condition') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 200px\"\r\n [(model)]=\"conditionLv2.field\"\r\n [items]=\"attributes\"\r\n (sdChange)=\"onChangeAttribute(conditionLv2)\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n @let fieldAttribute = attribute[conditionLv2.field!];\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 100px\"\r\n [(model)]=\"conditionLv2.operator\"\r\n [items]=\"attributeOperators[fieldAttribute?.type || 'string']\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [disabled]=\"!fieldAttribute?.type\"\r\n required\r\n hideInlineError></sd-select>\r\n @if (\r\n !!fieldAttribute?.type &&\r\n conditionLv2.operator &&\r\n conditionLv2.operator !== 'NULL' &&\r\n conditionLv2.operator !== 'NOT_NULL'\r\n ) {\r\n @if (fieldAttribute.type === 'string') {\r\n <sd-input\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n required\r\n hideInlineError></sd-input>\r\n } @else if (fieldAttribute.type === 'number') {\r\n <sd-input-number\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n hideInlineError></sd-input-number>\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n [items]=\"numberAttributes\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n hideInlineError></sd-autocomplete>\r\n } @else if (fieldAttribute.type === 'datetime' && conditionLv2.dayInfo) {\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n placeholder=\"Th\u1EDDi \u0111i\u1EC3m\"\r\n style=\"width: 150px\"\r\n [items]=\"types\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"conditionLv2.dayInfo.type\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv2)\"\r\n required\r\n hideInlineError>\r\n </sd-select>\r\n @if (conditionLv2.dayInfo.type === 'RELATED') {\r\n <sd-input-number\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 80px\"\r\n [(model)]=\"conditionLv2.dayInfo.relatedValue\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv2)\"\r\n [min]=\"1\"\r\n required\r\n hideInlineError>\r\n </sd-input-number>\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [items]=\"previouses\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"conditionLv2.dayInfo.related\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv2)\"\r\n required\r\n hideInlineError>\r\n </sd-select>\r\n } @else if (conditionLv2.dayInfo.type === 'DATETIME') {\r\n <sd-datetime\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv2)\"\r\n required\r\n hideInlineError>\r\n </sd-datetime>\r\n } @else if (conditionLv2.dayInfo.type === 'ATTRIBUTE') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n [items]=\"dateAttributes\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n hideInlineError></sd-autocomplete>\r\n }\r\n } @else if (fieldAttribute.type === 'boolean') {\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n [items]=\"[\r\n { value: true, display: fieldAttribute.displayOnTrue },\r\n { value: false, display: fieldAttribute.displayOnFalse }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-select>\r\n } @else if (fieldAttribute.type === 'values') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n [items]=\"fieldAttribute.values\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n }\r\n }\r\n <sd-button\r\n class=\"ml-auto\"\r\n prefixIcon=\"delete\"\r\n tooltip=\"X\u00F3a\"\r\n (click)=\"remove(conditionLv1.conditions, idxLv1)\"></sd-button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n <ng-container sdFooter>\r\n <sd-button prefixIcon=\"save\" title=\"X\u00E1c nh\u1EADn\" (click)=\"onAccept()\" color=\"primary\" type=\"fill\"></sd-button>\r\n </ng-container>\r\n </sd-modal>\r\n}\r\n", styles: [".c-builder{padding:8px;width:100%;border:1px solid #e6e6e6;border-radius:4px}.c-builder .c-condition{width:80px}.c-builder .c-condition .c-where{width:80px;border:1px solid #e6e6e6;background-color:#f2f2f2;color:#757575;border-radius:4px;padding:4px;text-align:center}.c-builder .c-condition .c-select{margin-left:10px;width:70px}\n"], dependencies: [{ kind: "component", type: SdInput$1, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "tooltip", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect$1, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "hyperlink", "minWidthPanel", "hideInlineError", "required", "disabled", "viewed", "multiple", "validator", "inlineError", "appearance", "floatLabel", "items", "model"], outputs: ["modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdAutocomplete$1, selector: "sd-autocomplete", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "limit", "cacheChecksum", "hyperlink", "items", "hideInlineError", "addable", "required", "disabled", "viewed", "validator", "inlineError", "appearance", "model"], outputs: ["modelChange", "sdChange", "sdSelection", "sdAdd"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose"], outputs: ["sdClosed"] }, { kind: "pipe", type: ExpressionQueryPipe, name: "expressionQuery" }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "directive", type: SdSuffixDefDirective, selector: "[sdSuffixDef]" }, { kind: "ngmodule", type: MatIconModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3260
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ExpressionBuilderComponent, isStandalone: true, selector: "expression-builder", inputs: { label: "label", _attributes: ["attributes", "_attributes"], _model: ["model", "_model"] }, outputs: { modelChange: "modelChange", sdChange: "sdChange", edit: "edit" }, viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true }], ngImport: i0, template: "<!-- <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ (model | expressionQuery) || '--' }}</a> -->\r\n<sd-input [label]=\"label\" style=\"width: 100%;\" [model]=\"(model | expressionQuery) || '--'\" disabled hideInlineError>\r\n <ng-template sdSuffixDef>\r\n <sd-button\r\n prefixIcon=\"edit\"\r\n color=\"primary\"\r\n (click)=\"onEdit()\"\r\n type=\"link\"></sd-button>\r\n </ng-template>\r\n</sd-input>\r\n@if (expression) {\r\n <sd-modal [title]=\"'core.component.form-builder.set-expression' | sdT\">\r\n <div class=\"c-builder\">\r\n <div class=\"d-flex justify-content-end\">\r\n <sd-button\r\n prefixIcon=\"calculate\"\r\n class=\"mr-4\"\r\n [title]=\"'core.component.form-builder.condition-group' | sdT\"\r\n color=\"primary\"\r\n (click)=\"addCombinator(expression.conditions)\"></sd-button>\r\n <sd-button\r\n prefixIcon=\"add\"\r\n [title]=\"'core.component.form-builder.condition' | sdT\"\r\n color=\"primary\"\r\n (click)=\"addCondition(expression.conditions)\"\r\n type=\"fill\"></sd-button>\r\n </div>\r\n <!-- C\u1EA5p 1 -->\r\n @for (conditionLv1 of expression.conditions; track conditionLv1.key; let idxLv1 = $index) {\r\n <div class=\"d-flex align-items-end py-8\" style=\"gap: 8px\">\r\n <div class=\"c-condition\">\r\n <!-- D\u00F2ng 1 ch\u1EC9 hi\u1EC7n WHERE -->\r\n @if (idxLv1 === 0) {\r\n <div class=\"c-where\">WHERE</div>\r\n }\r\n <!-- D\u00F2ng 2 hi\u1EC3n th\u1ECB combinator -->\r\n @if (idxLv1 === 1) {\r\n <div class=\"c-select\">\r\n <sd-select\r\n size=\"sm\"\r\n [(model)]=\"expression.combinator\"\r\n [items]=\"[\r\n { value: '&&', display: 'AND' },\r\n { value: '||', display: 'OR' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError=\"\"></sd-select>\r\n </div>\r\n }\r\n </div>\r\n @if (conditionLv1.type === 'condition') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 200px\"\r\n [(model)]=\"conditionLv1.field\"\r\n [items]=\"attributes\"\r\n (sdChange)=\"onChangeAttribute(conditionLv1)\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n @let fieldAttribute = attribute[conditionLv1.field!];\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 100px\"\r\n [(model)]=\"conditionLv1.operator\"\r\n [items]=\"attributeOperators[fieldAttribute?.type || 'string']\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [disabled]=\"!fieldAttribute?.type\"\r\n required\r\n hideInlineError></sd-select>\r\n @if (\r\n !!fieldAttribute?.type && conditionLv1.operator && conditionLv1.operator !== 'NULL' && conditionLv1.operator !== 'NOT_NULL'\r\n ) {\r\n @if (fieldAttribute.type === 'string') {\r\n <sd-input size=\"sm\" [form]=\"form\" style=\"flex: 1\" [(model)]=\"conditionLv1.value\" required hideInlineError></sd-input>\r\n } @else if (fieldAttribute.type === 'number') {\r\n <sd-input-number size=\"sm\" [form]=\"form\" style=\"flex: 1\" [(model)]=\"conditionLv1.value\" hideInlineError></sd-input-number>\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n [items]=\"numberAttributes\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n hideInlineError></sd-autocomplete>\r\n } @else if (fieldAttribute.type === 'datetime' && conditionLv1.dayInfo) {\r\n <sd-select\r\n size=\"sm\"\r\n [placeholder]=\"'core.component.form-builder.time' | sdT\"\r\n [form]=\"form\"\r\n style=\"width: 150px\"\r\n [items]=\"types\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"conditionLv1.dayInfo.type\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv1)\"\r\n required\r\n hideInlineError>\r\n </sd-select>\r\n @if (conditionLv1.dayInfo.type === 'RELATED') {\r\n <sd-input-number\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 80px\"\r\n [(model)]=\"conditionLv1.dayInfo.relatedValue\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv1)\"\r\n [min]=\"1\"\r\n required\r\n hideInlineError>\r\n </sd-input-number>\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [items]=\"previouses\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"conditionLv1.dayInfo.related\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv1)\"\r\n required\r\n hideInlineError>\r\n </sd-select>\r\n } @else if (conditionLv1.dayInfo.type === 'DATETIME') {\r\n <sd-datetime\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv1)\"\r\n required\r\n hideInlineError>\r\n </sd-datetime>\r\n } @else if (conditionLv1.dayInfo.type === 'ATTRIBUTE') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n [items]=\"dateAttributes\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n hideInlineError></sd-autocomplete>\r\n }\r\n } @else if (fieldAttribute.type === 'boolean') {\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n [items]=\"[\r\n { value: true, display: fieldAttribute.displayOnTrue },\r\n { value: false, display: fieldAttribute.displayOnFalse }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-select>\r\n } @else if (fieldAttribute.type === 'values') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n [items]=\"fieldAttribute.values\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n }\r\n }\r\n <sd-button class=\"ml-auto\" prefixIcon=\"delete\" [tooltip]=\"'core.component.form-builder.delete' | sdT\" (click)=\"remove(expression.conditions, idxLv1)\"></sd-button>\r\n } @else if (conditionLv1.type === 'combinator') {\r\n <div class=\"c-builder\">\r\n <div class=\"d-flex justify-content-end\">\r\n <sd-button class=\"mr-4\" prefixIcon=\"delete\" [tooltip]=\"'core.component.form-builder.delete' | sdT\" (click)=\"remove(expression.conditions, idxLv1)\"></sd-button>\r\n <sd-button\r\n prefixIcon=\"add\"\r\n [title]=\"'core.component.form-builder.condition' | sdT\"\r\n size=\"sm\"\r\n color=\"primary\"\r\n (click)=\"addCondition(conditionLv1.conditions)\"\r\n type=\"fill\"></sd-button>\r\n </div>\r\n <!-- C\u1EA5p 2 -->\r\n @for (conditionLv2 of conditionLv1.conditions; track conditionLv2.key; let idxLv2 = $index) {\r\n <div class=\"d-flex align-items-end py-8\" style=\"gap: 8px\">\r\n <div class=\"c-condition\">\r\n <!-- D\u00F2ng 1 ch\u1EC9 hi\u1EC7n WHERE -->\r\n @if (idxLv2 === 0) {\r\n <div class=\"c-where\">WHERE</div>\r\n }\r\n <!-- D\u00F2ng 2 hi\u1EC3n th\u1ECB combinator -->\r\n @if (idxLv2 === 1) {\r\n <div class=\"c-select\">\r\n <sd-select\r\n size=\"sm\"\r\n [(model)]=\"conditionLv1.combinator\"\r\n [items]=\"[\r\n { value: '&&', display: 'AND' },\r\n { value: '||', display: 'OR' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError=\"\"></sd-select>\r\n </div>\r\n }\r\n </div>\r\n @if (conditionLv2.type === 'condition') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 200px\"\r\n [(model)]=\"conditionLv2.field\"\r\n [items]=\"attributes\"\r\n (sdChange)=\"onChangeAttribute(conditionLv2)\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n @let fieldAttribute = attribute[conditionLv2.field!];\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 100px\"\r\n [(model)]=\"conditionLv2.operator\"\r\n [items]=\"attributeOperators[fieldAttribute?.type || 'string']\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [disabled]=\"!fieldAttribute?.type\"\r\n required\r\n hideInlineError></sd-select>\r\n @if (\r\n !!fieldAttribute?.type &&\r\n conditionLv2.operator &&\r\n conditionLv2.operator !== 'NULL' &&\r\n conditionLv2.operator !== 'NOT_NULL'\r\n ) {\r\n @if (fieldAttribute.type === 'string') {\r\n <sd-input\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n required\r\n hideInlineError></sd-input>\r\n } @else if (fieldAttribute.type === 'number') {\r\n <sd-input-number\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n hideInlineError></sd-input-number>\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n [items]=\"numberAttributes\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n hideInlineError></sd-autocomplete>\r\n } @else if (fieldAttribute.type === 'datetime' && conditionLv2.dayInfo) {\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n [placeholder]=\"'core.component.form-builder.time' | sdT\"\r\n style=\"width: 150px\"\r\n [items]=\"types\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"conditionLv2.dayInfo.type\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv2)\"\r\n required\r\n hideInlineError>\r\n </sd-select>\r\n @if (conditionLv2.dayInfo.type === 'RELATED') {\r\n <sd-input-number\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 80px\"\r\n [(model)]=\"conditionLv2.dayInfo.relatedValue\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv2)\"\r\n [min]=\"1\"\r\n required\r\n hideInlineError>\r\n </sd-input-number>\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [items]=\"previouses\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"conditionLv2.dayInfo.related\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv2)\"\r\n required\r\n hideInlineError>\r\n </sd-select>\r\n } @else if (conditionLv2.dayInfo.type === 'DATETIME') {\r\n <sd-datetime\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv2)\"\r\n required\r\n hideInlineError>\r\n </sd-datetime>\r\n } @else if (conditionLv2.dayInfo.type === 'ATTRIBUTE') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n [items]=\"dateAttributes\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n hideInlineError></sd-autocomplete>\r\n }\r\n } @else if (fieldAttribute.type === 'boolean') {\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n [items]=\"[\r\n { value: true, display: fieldAttribute.displayOnTrue },\r\n { value: false, display: fieldAttribute.displayOnFalse }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-select>\r\n } @else if (fieldAttribute.type === 'values') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n [items]=\"fieldAttribute.values\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n }\r\n }\r\n <sd-button\r\n class=\"ml-auto\"\r\n prefixIcon=\"delete\"\r\n [tooltip]=\"'core.component.form-builder.delete' | sdT\"\r\n (click)=\"remove(conditionLv1.conditions, idxLv1)\"></sd-button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n <ng-container sdFooter>\r\n <sd-button prefixIcon=\"save\" [title]=\"'core.component.form-builder.confirm' | sdT\" (click)=\"onAccept()\" color=\"primary\" type=\"fill\"></sd-button>\r\n </ng-container>\r\n </sd-modal>\r\n}\r\n", styles: [".c-builder{padding:8px;width:100%;border:1px solid #e6e6e6;border-radius:4px}.c-builder .c-condition{width:80px}.c-builder .c-condition .c-where{width:80px;border:1px solid #e6e6e6;background-color:#f2f2f2;color:#757575;border-radius:4px;padding:4px;text-align:center}.c-builder .c-condition .c-select{margin-left:10px;width:70px}\n"], dependencies: [{ kind: "component", type: SdInput$1, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "tooltip", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect$1, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "hyperlink", "minWidthPanel", "hideInlineError", "required", "disabled", "viewed", "multiple", "validator", "inlineError", "appearance", "floatLabel", "items", "model"], outputs: ["modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdAutocomplete$1, selector: "sd-autocomplete", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "limit", "cacheChecksum", "hyperlink", "items", "hideInlineError", "addable", "required", "disabled", "viewed", "validator", "inlineError", "appearance", "model"], outputs: ["modelChange", "sdChange", "sdSelection", "sdAdd"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose"], outputs: ["sdClosed"] }, { kind: "pipe", type: ExpressionQueryPipe, name: "expressionQuery" }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "directive", type: SdSuffixDefDirective, selector: "[sdSuffixDef]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3257
3261
|
}
|
|
3258
3262
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ExpressionBuilderComponent, decorators: [{
|
|
3259
3263
|
type: Component,
|
|
@@ -3268,8 +3272,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
3268
3272
|
ExpressionQueryPipe,
|
|
3269
3273
|
SdDatetime,
|
|
3270
3274
|
SdSuffixDefDirective,
|
|
3271
|
-
MatIconModule
|
|
3272
|
-
], template: "<!-- <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ (model | expressionQuery) || '--' }}</a> -->\r\n<sd-input [label]=\"label\" style=\"width: 100%;\" [model]=\"(model | expressionQuery) || '--'\" disabled hideInlineError>\r\n <ng-template sdSuffixDef>\r\n <sd-button\r\n prefixIcon=\"edit\"\r\n color=\"primary\"\r\n (click)=\"onEdit()\"\r\n type=\"link\"></sd-button>\r\n </ng-template>\r\n</sd-input>\r\n@if (expression) {\r\n <sd-modal title=\"Thi\u1EBFt l\u1EADp bi\u1EC3u th\u1EE9c\">\r\n <div class=\"c-builder\">\r\n <div class=\"d-flex justify-content-end\">\r\n <sd-button\r\n prefixIcon=\"calculate\"\r\n class=\"mr-4\"\r\n title=\"Nh\u00F3m \u0111i\u1EC1u ki\u1EC7n\"\r\n color=\"primary\"\r\n (click)=\"addCombinator(expression.conditions)\"></sd-button>\r\n <sd-button\r\n prefixIcon=\"add\"\r\n title=\"\u0110i\u1EC1u ki\u1EC7n\"\r\n color=\"primary\"\r\n (click)=\"addCondition(expression.conditions)\"\r\n type=\"fill\"></sd-button>\r\n </div>\r\n <!-- C\u1EA5p 1 -->\r\n @for (conditionLv1 of expression.conditions; track conditionLv1.key; let idxLv1 = $index) {\r\n <div class=\"d-flex align-items-end py-8\" style=\"gap: 8px\">\r\n <div class=\"c-condition\">\r\n <!-- D\u00F2ng 1 ch\u1EC9 hi\u1EC7n WHERE -->\r\n @if (idxLv1 === 0) {\r\n <div class=\"c-where\">WHERE</div>\r\n }\r\n <!-- D\u00F2ng 2 hi\u1EC3n th\u1ECB combinator -->\r\n @if (idxLv1 === 1) {\r\n <div class=\"c-select\">\r\n <sd-select\r\n size=\"sm\"\r\n [(model)]=\"expression.combinator\"\r\n [items]=\"[\r\n { value: '&&', display: 'AND' },\r\n { value: '||', display: 'OR' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError=\"\"></sd-select>\r\n </div>\r\n }\r\n </div>\r\n @if (conditionLv1.type === 'condition') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 200px\"\r\n [(model)]=\"conditionLv1.field\"\r\n [items]=\"attributes\"\r\n (sdChange)=\"onChangeAttribute(conditionLv1)\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n @let fieldAttribute = attribute[conditionLv1.field!];\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 100px\"\r\n [(model)]=\"conditionLv1.operator\"\r\n [items]=\"attributeOperators[fieldAttribute?.type || 'string']\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [disabled]=\"!fieldAttribute?.type\"\r\n required\r\n hideInlineError></sd-select>\r\n @if (\r\n !!fieldAttribute?.type && conditionLv1.operator && conditionLv1.operator !== 'NULL' && conditionLv1.operator !== 'NOT_NULL'\r\n ) {\r\n @if (fieldAttribute.type === 'string') {\r\n <sd-input size=\"sm\" [form]=\"form\" style=\"flex: 1\" [(model)]=\"conditionLv1.value\" required hideInlineError></sd-input>\r\n } @else if (fieldAttribute.type === 'number') {\r\n <sd-input-number size=\"sm\" [form]=\"form\" style=\"flex: 1\" [(model)]=\"conditionLv1.value\" hideInlineError></sd-input-number>\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n [items]=\"numberAttributes\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n hideInlineError></sd-autocomplete>\r\n } @else if (fieldAttribute.type === 'datetime' && conditionLv1.dayInfo) {\r\n <sd-select\r\n size=\"sm\"\r\n placeholder=\"Th\u1EDDi \u0111i\u1EC3m\"\r\n [form]=\"form\"\r\n style=\"width: 150px\"\r\n [items]=\"types\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"conditionLv1.dayInfo.type\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv1)\"\r\n required\r\n hideInlineError>\r\n </sd-select>\r\n @if (conditionLv1.dayInfo.type === 'RELATED') {\r\n <sd-input-number\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 80px\"\r\n [(model)]=\"conditionLv1.dayInfo.relatedValue\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv1)\"\r\n [min]=\"1\"\r\n required\r\n hideInlineError>\r\n </sd-input-number>\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [items]=\"previouses\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"conditionLv1.dayInfo.related\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv1)\"\r\n required\r\n hideInlineError>\r\n </sd-select>\r\n } @else if (conditionLv1.dayInfo.type === 'DATETIME') {\r\n <sd-datetime\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv1)\"\r\n required\r\n hideInlineError>\r\n </sd-datetime>\r\n } @else if (conditionLv1.dayInfo.type === 'ATTRIBUTE') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n [items]=\"dateAttributes\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n hideInlineError></sd-autocomplete>\r\n }\r\n } @else if (fieldAttribute.type === 'boolean') {\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n [items]=\"[\r\n { value: true, display: fieldAttribute.displayOnTrue },\r\n { value: false, display: fieldAttribute.displayOnFalse }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-select>\r\n } @else if (fieldAttribute.type === 'values') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n [items]=\"fieldAttribute.values\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n }\r\n }\r\n <sd-button class=\"ml-auto\" prefixIcon=\"delete\" tooltip=\"X\u00F3a\" (click)=\"remove(expression.conditions, idxLv1)\"></sd-button>\r\n } @else if (conditionLv1.type === 'combinator') {\r\n <div class=\"c-builder\">\r\n <div class=\"d-flex justify-content-end\">\r\n <sd-button class=\"mr-4\" prefixIcon=\"delete\" tooltip=\"X\u00F3a\" (click)=\"remove(expression.conditions, idxLv1)\"></sd-button>\r\n <sd-button\r\n prefixIcon=\"add\"\r\n title=\"\u0110i\u1EC1u ki\u1EC7n\"\r\n size=\"sm\"\r\n color=\"primary\"\r\n (click)=\"addCondition(conditionLv1.conditions)\"\r\n type=\"fill\"></sd-button>\r\n </div>\r\n <!-- C\u1EA5p 2 -->\r\n @for (conditionLv2 of conditionLv1.conditions; track conditionLv2.key; let idxLv2 = $index) {\r\n <div class=\"d-flex align-items-end py-8\" style=\"gap: 8px\">\r\n <div class=\"c-condition\">\r\n <!-- D\u00F2ng 1 ch\u1EC9 hi\u1EC7n WHERE -->\r\n @if (idxLv2 === 0) {\r\n <div class=\"c-where\">WHERE</div>\r\n }\r\n <!-- D\u00F2ng 2 hi\u1EC3n th\u1ECB combinator -->\r\n @if (idxLv2 === 1) {\r\n <div class=\"c-select\">\r\n <sd-select\r\n size=\"sm\"\r\n [(model)]=\"conditionLv1.combinator\"\r\n [items]=\"[\r\n { value: '&&', display: 'AND' },\r\n { value: '||', display: 'OR' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError=\"\"></sd-select>\r\n </div>\r\n }\r\n </div>\r\n @if (conditionLv2.type === 'condition') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 200px\"\r\n [(model)]=\"conditionLv2.field\"\r\n [items]=\"attributes\"\r\n (sdChange)=\"onChangeAttribute(conditionLv2)\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n @let fieldAttribute = attribute[conditionLv2.field!];\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 100px\"\r\n [(model)]=\"conditionLv2.operator\"\r\n [items]=\"attributeOperators[fieldAttribute?.type || 'string']\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [disabled]=\"!fieldAttribute?.type\"\r\n required\r\n hideInlineError></sd-select>\r\n @if (\r\n !!fieldAttribute?.type &&\r\n conditionLv2.operator &&\r\n conditionLv2.operator !== 'NULL' &&\r\n conditionLv2.operator !== 'NOT_NULL'\r\n ) {\r\n @if (fieldAttribute.type === 'string') {\r\n <sd-input\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n required\r\n hideInlineError></sd-input>\r\n } @else if (fieldAttribute.type === 'number') {\r\n <sd-input-number\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n hideInlineError></sd-input-number>\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n [items]=\"numberAttributes\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n hideInlineError></sd-autocomplete>\r\n } @else if (fieldAttribute.type === 'datetime' && conditionLv2.dayInfo) {\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n placeholder=\"Th\u1EDDi \u0111i\u1EC3m\"\r\n style=\"width: 150px\"\r\n [items]=\"types\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"conditionLv2.dayInfo.type\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv2)\"\r\n required\r\n hideInlineError>\r\n </sd-select>\r\n @if (conditionLv2.dayInfo.type === 'RELATED') {\r\n <sd-input-number\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 80px\"\r\n [(model)]=\"conditionLv2.dayInfo.relatedValue\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv2)\"\r\n [min]=\"1\"\r\n required\r\n hideInlineError>\r\n </sd-input-number>\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [items]=\"previouses\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"conditionLv2.dayInfo.related\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv2)\"\r\n required\r\n hideInlineError>\r\n </sd-select>\r\n } @else if (conditionLv2.dayInfo.type === 'DATETIME') {\r\n <sd-datetime\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv2)\"\r\n required\r\n hideInlineError>\r\n </sd-datetime>\r\n } @else if (conditionLv2.dayInfo.type === 'ATTRIBUTE') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n [items]=\"dateAttributes\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n hideInlineError></sd-autocomplete>\r\n }\r\n } @else if (fieldAttribute.type === 'boolean') {\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n [items]=\"[\r\n { value: true, display: fieldAttribute.displayOnTrue },\r\n { value: false, display: fieldAttribute.displayOnFalse }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-select>\r\n } @else if (fieldAttribute.type === 'values') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n [items]=\"fieldAttribute.values\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n }\r\n }\r\n <sd-button\r\n class=\"ml-auto\"\r\n prefixIcon=\"delete\"\r\n tooltip=\"X\u00F3a\"\r\n (click)=\"remove(conditionLv1.conditions, idxLv1)\"></sd-button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n <ng-container sdFooter>\r\n <sd-button prefixIcon=\"save\" title=\"X\u00E1c nh\u1EADn\" (click)=\"onAccept()\" color=\"primary\" type=\"fill\"></sd-button>\r\n </ng-container>\r\n </sd-modal>\r\n}\r\n", styles: [".c-builder{padding:8px;width:100%;border:1px solid #e6e6e6;border-radius:4px}.c-builder .c-condition{width:80px}.c-builder .c-condition .c-where{width:80px;border:1px solid #e6e6e6;background-color:#f2f2f2;color:#757575;border-radius:4px;padding:4px;text-align:center}.c-builder .c-condition .c-select{margin-left:10px;width:70px}\n"] }]
|
|
3275
|
+
MatIconModule, SdTPipe
|
|
3276
|
+
], template: "<!-- <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ (model | expressionQuery) || '--' }}</a> -->\r\n<sd-input [label]=\"label\" style=\"width: 100%;\" [model]=\"(model | expressionQuery) || '--'\" disabled hideInlineError>\r\n <ng-template sdSuffixDef>\r\n <sd-button\r\n prefixIcon=\"edit\"\r\n color=\"primary\"\r\n (click)=\"onEdit()\"\r\n type=\"link\"></sd-button>\r\n </ng-template>\r\n</sd-input>\r\n@if (expression) {\r\n <sd-modal [title]=\"'core.component.form-builder.set-expression' | sdT\">\r\n <div class=\"c-builder\">\r\n <div class=\"d-flex justify-content-end\">\r\n <sd-button\r\n prefixIcon=\"calculate\"\r\n class=\"mr-4\"\r\n [title]=\"'core.component.form-builder.condition-group' | sdT\"\r\n color=\"primary\"\r\n (click)=\"addCombinator(expression.conditions)\"></sd-button>\r\n <sd-button\r\n prefixIcon=\"add\"\r\n [title]=\"'core.component.form-builder.condition' | sdT\"\r\n color=\"primary\"\r\n (click)=\"addCondition(expression.conditions)\"\r\n type=\"fill\"></sd-button>\r\n </div>\r\n <!-- C\u1EA5p 1 -->\r\n @for (conditionLv1 of expression.conditions; track conditionLv1.key; let idxLv1 = $index) {\r\n <div class=\"d-flex align-items-end py-8\" style=\"gap: 8px\">\r\n <div class=\"c-condition\">\r\n <!-- D\u00F2ng 1 ch\u1EC9 hi\u1EC7n WHERE -->\r\n @if (idxLv1 === 0) {\r\n <div class=\"c-where\">WHERE</div>\r\n }\r\n <!-- D\u00F2ng 2 hi\u1EC3n th\u1ECB combinator -->\r\n @if (idxLv1 === 1) {\r\n <div class=\"c-select\">\r\n <sd-select\r\n size=\"sm\"\r\n [(model)]=\"expression.combinator\"\r\n [items]=\"[\r\n { value: '&&', display: 'AND' },\r\n { value: '||', display: 'OR' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError=\"\"></sd-select>\r\n </div>\r\n }\r\n </div>\r\n @if (conditionLv1.type === 'condition') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 200px\"\r\n [(model)]=\"conditionLv1.field\"\r\n [items]=\"attributes\"\r\n (sdChange)=\"onChangeAttribute(conditionLv1)\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n @let fieldAttribute = attribute[conditionLv1.field!];\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 100px\"\r\n [(model)]=\"conditionLv1.operator\"\r\n [items]=\"attributeOperators[fieldAttribute?.type || 'string']\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [disabled]=\"!fieldAttribute?.type\"\r\n required\r\n hideInlineError></sd-select>\r\n @if (\r\n !!fieldAttribute?.type && conditionLv1.operator && conditionLv1.operator !== 'NULL' && conditionLv1.operator !== 'NOT_NULL'\r\n ) {\r\n @if (fieldAttribute.type === 'string') {\r\n <sd-input size=\"sm\" [form]=\"form\" style=\"flex: 1\" [(model)]=\"conditionLv1.value\" required hideInlineError></sd-input>\r\n } @else if (fieldAttribute.type === 'number') {\r\n <sd-input-number size=\"sm\" [form]=\"form\" style=\"flex: 1\" [(model)]=\"conditionLv1.value\" hideInlineError></sd-input-number>\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n [items]=\"numberAttributes\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n hideInlineError></sd-autocomplete>\r\n } @else if (fieldAttribute.type === 'datetime' && conditionLv1.dayInfo) {\r\n <sd-select\r\n size=\"sm\"\r\n [placeholder]=\"'core.component.form-builder.time' | sdT\"\r\n [form]=\"form\"\r\n style=\"width: 150px\"\r\n [items]=\"types\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"conditionLv1.dayInfo.type\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv1)\"\r\n required\r\n hideInlineError>\r\n </sd-select>\r\n @if (conditionLv1.dayInfo.type === 'RELATED') {\r\n <sd-input-number\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 80px\"\r\n [(model)]=\"conditionLv1.dayInfo.relatedValue\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv1)\"\r\n [min]=\"1\"\r\n required\r\n hideInlineError>\r\n </sd-input-number>\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [items]=\"previouses\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"conditionLv1.dayInfo.related\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv1)\"\r\n required\r\n hideInlineError>\r\n </sd-select>\r\n } @else if (conditionLv1.dayInfo.type === 'DATETIME') {\r\n <sd-datetime\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv1)\"\r\n required\r\n hideInlineError>\r\n </sd-datetime>\r\n } @else if (conditionLv1.dayInfo.type === 'ATTRIBUTE') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n [items]=\"dateAttributes\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n hideInlineError></sd-autocomplete>\r\n }\r\n } @else if (fieldAttribute.type === 'boolean') {\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n [items]=\"[\r\n { value: true, display: fieldAttribute.displayOnTrue },\r\n { value: false, display: fieldAttribute.displayOnFalse }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-select>\r\n } @else if (fieldAttribute.type === 'values') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv1.value\"\r\n [items]=\"fieldAttribute.values\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n }\r\n }\r\n <sd-button class=\"ml-auto\" prefixIcon=\"delete\" [tooltip]=\"'core.component.form-builder.delete' | sdT\" (click)=\"remove(expression.conditions, idxLv1)\"></sd-button>\r\n } @else if (conditionLv1.type === 'combinator') {\r\n <div class=\"c-builder\">\r\n <div class=\"d-flex justify-content-end\">\r\n <sd-button class=\"mr-4\" prefixIcon=\"delete\" [tooltip]=\"'core.component.form-builder.delete' | sdT\" (click)=\"remove(expression.conditions, idxLv1)\"></sd-button>\r\n <sd-button\r\n prefixIcon=\"add\"\r\n [title]=\"'core.component.form-builder.condition' | sdT\"\r\n size=\"sm\"\r\n color=\"primary\"\r\n (click)=\"addCondition(conditionLv1.conditions)\"\r\n type=\"fill\"></sd-button>\r\n </div>\r\n <!-- C\u1EA5p 2 -->\r\n @for (conditionLv2 of conditionLv1.conditions; track conditionLv2.key; let idxLv2 = $index) {\r\n <div class=\"d-flex align-items-end py-8\" style=\"gap: 8px\">\r\n <div class=\"c-condition\">\r\n <!-- D\u00F2ng 1 ch\u1EC9 hi\u1EC7n WHERE -->\r\n @if (idxLv2 === 0) {\r\n <div class=\"c-where\">WHERE</div>\r\n }\r\n <!-- D\u00F2ng 2 hi\u1EC3n th\u1ECB combinator -->\r\n @if (idxLv2 === 1) {\r\n <div class=\"c-select\">\r\n <sd-select\r\n size=\"sm\"\r\n [(model)]=\"conditionLv1.combinator\"\r\n [items]=\"[\r\n { value: '&&', display: 'AND' },\r\n { value: '||', display: 'OR' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError=\"\"></sd-select>\r\n </div>\r\n }\r\n </div>\r\n @if (conditionLv2.type === 'condition') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 200px\"\r\n [(model)]=\"conditionLv2.field\"\r\n [items]=\"attributes\"\r\n (sdChange)=\"onChangeAttribute(conditionLv2)\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n @let fieldAttribute = attribute[conditionLv2.field!];\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 100px\"\r\n [(model)]=\"conditionLv2.operator\"\r\n [items]=\"attributeOperators[fieldAttribute?.type || 'string']\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [disabled]=\"!fieldAttribute?.type\"\r\n required\r\n hideInlineError></sd-select>\r\n @if (\r\n !!fieldAttribute?.type &&\r\n conditionLv2.operator &&\r\n conditionLv2.operator !== 'NULL' &&\r\n conditionLv2.operator !== 'NOT_NULL'\r\n ) {\r\n @if (fieldAttribute.type === 'string') {\r\n <sd-input\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n required\r\n hideInlineError></sd-input>\r\n } @else if (fieldAttribute.type === 'number') {\r\n <sd-input-number\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n hideInlineError></sd-input-number>\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n [items]=\"numberAttributes\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n hideInlineError></sd-autocomplete>\r\n } @else if (fieldAttribute.type === 'datetime' && conditionLv2.dayInfo) {\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n [placeholder]=\"'core.component.form-builder.time' | sdT\"\r\n style=\"width: 150px\"\r\n [items]=\"types\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"conditionLv2.dayInfo.type\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv2)\"\r\n required\r\n hideInlineError>\r\n </sd-select>\r\n @if (conditionLv2.dayInfo.type === 'RELATED') {\r\n <sd-input-number\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"width: 80px\"\r\n [(model)]=\"conditionLv2.dayInfo.relatedValue\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv2)\"\r\n [min]=\"1\"\r\n required\r\n hideInlineError>\r\n </sd-input-number>\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [items]=\"previouses\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [(model)]=\"conditionLv2.dayInfo.related\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv2)\"\r\n required\r\n hideInlineError>\r\n </sd-select>\r\n } @else if (conditionLv2.dayInfo.type === 'DATETIME') {\r\n <sd-datetime\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n (sdChange)=\"onChangeDateInfo(conditionLv2)\"\r\n required\r\n hideInlineError>\r\n </sd-datetime>\r\n } @else if (conditionLv2.dayInfo.type === 'ATTRIBUTE') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n [items]=\"dateAttributes\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n hideInlineError></sd-autocomplete>\r\n }\r\n } @else if (fieldAttribute.type === 'boolean') {\r\n <sd-select\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n [items]=\"[\r\n { value: true, display: fieldAttribute.displayOnTrue },\r\n { value: false, display: fieldAttribute.displayOnFalse }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-select>\r\n } @else if (fieldAttribute.type === 'values') {\r\n <sd-autocomplete\r\n size=\"sm\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"conditionLv2.value\"\r\n [items]=\"fieldAttribute.values\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n }\r\n }\r\n <sd-button\r\n class=\"ml-auto\"\r\n prefixIcon=\"delete\"\r\n [tooltip]=\"'core.component.form-builder.delete' | sdT\"\r\n (click)=\"remove(conditionLv1.conditions, idxLv1)\"></sd-button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n <ng-container sdFooter>\r\n <sd-button prefixIcon=\"save\" [title]=\"'core.component.form-builder.confirm' | sdT\" (click)=\"onAccept()\" color=\"primary\" type=\"fill\"></sd-button>\r\n </ng-container>\r\n </sd-modal>\r\n}\r\n", styles: [".c-builder{padding:8px;width:100%;border:1px solid #e6e6e6;border-radius:4px}.c-builder .c-condition{width:80px}.c-builder .c-condition .c-where{width:80px;border:1px solid #e6e6e6;background-color:#f2f2f2;color:#757575;border-radius:4px;padding:4px;text-align:center}.c-builder .c-condition .c-select{margin-left:10px;width:70px}\n"] }]
|
|
3273
3277
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { modal: [{
|
|
3274
3278
|
type: ViewChild,
|
|
3275
3279
|
args: [SdModal]
|
|
@@ -3527,11 +3531,11 @@ class AttributeSwitch {
|
|
|
3527
3531
|
this.modelChange.emit(!!value);
|
|
3528
3532
|
};
|
|
3529
3533
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: AttributeSwitch, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3530
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.21", type: AttributeSwitch, isStandalone: true, selector: "attribute-switch", inputs: { form: "form", _label: ["label", "_label"], _model: ["model", "_model"] }, outputs: { modelChange: "modelChange" }, ngImport: i0, template: "<!-- <div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <sd-switch size=\"sm\" [form]=\"form\" [(model)]=\"model\" (sdChange)=\"onChange($event)\" hideInlineError></sd-switch>\r\n</div> -->\r\n<sd-select\r\n class=\"py-8\"\r\n [label]=\"label!\"\r\n [form]=\"form\"\r\n [(model)]=\"model\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [items]=\"[\r\n { value: true, display: '
|
|
3534
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.21", type: AttributeSwitch, isStandalone: true, selector: "attribute-switch", inputs: { form: "form", _label: ["label", "_label"], _model: ["model", "_model"] }, outputs: { modelChange: "modelChange" }, ngImport: i0, template: "<!-- <div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <sd-switch size=\"sm\" [form]=\"form\" [(model)]=\"model\" (sdChange)=\"onChange($event)\" hideInlineError></sd-switch>\r\n</div> -->\r\n<sd-select\r\n class=\"py-8\"\r\n [label]=\"label!\"\r\n [form]=\"form\"\r\n [(model)]=\"model\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [items]=\"[\r\n { value: true, display: ('core.confirm.yes-short' | sdT) },\r\n { value: false, display: ('core.confirm.no-short' | sdT) }\r\n ]\"\r\n (sdChange)=\"onChange($event)\"\r\n hideInlineError></sd-select>\r\n", dependencies: [{ kind: "component", type: SdSelect$1, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "hyperlink", "minWidthPanel", "hideInlineError", "required", "disabled", "viewed", "multiple", "validator", "inlineError", "appearance", "floatLabel", "items", "model"], outputs: ["modelChange", "sdChange", "sdSelection"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }] });
|
|
3531
3535
|
}
|
|
3532
3536
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: AttributeSwitch, decorators: [{
|
|
3533
3537
|
type: Component,
|
|
3534
|
-
args: [{ selector: 'attribute-switch', imports: [SdSelect$1], template: "<!-- <div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <sd-switch size=\"sm\" [form]=\"form\" [(model)]=\"model\" (sdChange)=\"onChange($event)\" hideInlineError></sd-switch>\r\n</div> -->\r\n<sd-select\r\n class=\"py-8\"\r\n [label]=\"label!\"\r\n [form]=\"form\"\r\n [(model)]=\"model\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [items]=\"[\r\n { value: true, display: '
|
|
3538
|
+
args: [{ selector: 'attribute-switch', imports: [SdSelect$1, SdTPipe], template: "<!-- <div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <sd-switch size=\"sm\" [form]=\"form\" [(model)]=\"model\" (sdChange)=\"onChange($event)\" hideInlineError></sd-switch>\r\n</div> -->\r\n<sd-select\r\n class=\"py-8\"\r\n [label]=\"label!\"\r\n [form]=\"form\"\r\n [(model)]=\"model\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n [items]=\"[\r\n { value: true, display: ('core.confirm.yes-short' | sdT) },\r\n { value: false, display: ('core.confirm.no-short' | sdT) }\r\n ]\"\r\n (sdChange)=\"onChange($event)\"\r\n hideInlineError></sd-select>\r\n" }]
|
|
3535
3539
|
}], propDecorators: { form: [{
|
|
3536
3540
|
type: Input
|
|
3537
3541
|
}], _label: [{
|
|
@@ -3567,11 +3571,11 @@ class AttributeTemplate {
|
|
|
3567
3571
|
}
|
|
3568
3572
|
};
|
|
3569
3573
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: AttributeTemplate, deps: [{ token: SD_FORM_GENERIC_CONFIGURATION }], target: i0.ɵɵFactoryTarget.Component });
|
|
3570
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: AttributeTemplate, isStandalone: true, selector: "attribute-template", inputs: { _component: ["component", "_component"] }, outputs: { sdChange: "sdChange" }, ngImport: i0, template: "@if (templates.length) {\r\n <!-- <div class=\"d-flex align-items-center py-4\">\r\n <div class=\"T14M\" style=\"flex: 1\">D\u1EEF li\u1EC7u m\u1EABu</div>\r\n <sd-autocomplete\r\n style=\"width: 200px\"\r\n size=\"sm\"\r\n [(model)]=\"component.template\"\r\n [items]=\"templates\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n (sdChange)=\"onChange($event)\"\r\n hideInlineError></sd-autocomplete>\r\n </div> -->\r\n <sd-autocomplete\r\n class=\"py-8\"\r\n label=\"
|
|
3574
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: AttributeTemplate, isStandalone: true, selector: "attribute-template", inputs: { _component: ["component", "_component"] }, outputs: { sdChange: "sdChange" }, ngImport: i0, template: "@if (templates.length) {\r\n <!-- <div class=\"d-flex align-items-center py-4\">\r\n <div class=\"T14M\" style=\"flex: 1\">D\u1EEF li\u1EC7u m\u1EABu</div>\r\n <sd-autocomplete\r\n style=\"width: 200px\"\r\n size=\"sm\"\r\n [(model)]=\"component.template\"\r\n [items]=\"templates\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n (sdChange)=\"onChange($event)\"\r\n hideInlineError></sd-autocomplete>\r\n </div> -->\r\n <sd-autocomplete\r\n class=\"py-8\"\r\n [label]=\"'core.component.form-builder.template-data' | sdT\"\r\n [(model)]=\"component.template\"\r\n [items]=\"templates\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n (sdChange)=\"onChange($event)\"\r\n hideInlineError></sd-autocomplete>\r\n}\r\n", dependencies: [{ kind: "component", type: SdAutocomplete$1, selector: "sd-autocomplete", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "limit", "cacheChecksum", "hyperlink", "items", "hideInlineError", "addable", "required", "disabled", "viewed", "validator", "inlineError", "appearance", "model"], outputs: ["modelChange", "sdChange", "sdSelection", "sdAdd"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }] });
|
|
3571
3575
|
}
|
|
3572
3576
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: AttributeTemplate, decorators: [{
|
|
3573
3577
|
type: Component,
|
|
3574
|
-
args: [{ selector: 'attribute-template', imports: [SdAutocomplete$1], template: "@if (templates.length) {\r\n <!-- <div class=\"d-flex align-items-center py-4\">\r\n <div class=\"T14M\" style=\"flex: 1\">D\u1EEF li\u1EC7u m\u1EABu</div>\r\n <sd-autocomplete\r\n style=\"width: 200px\"\r\n size=\"sm\"\r\n [(model)]=\"component.template\"\r\n [items]=\"templates\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n (sdChange)=\"onChange($event)\"\r\n hideInlineError></sd-autocomplete>\r\n </div> -->\r\n <sd-autocomplete\r\n class=\"py-8\"\r\n label=\"
|
|
3578
|
+
args: [{ selector: 'attribute-template', imports: [SdAutocomplete$1, SdTPipe], template: "@if (templates.length) {\r\n <!-- <div class=\"d-flex align-items-center py-4\">\r\n <div class=\"T14M\" style=\"flex: 1\">D\u1EEF li\u1EC7u m\u1EABu</div>\r\n <sd-autocomplete\r\n style=\"width: 200px\"\r\n size=\"sm\"\r\n [(model)]=\"component.template\"\r\n [items]=\"templates\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n (sdChange)=\"onChange($event)\"\r\n hideInlineError></sd-autocomplete>\r\n </div> -->\r\n <sd-autocomplete\r\n class=\"py-8\"\r\n [label]=\"'core.component.form-builder.template-data' | sdT\"\r\n [(model)]=\"component.template\"\r\n [items]=\"templates\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n (sdChange)=\"onChange($event)\"\r\n hideInlineError></sd-autocomplete>\r\n}\r\n" }]
|
|
3575
3579
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
3576
3580
|
type: Inject,
|
|
3577
3581
|
args: [SD_FORM_GENERIC_CONFIGURATION]
|
|
@@ -3698,11 +3702,11 @@ class TextfieldAttribute {
|
|
|
3698
3702
|
}
|
|
3699
3703
|
};
|
|
3700
3704
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TextfieldAttribute, deps: [{ token: i0.ChangeDetectorRef }, { token: BuilderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3701
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: TextfieldAttribute, isStandalone: true, selector: "textfield-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" title=\"
|
|
3705
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: TextfieldAttribute, isStandalone: true, selector: "textfield-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n <attribute-textarea [form]=\"form\" [label]=\"'core.component.form-builder.hint' | sdT\" [(model)]=\"component.helperText\"></attribute-textarea>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.default-value' | sdT\" [(model)]=\"component.defaultValue\"></attribute-input>\r\n</sd-section>\r\n\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n <attribute-input-number [label]=\"'core.component.form-builder.maxlength' | sdT\" [(model)]=\"component.validate!.maxlength\"></attribute-input-number>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n <attribute-input label=\"Expression\" [(model)]=\"component.validate!.pattern\"></attribute-input>\r\n <attribute-input label=\"Expression message\" [(model)]=\"component.validate!.patternErrorMessage\"></attribute-input>\r\n </sd-section>\r\n}\r\n", dependencies: [{ kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "collapsed", "collapsable", "hideHeader", "noPaddingBody"], outputs: ["collapsedChange"] }, { kind: "component", type: AttributeTemplate, selector: "attribute-template", inputs: ["component"], outputs: ["sdChange"] }, { kind: "component", type: AttributeExpression, selector: "attribute-expression", inputs: ["components", "variables", "label", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeInput, selector: "attribute-input", inputs: ["form", "label", "disabled", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeInputNumber, selector: "attribute-input-number", inputs: ["label", "disabled", "model"], outputs: ["modelChange"] }, { kind: "component", type: AttributeSwitch, selector: "attribute-switch", inputs: ["form", "label", "model"], outputs: ["modelChange"] }, { kind: "component", type: AttributeTextarea, selector: "attribute-textarea", inputs: ["form", "label", "disabled", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3702
3706
|
}
|
|
3703
3707
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TextfieldAttribute, decorators: [{
|
|
3704
3708
|
type: Component,
|
|
3705
|
-
args: [{ selector: 'textfield-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeExpression, AttributeInput, AttributeInputNumber, AttributeSwitch, AttributeTextarea], template: "<sd-section class=\"mt-8\" title=\"
|
|
3709
|
+
args: [{ selector: 'textfield-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeExpression, AttributeInput, AttributeInputNumber, AttributeSwitch, AttributeTextarea, SdTPipe], template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n <attribute-textarea [form]=\"form\" [label]=\"'core.component.form-builder.hint' | sdT\" [(model)]=\"component.helperText\"></attribute-textarea>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.default-value' | sdT\" [(model)]=\"component.defaultValue\"></attribute-input>\r\n</sd-section>\r\n\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n <attribute-input-number [label]=\"'core.component.form-builder.maxlength' | sdT\" [(model)]=\"component.validate!.maxlength\"></attribute-input-number>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n <attribute-input label=\"Expression\" [(model)]=\"component.validate!.pattern\"></attribute-input>\r\n <attribute-input label=\"Expression message\" [(model)]=\"component.validate!.patternErrorMessage\"></attribute-input>\r\n </sd-section>\r\n}\r\n" }]
|
|
3706
3710
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: BuilderService }], propDecorators: { components: [{
|
|
3707
3711
|
type: Input,
|
|
3708
3712
|
args: [{ required: true }]
|
|
@@ -3798,11 +3802,11 @@ class TextareaAttribute {
|
|
|
3798
3802
|
}
|
|
3799
3803
|
};
|
|
3800
3804
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TextareaAttribute, deps: [{ token: i0.ChangeDetectorRef }, { token: BuilderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3801
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: TextareaAttribute, isStandalone: true, selector: "textarea-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" title=\"
|
|
3805
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: TextareaAttribute, isStandalone: true, selector: "textarea-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n <attribute-textarea [form]=\"form\" [label]=\"'core.component.form-builder.hint' | sdT\" [(model)]=\"component.helperText\"></attribute-textarea>\r\n</sd-section>\r\n\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n <attribute-input-number [label]=\"'core.component.form-builder.maxlength' | sdT\" [(model)]=\"component.validate!.maxlength\"></attribute-input-number>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n}\r\n", dependencies: [{ kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "collapsed", "collapsable", "hideHeader", "noPaddingBody"], outputs: ["collapsedChange"] }, { kind: "component", type: AttributeTemplate, selector: "attribute-template", inputs: ["component"], outputs: ["sdChange"] }, { kind: "component", type: AttributeInput, selector: "attribute-input", inputs: ["form", "label", "disabled", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeInputNumber, selector: "attribute-input-number", inputs: ["label", "disabled", "model"], outputs: ["modelChange"] }, { kind: "component", type: AttributeSwitch, selector: "attribute-switch", inputs: ["form", "label", "model"], outputs: ["modelChange"] }, { kind: "component", type: AttributeExpression, selector: "attribute-expression", inputs: ["components", "variables", "label", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeTextarea, selector: "attribute-textarea", inputs: ["form", "label", "disabled", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3802
3806
|
}
|
|
3803
3807
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TextareaAttribute, decorators: [{
|
|
3804
3808
|
type: Component,
|
|
3805
|
-
args: [{ selector: 'textarea-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeInput, AttributeInputNumber, AttributeSwitch, AttributeExpression, AttributeTextarea], template: "<sd-section class=\"mt-8\" title=\"
|
|
3809
|
+
args: [{ selector: 'textarea-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeInput, AttributeInputNumber, AttributeSwitch, AttributeExpression, AttributeTextarea, SdTPipe], template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n <attribute-textarea [form]=\"form\" [label]=\"'core.component.form-builder.hint' | sdT\" [(model)]=\"component.helperText\"></attribute-textarea>\r\n</sd-section>\r\n\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n <attribute-input-number [label]=\"'core.component.form-builder.maxlength' | sdT\" [(model)]=\"component.validate!.maxlength\"></attribute-input-number>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n}\r\n" }]
|
|
3806
3810
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: BuilderService }], propDecorators: { components: [{
|
|
3807
3811
|
type: Input,
|
|
3808
3812
|
args: [{ required: true }]
|
|
@@ -3946,11 +3950,11 @@ class ChipStringAttribute {
|
|
|
3946
3950
|
this.#changes.next();
|
|
3947
3951
|
};
|
|
3948
3952
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ChipStringAttribute, deps: [{ token: i0.ChangeDetectorRef }, { token: BuilderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3949
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ChipStringAttribute, isStandalone: true, selector: "chip-string-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" title=\"
|
|
3953
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ChipStringAttribute, isStandalone: true, selector: "chip-string-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n @if (component.properties!.viewed) {\r\n <attribute-input label=\"Hyperlink\" [(model)]=\"component.properties!.hyperlink\"></attribute-input>\r\n }\r\n</sd-section>\r\n\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n @if (!component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n }\r\n}\r\n", dependencies: [{ kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "collapsed", "collapsable", "hideHeader", "noPaddingBody"], outputs: ["collapsedChange"] }, { kind: "component", type: AttributeTemplate, selector: "attribute-template", inputs: ["component"], outputs: ["sdChange"] }, { kind: "component", type: AttributeInput, selector: "attribute-input", inputs: ["form", "label", "disabled", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeSwitch, selector: "attribute-switch", inputs: ["form", "label", "model"], outputs: ["modelChange"] }, { kind: "component", type: AttributeExpression, selector: "attribute-expression", inputs: ["components", "variables", "label", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3950
3954
|
}
|
|
3951
3955
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ChipStringAttribute, decorators: [{
|
|
3952
3956
|
type: Component,
|
|
3953
|
-
args: [{ selector: 'chip-string-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeInput, AttributeSwitch, AttributeExpression], template: "<sd-section class=\"mt-8\" title=\"
|
|
3957
|
+
args: [{ selector: 'chip-string-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeInput, AttributeSwitch, AttributeExpression, SdTPipe], template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n @if (component.properties!.viewed) {\r\n <attribute-input label=\"Hyperlink\" [(model)]=\"component.properties!.hyperlink\"></attribute-input>\r\n }\r\n</sd-section>\r\n\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n @if (!component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n }\r\n}\r\n" }]
|
|
3954
3958
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: BuilderService }], propDecorators: { components: [{
|
|
3955
3959
|
type: Input,
|
|
3956
3960
|
args: [{ required: true }]
|
|
@@ -4055,11 +4059,11 @@ class ChipCalendarAttribute {
|
|
|
4055
4059
|
this.#changes.next();
|
|
4056
4060
|
};
|
|
4057
4061
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ChipCalendarAttribute, deps: [{ token: i0.ChangeDetectorRef }, { token: BuilderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4058
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ChipCalendarAttribute, isStandalone: true, selector: "chip-calendar-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" title=\"
|
|
4062
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ChipCalendarAttribute, isStandalone: true, selector: "chip-calendar-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n @if (component.properties!.viewed) {\r\n <attribute-input label=\"Hyperlink\" [(model)]=\"component.properties!.hyperlink\"></attribute-input>\r\n }\r\n</sd-section>\r\n\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n @if (!component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n }\r\n}\r\n", dependencies: [{ kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "collapsed", "collapsable", "hideHeader", "noPaddingBody"], outputs: ["collapsedChange"] }, { kind: "component", type: AttributeTemplate, selector: "attribute-template", inputs: ["component"], outputs: ["sdChange"] }, { kind: "component", type: AttributeInput, selector: "attribute-input", inputs: ["form", "label", "disabled", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeSwitch, selector: "attribute-switch", inputs: ["form", "label", "model"], outputs: ["modelChange"] }, { kind: "component", type: AttributeExpression, selector: "attribute-expression", inputs: ["components", "variables", "label", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4059
4063
|
}
|
|
4060
4064
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ChipCalendarAttribute, decorators: [{
|
|
4061
4065
|
type: Component,
|
|
4062
|
-
args: [{ selector: 'chip-calendar-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeInput, AttributeSwitch, AttributeExpression], template: "<sd-section class=\"mt-8\" title=\"
|
|
4066
|
+
args: [{ selector: 'chip-calendar-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeInput, AttributeSwitch, AttributeExpression, SdTPipe], template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n @if (component.properties!.viewed) {\r\n <attribute-input label=\"Hyperlink\" [(model)]=\"component.properties!.hyperlink\"></attribute-input>\r\n }\r\n</sd-section>\r\n\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n @if (!component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n }\r\n}\r\n" }]
|
|
4063
4067
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: BuilderService }], propDecorators: { components: [{
|
|
4064
4068
|
type: Input,
|
|
4065
4069
|
args: [{ required: true }]
|
|
@@ -4121,11 +4125,11 @@ class NumberAttribute {
|
|
|
4121
4125
|
}
|
|
4122
4126
|
};
|
|
4123
4127
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: NumberAttribute, deps: [{ token: i0.ChangeDetectorRef }, { token: BuilderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4124
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: NumberAttribute, isStandalone: true, selector: "number-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" title=\"
|
|
4128
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: NumberAttribute, isStandalone: true, selector: "number-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n <attribute-textarea [form]=\"form\" [label]=\"'core.component.form-builder.hint' | sdT\" [(model)]=\"component.helperText\"></attribute-textarea>\r\n</sd-section>\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n <attribute-input-number [label]=\"'core.component.form-builder.min' | sdT\" [(model)]=\"component.validate!.min\"></attribute-input-number>\r\n <attribute-input-number [label]=\"'core.component.form-builder.max' | sdT\" [(model)]=\"component.validate!.max\"></attribute-input-number>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n}\r\n", dependencies: [{ kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "collapsed", "collapsable", "hideHeader", "noPaddingBody"], outputs: ["collapsedChange"] }, { kind: "component", type: AttributeTemplate, selector: "attribute-template", inputs: ["component"], outputs: ["sdChange"] }, { kind: "component", type: AttributeInput, selector: "attribute-input", inputs: ["form", "label", "disabled", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeInputNumber, selector: "attribute-input-number", inputs: ["label", "disabled", "model"], outputs: ["modelChange"] }, { kind: "component", type: AttributeSwitch, selector: "attribute-switch", inputs: ["form", "label", "model"], outputs: ["modelChange"] }, { kind: "component", type: AttributeExpression, selector: "attribute-expression", inputs: ["components", "variables", "label", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeTextarea, selector: "attribute-textarea", inputs: ["form", "label", "disabled", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4125
4129
|
}
|
|
4126
4130
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: NumberAttribute, decorators: [{
|
|
4127
4131
|
type: Component,
|
|
4128
|
-
args: [{ selector: 'number-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeInput, AttributeInputNumber, AttributeSwitch, AttributeExpression, AttributeTextarea], template: "<sd-section class=\"mt-8\" title=\"
|
|
4132
|
+
args: [{ selector: 'number-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeInput, AttributeInputNumber, AttributeSwitch, AttributeExpression, AttributeTextarea, SdTPipe], template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n <attribute-textarea [form]=\"form\" [label]=\"'core.component.form-builder.hint' | sdT\" [(model)]=\"component.helperText\"></attribute-textarea>\r\n</sd-section>\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n <attribute-input-number [label]=\"'core.component.form-builder.min' | sdT\" [(model)]=\"component.validate!.min\"></attribute-input-number>\r\n <attribute-input-number [label]=\"'core.component.form-builder.max' | sdT\" [(model)]=\"component.validate!.max\"></attribute-input-number>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n}\r\n" }]
|
|
4129
4133
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: BuilderService }], propDecorators: { components: [{
|
|
4130
4134
|
type: Input,
|
|
4131
4135
|
args: [{ required: true }]
|
|
@@ -4328,11 +4332,11 @@ class DatetimeAttribute {
|
|
|
4328
4332
|
}
|
|
4329
4333
|
};
|
|
4330
4334
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: DatetimeAttribute, deps: [{ token: i0.ChangeDetectorRef }, { token: BuilderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4331
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: DatetimeAttribute, isStandalone: true, selector: "datetime-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" title=\"
|
|
4335
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: DatetimeAttribute, isStandalone: true, selector: "datetime-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n <attribute-select\r\n [label]=\"'core.component.form-builder.format' | sdT\"\r\n [(model)]=\"component.subtype\"\r\n [items]=\"[\r\n { value: 'date', display: 'dd/MM/yyyy' },\r\n { value: 'datetime', display: 'dd/MM/yyyy HH:mm' }\r\n ]\"></attribute-select>\r\n <attribute-textarea [form]=\"form\" [label]=\"'core.component.form-builder.hint' | sdT\" [(model)]=\"component.helperText\"></attribute-textarea>\r\n</sd-section>\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n}\r\n", dependencies: [{ kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "collapsed", "collapsable", "hideHeader", "noPaddingBody"], outputs: ["collapsedChange"] }, { kind: "component", type: AttributeTemplate, selector: "attribute-template", inputs: ["component"], outputs: ["sdChange"] }, { kind: "component", type: AttributeInput, selector: "attribute-input", inputs: ["form", "label", "disabled", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeSwitch, selector: "attribute-switch", inputs: ["form", "label", "model"], outputs: ["modelChange"] }, { kind: "component", type: AttributeSelect, selector: "attribute-select", inputs: ["form", "label", "disabled", "multiple", "items", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeExpression, selector: "attribute-expression", inputs: ["components", "variables", "label", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeTextarea, selector: "attribute-textarea", inputs: ["form", "label", "disabled", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4332
4336
|
}
|
|
4333
4337
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: DatetimeAttribute, decorators: [{
|
|
4334
4338
|
type: Component,
|
|
4335
|
-
args: [{ selector: 'datetime-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeInput, AttributeSwitch, AttributeSelect, AttributeExpression, AttributeTextarea], template: "<sd-section class=\"mt-8\" title=\"
|
|
4339
|
+
args: [{ selector: 'datetime-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeInput, AttributeSwitch, AttributeSelect, AttributeExpression, AttributeTextarea, SdTPipe], template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n <attribute-select\r\n [label]=\"'core.component.form-builder.format' | sdT\"\r\n [(model)]=\"component.subtype\"\r\n [items]=\"[\r\n { value: 'date', display: 'dd/MM/yyyy' },\r\n { value: 'datetime', display: 'dd/MM/yyyy HH:mm' }\r\n ]\"></attribute-select>\r\n <attribute-textarea [form]=\"form\" [label]=\"'core.component.form-builder.hint' | sdT\" [(model)]=\"component.helperText\"></attribute-textarea>\r\n</sd-section>\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n}\r\n" }]
|
|
4336
4340
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: BuilderService }], propDecorators: { components: [{
|
|
4337
4341
|
type: Input,
|
|
4338
4342
|
args: [{ required: true }]
|
|
@@ -4410,11 +4414,11 @@ let BuildQueries$1 = class BuildQueries {
|
|
|
4410
4414
|
this.ref.markForCheck();
|
|
4411
4415
|
};
|
|
4412
4416
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BuildQueries, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4413
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: BuildQueries, isStandalone: true, selector: "build-queries", inputs: { components: "components", variables: "variables", label: "label", selections: "selections", _valuesKey: ["valuesKey", "_valuesKey"], _model: ["model", "_model"] }, outputs: { modelChange: "modelChange" }, viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true }], ngImport: i0, template: "@if (!!selection?.queries?.items?.length) {\r\n <div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <div style=\"width: 200px\" class=\"d-flex align-items-center\">\r\n <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ queryString }}</a>\r\n </div>\r\n </div>\r\n <sd-modal title=\"
|
|
4417
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: BuildQueries, isStandalone: true, selector: "build-queries", inputs: { components: "components", variables: "variables", label: "label", selections: "selections", _valuesKey: ["valuesKey", "_valuesKey"], _model: ["model", "_model"] }, outputs: { modelChange: "modelChange" }, viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true }], ngImport: i0, template: "@if (!!selection?.queries?.items?.length) {\r\n <div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <div style=\"width: 200px\" class=\"d-flex align-items-center\">\r\n <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ queryString }}</a>\r\n </div>\r\n </div>\r\n <sd-modal [title]=\"'core.component.form-builder.set-query-value' | sdT\" width=\"400px\">\r\n <div class=\"c-builder\">\r\n @for (property of leftProperties; track property.value) {\r\n <div class=\"d-flex align-items-center py-8\" style=\"gap: 8px\">\r\n <div style=\"width: 150px\">\r\n <div class=\"text-secondary\">{{ property.value }}</div>\r\n <div class=\"T16M\">{{ property.display }}</div>\r\n </div>\r\n <sd-autocomplete\r\n [label]=\"'core.component.form-builder.value-source-field' | sdT\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"model![property.value]\"\r\n [items]=\"rightProperties\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n hideInlineError></sd-autocomplete>\r\n </div>\r\n }\r\n </div>\r\n <ng-container sdFooter>\r\n <sd-button prefixIcon=\"save\" [title]=\"'core.component.form-builder.confirm' | sdT\" (click)=\"onAccept()\" color=\"primary\" type=\"fill\"></sd-button>\r\n </ng-container>\r\n </sd-modal>\r\n}\r\n", styles: [".c-builder{padding:8px;width:100%;border:1px solid #e6e6e6;border-radius:4px}.c-builder .c-condition{width:80px}.c-builder .c-condition .c-where{width:80px;border:1px solid #e6e6e6;background-color:#f2f2f2;color:#757575;border-radius:4px;padding:4px;text-align:center}.c-builder .c-condition .c-select{margin-left:10px;width:70px}\n"], dependencies: [{ kind: "component", type: SdAutocomplete$1, selector: "sd-autocomplete", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "limit", "cacheChecksum", "hyperlink", "items", "hideInlineError", "addable", "required", "disabled", "viewed", "validator", "inlineError", "appearance", "model"], outputs: ["modelChange", "sdChange", "sdSelection", "sdAdd"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose"], outputs: ["sdClosed"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4414
4418
|
};
|
|
4415
4419
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BuildQueries$1, decorators: [{
|
|
4416
4420
|
type: Component,
|
|
4417
|
-
args: [{ selector: 'build-queries', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdAutocomplete$1, SdButton, SdModal], template: "@if (!!selection?.queries?.items?.length) {\r\n <div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <div style=\"width: 200px\" class=\"d-flex align-items-center\">\r\n <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ queryString }}</a>\r\n </div>\r\n </div>\r\n <sd-modal title=\"
|
|
4421
|
+
args: [{ selector: 'build-queries', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdAutocomplete$1, SdButton, SdModal, SdTPipe], template: "@if (!!selection?.queries?.items?.length) {\r\n <div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <div style=\"width: 200px\" class=\"d-flex align-items-center\">\r\n <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ queryString }}</a>\r\n </div>\r\n </div>\r\n <sd-modal [title]=\"'core.component.form-builder.set-query-value' | sdT\" width=\"400px\">\r\n <div class=\"c-builder\">\r\n @for (property of leftProperties; track property.value) {\r\n <div class=\"d-flex align-items-center py-8\" style=\"gap: 8px\">\r\n <div style=\"width: 150px\">\r\n <div class=\"text-secondary\">{{ property.value }}</div>\r\n <div class=\"T16M\">{{ property.display }}</div>\r\n </div>\r\n <sd-autocomplete\r\n [label]=\"'core.component.form-builder.value-source-field' | sdT\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"model![property.value]\"\r\n [items]=\"rightProperties\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n hideInlineError></sd-autocomplete>\r\n </div>\r\n }\r\n </div>\r\n <ng-container sdFooter>\r\n <sd-button prefixIcon=\"save\" [title]=\"'core.component.form-builder.confirm' | sdT\" (click)=\"onAccept()\" color=\"primary\" type=\"fill\"></sd-button>\r\n </ng-container>\r\n </sd-modal>\r\n}\r\n", styles: [".c-builder{padding:8px;width:100%;border:1px solid #e6e6e6;border-radius:4px}.c-builder .c-condition{width:80px}.c-builder .c-condition .c-where{width:80px;border:1px solid #e6e6e6;background-color:#f2f2f2;color:#757575;border-radius:4px;padding:4px;text-align:center}.c-builder .c-condition .c-select{margin-left:10px;width:70px}\n"] }]
|
|
4418
4422
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { modal: [{
|
|
4419
4423
|
type: ViewChild,
|
|
4420
4424
|
args: [SdModal]
|
|
@@ -4525,11 +4529,11 @@ class BuildVariables {
|
|
|
4525
4529
|
this.ref.markForCheck();
|
|
4526
4530
|
};
|
|
4527
4531
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BuildVariables, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4528
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: BuildVariables, isStandalone: true, selector: "build-variables", inputs: { components: "components", variables: "variables", label: "label", selections: "selections", _valuesKey: ["valuesKey", "_valuesKey"], _model: ["model", "_model"] }, outputs: { modelChange: "modelChange" }, viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true }], ngImport: i0, template: "@if (!!selection?.variables?.items?.length) {\r\n <div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <div style=\"width: 200px\" class=\"d-flex align-items-center\">\r\n <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ queryString }}</a>\r\n </div>\r\n </div>\r\n <sd-modal title=\"
|
|
4532
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: BuildVariables, isStandalone: true, selector: "build-variables", inputs: { components: "components", variables: "variables", label: "label", selections: "selections", _valuesKey: ["valuesKey", "_valuesKey"], _model: ["model", "_model"] }, outputs: { modelChange: "modelChange" }, viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true }], ngImport: i0, template: "@if (!!selection?.variables?.items?.length) {\r\n <div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <div style=\"width: 200px\" class=\"d-flex align-items-center\">\r\n <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ queryString }}</a>\r\n </div>\r\n </div>\r\n <sd-modal [title]=\"'core.component.form-builder.set-on-change-assign' | sdT\" width=\"500px\">\r\n <div class=\"c-builder\">\r\n <div class=\"d-flex justify-content-end\">\r\n <sd-button prefixIcon=\"add\" [title]=\"'core.component.form-builder.add-field' | sdT\" color=\"primary\" (click)=\"addField()\"></sd-button>\r\n </div>\r\n <!-- C\u1EA5p 1 -->\r\n @for (item of items; track item.id; let idx = $index) {\r\n <div class=\"d-flex align-items-center py-8\" style=\"gap: 8px\">\r\n <sd-autocomplete\r\n [label]=\"'core.component.form-builder.target-field' | sdT\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"item.key\"\r\n [items]=\"leftProperties\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n <sd-autocomplete\r\n [label]=\"'core.component.form-builder.target-value' | sdT\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"item.value\"\r\n [items]=\"rightProperties\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n </div>\r\n }\r\n </div>\r\n <ng-container sdFooter>\r\n <sd-button prefixIcon=\"save\" [title]=\"'core.component.form-builder.confirm' | sdT\" (click)=\"onAccept()\" color=\"primary\" type=\"fill\"></sd-button>\r\n </ng-container>\r\n </sd-modal>\r\n}\r\n", styles: [".c-builder{padding:8px;width:100%;border:1px solid #e6e6e6;border-radius:4px}.c-builder .c-condition{width:80px}.c-builder .c-condition .c-where{width:80px;border:1px solid #e6e6e6;background-color:#f2f2f2;color:#757575;border-radius:4px;padding:4px;text-align:center}.c-builder .c-condition .c-select{margin-left:10px;width:70px}\n"], dependencies: [{ kind: "component", type: SdAutocomplete$1, selector: "sd-autocomplete", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "limit", "cacheChecksum", "hyperlink", "items", "hideInlineError", "addable", "required", "disabled", "viewed", "validator", "inlineError", "appearance", "model"], outputs: ["modelChange", "sdChange", "sdSelection", "sdAdd"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose"], outputs: ["sdClosed"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4529
4533
|
}
|
|
4530
4534
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BuildVariables, decorators: [{
|
|
4531
4535
|
type: Component,
|
|
4532
|
-
args: [{ selector: 'build-variables', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdAutocomplete$1, SdButton, SdModal], template: "@if (!!selection?.variables?.items?.length) {\r\n <div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <div style=\"width: 200px\" class=\"d-flex align-items-center\">\r\n <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ queryString }}</a>\r\n </div>\r\n </div>\r\n <sd-modal title=\"
|
|
4536
|
+
args: [{ selector: 'build-variables', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdAutocomplete$1, SdButton, SdModal, SdTPipe], template: "@if (!!selection?.variables?.items?.length) {\r\n <div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <div style=\"width: 200px\" class=\"d-flex align-items-center\">\r\n <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ queryString }}</a>\r\n </div>\r\n </div>\r\n <sd-modal [title]=\"'core.component.form-builder.set-on-change-assign' | sdT\" width=\"500px\">\r\n <div class=\"c-builder\">\r\n <div class=\"d-flex justify-content-end\">\r\n <sd-button prefixIcon=\"add\" [title]=\"'core.component.form-builder.add-field' | sdT\" color=\"primary\" (click)=\"addField()\"></sd-button>\r\n </div>\r\n <!-- C\u1EA5p 1 -->\r\n @for (item of items; track item.id; let idx = $index) {\r\n <div class=\"d-flex align-items-center py-8\" style=\"gap: 8px\">\r\n <sd-autocomplete\r\n [label]=\"'core.component.form-builder.target-field' | sdT\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"item.key\"\r\n [items]=\"leftProperties\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n <sd-autocomplete\r\n [label]=\"'core.component.form-builder.target-value' | sdT\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"item.value\"\r\n [items]=\"rightProperties\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n </div>\r\n }\r\n </div>\r\n <ng-container sdFooter>\r\n <sd-button prefixIcon=\"save\" [title]=\"'core.component.form-builder.confirm' | sdT\" (click)=\"onAccept()\" color=\"primary\" type=\"fill\"></sd-button>\r\n </ng-container>\r\n </sd-modal>\r\n}\r\n", styles: [".c-builder{padding:8px;width:100%;border:1px solid #e6e6e6;border-radius:4px}.c-builder .c-condition{width:80px}.c-builder .c-condition .c-where{width:80px;border:1px solid #e6e6e6;background-color:#f2f2f2;color:#757575;border-radius:4px;padding:4px;text-align:center}.c-builder .c-condition .c-select{margin-left:10px;width:70px}\n"] }]
|
|
4533
4537
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { modal: [{
|
|
4534
4538
|
type: ViewChild,
|
|
4535
4539
|
args: [SdModal]
|
|
@@ -4623,11 +4627,11 @@ class AttributeSelection {
|
|
|
4623
4627
|
this.ref.markForCheck();
|
|
4624
4628
|
};
|
|
4625
4629
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: AttributeSelection, deps: [{ token: i0.ChangeDetectorRef }, { token: FormGenericService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4626
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: AttributeSelection, isStandalone: true, selector: "attribute-selection", inputs: { components: "components", variables: "variables", component: "component", _valuesKey: ["valuesKey", "_valuesKey"], _values: ["values", "_values"] }, outputs: { valuesKeyChange: "valuesKeyChange", valuesChange: "valuesChange", sdChange: "sdChange" }, ngImport: i0, template: "<sd-section class=\"mt-8\" title=\"
|
|
4630
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: AttributeSelection, isStandalone: true, selector: "attribute-selection", inputs: { components: "components", variables: "variables", component: "component", _valuesKey: ["valuesKey", "_valuesKey"], _values: ["values", "_values"] }, outputs: { valuesKeyChange: "valuesKeyChange", valuesChange: "valuesChange", sdChange: "sdChange" }, ngImport: i0, template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.data' | sdT\" icon=\"format_list_bulleted\">\r\n @if (selections.length) {\r\n <div class=\"d-flex align-items-center py-4\">\r\n <div class=\"T14M\" style=\"flex: 1\">{{ 'core.component.form-builder.data-api' | sdT }}</div>\r\n <sd-autocomplete\r\n style=\"width: 200px\"\r\n size=\"sm\"\r\n [(model)]=\"valuesKey\"\r\n [items]=\"selections\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n (sdChange)=\"onChangeValuesKey($event)\"\r\n hideInlineError></sd-autocomplete>\r\n </div>\r\n <!-- N\u1EBFu l\u00E0 select t\u1EEB API th\u00EC cho ph\u00E9p truy\u1EC1n th\u00EAm Query -->\r\n\r\n @if (component.type === 'select' && !!valuesKey) {\r\n <build-queries\r\n [label]=\"'core.component.form-builder.query-condition' | sdT\"\r\n [selections]=\"selections\"\r\n [valuesKey]=\"valuesKey\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.query\"></build-queries>\r\n <build-variables\r\n [label]=\"'core.component.form-builder.assign-value' | sdT\"\r\n [selections]=\"selections\"\r\n [valuesKey]=\"valuesKey\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.setVariables\"></build-variables>\r\n <!-- <div class=\"d-flex align-items-center py-4\">\r\n <div class=\"T14M\" style=\"flex: 1\">\u0110i\u1EC1u ki\u1EC7n truy v\u1EA5n</div>\r\n <sd-input style=\"width: 200px\" size=\"sm\" [(model)]=\"component.properties!.query\" hideInlineError></sd-input>\r\n </div> -->\r\n }\r\n }\r\n @if (!valuesKey) {\r\n <div class=\"d-flex flex-column\" style=\"gap: 4px\">\r\n <div class=\"T14M\">{{ 'core.component.form-builder.data-static' | sdT }}</div>\r\n @for (item of values; track item.value; let idx = $index) {\r\n <div class=\"d-flex align-items-end py-4\" style=\"gap: 4px\">\r\n <sd-input style=\"width: 200px\" size=\"sm\" [(model)]=\"item.value\" (sdChange)=\"onChangeValues()\" hideInlineError></sd-input>\r\n <sd-input style=\"width: 200px\" size=\"sm\" [(model)]=\"item.label\" (sdChange)=\"onChangeValues()\" hideInlineError></sd-input>\r\n <sd-button prefixIcon=\"delete\" (click)=\"removeItem(idx)\" color=\"error\"></sd-button>\r\n </div>\r\n }\r\n <sd-button prefixIcon=\"add\" [title]=\"'core.component.form-builder.add-data' | sdT\" (click)=\"addItem()\" color=\"primary\"></sd-button>\r\n </div>\r\n }\r\n</sd-section>\r\n", dependencies: [{ kind: "component", type: SdInput$1, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "tooltip", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "sdFocusForceBlur"] }, { kind: "component", type: SdAutocomplete$1, selector: "sd-autocomplete", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "limit", "cacheChecksum", "hyperlink", "items", "hideInlineError", "addable", "required", "disabled", "viewed", "validator", "inlineError", "appearance", "model"], outputs: ["modelChange", "sdChange", "sdSelection", "sdAdd"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "collapsed", "collapsable", "hideHeader", "noPaddingBody"], outputs: ["collapsedChange"] }, { kind: "component", type: BuildQueries$1, selector: "build-queries", inputs: ["components", "variables", "label", "selections", "valuesKey", "model"], outputs: ["modelChange"] }, { kind: "component", type: BuildVariables, selector: "build-variables", inputs: ["components", "variables", "label", "selections", "valuesKey", "model"], outputs: ["modelChange"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4627
4631
|
}
|
|
4628
4632
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: AttributeSelection, decorators: [{
|
|
4629
4633
|
type: Component,
|
|
4630
|
-
args: [{ selector: 'attribute-selection', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdInput$1, SdAutocomplete$1, SdButton, SdSection, BuildQueries$1, BuildVariables], template: "<sd-section class=\"mt-8\" title=\"
|
|
4634
|
+
args: [{ selector: 'attribute-selection', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdInput$1, SdAutocomplete$1, SdButton, SdSection, BuildQueries$1, BuildVariables, SdTPipe], template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.data' | sdT\" icon=\"format_list_bulleted\">\r\n @if (selections.length) {\r\n <div class=\"d-flex align-items-center py-4\">\r\n <div class=\"T14M\" style=\"flex: 1\">{{ 'core.component.form-builder.data-api' | sdT }}</div>\r\n <sd-autocomplete\r\n style=\"width: 200px\"\r\n size=\"sm\"\r\n [(model)]=\"valuesKey\"\r\n [items]=\"selections\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n (sdChange)=\"onChangeValuesKey($event)\"\r\n hideInlineError></sd-autocomplete>\r\n </div>\r\n <!-- N\u1EBFu l\u00E0 select t\u1EEB API th\u00EC cho ph\u00E9p truy\u1EC1n th\u00EAm Query -->\r\n\r\n @if (component.type === 'select' && !!valuesKey) {\r\n <build-queries\r\n [label]=\"'core.component.form-builder.query-condition' | sdT\"\r\n [selections]=\"selections\"\r\n [valuesKey]=\"valuesKey\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.query\"></build-queries>\r\n <build-variables\r\n [label]=\"'core.component.form-builder.assign-value' | sdT\"\r\n [selections]=\"selections\"\r\n [valuesKey]=\"valuesKey\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.setVariables\"></build-variables>\r\n <!-- <div class=\"d-flex align-items-center py-4\">\r\n <div class=\"T14M\" style=\"flex: 1\">\u0110i\u1EC1u ki\u1EC7n truy v\u1EA5n</div>\r\n <sd-input style=\"width: 200px\" size=\"sm\" [(model)]=\"component.properties!.query\" hideInlineError></sd-input>\r\n </div> -->\r\n }\r\n }\r\n @if (!valuesKey) {\r\n <div class=\"d-flex flex-column\" style=\"gap: 4px\">\r\n <div class=\"T14M\">{{ 'core.component.form-builder.data-static' | sdT }}</div>\r\n @for (item of values; track item.value; let idx = $index) {\r\n <div class=\"d-flex align-items-end py-4\" style=\"gap: 4px\">\r\n <sd-input style=\"width: 200px\" size=\"sm\" [(model)]=\"item.value\" (sdChange)=\"onChangeValues()\" hideInlineError></sd-input>\r\n <sd-input style=\"width: 200px\" size=\"sm\" [(model)]=\"item.label\" (sdChange)=\"onChangeValues()\" hideInlineError></sd-input>\r\n <sd-button prefixIcon=\"delete\" (click)=\"removeItem(idx)\" color=\"error\"></sd-button>\r\n </div>\r\n }\r\n <sd-button prefixIcon=\"add\" [title]=\"'core.component.form-builder.add-data' | sdT\" (click)=\"addItem()\" color=\"primary\"></sd-button>\r\n </div>\r\n }\r\n</sd-section>\r\n" }]
|
|
4631
4635
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: FormGenericService }], propDecorators: { components: [{
|
|
4632
4636
|
type: Input,
|
|
4633
4637
|
args: [{ required: true }]
|
|
@@ -4704,11 +4708,11 @@ class SelectAttribute {
|
|
|
4704
4708
|
}
|
|
4705
4709
|
};
|
|
4706
4710
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SelectAttribute, deps: [{ token: i0.ChangeDetectorRef }, { token: BuilderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4707
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SelectAttribute, isStandalone: true, selector: "select-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" title=\"
|
|
4711
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SelectAttribute, isStandalone: true, selector: "select-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n <attribute-switch [label]=\"'core.component.form-builder.multiple' | sdT\" [(model)]=\"component.properties!.multiple\"></attribute-switch>\r\n @if (component.properties!.viewed) {\r\n <attribute-input label=\"Hyperlink\" [(model)]=\"component.properties!.hyperlink\"></attribute-input>\r\n }\r\n</sd-section>\r\n\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n <attribute-selection\r\n [components]=\"components\"\r\n [component]=\"component\"\r\n [variables]=\"variables\"\r\n [(valuesKey)]=\"component.valuesKey\"\r\n [(values)]=\"component.values\"\r\n (valuesKeyChange)=\"onChanges()\"\r\n (valuesChange)=\"onChanges()\"></attribute-selection>\r\n}\r\n", dependencies: [{ kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "collapsed", "collapsable", "hideHeader", "noPaddingBody"], outputs: ["collapsedChange"] }, { kind: "component", type: AttributeTemplate, selector: "attribute-template", inputs: ["component"], outputs: ["sdChange"] }, { kind: "component", type: AttributeSelection, selector: "attribute-selection", inputs: ["components", "variables", "component", "valuesKey", "values"], outputs: ["valuesKeyChange", "valuesChange", "sdChange"] }, { kind: "component", type: AttributeInput, selector: "attribute-input", inputs: ["form", "label", "disabled", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeSwitch, selector: "attribute-switch", inputs: ["form", "label", "model"], outputs: ["modelChange"] }, { kind: "component", type: AttributeExpression, selector: "attribute-expression", inputs: ["components", "variables", "label", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4708
4712
|
}
|
|
4709
4713
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SelectAttribute, decorators: [{
|
|
4710
4714
|
type: Component,
|
|
4711
|
-
args: [{ selector: 'select-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeSelection, AttributeInput, AttributeSwitch, AttributeExpression], template: "<sd-section class=\"mt-8\" title=\"
|
|
4715
|
+
args: [{ selector: 'select-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeSelection, AttributeInput, AttributeSwitch, AttributeExpression, SdTPipe], template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n <attribute-switch [label]=\"'core.component.form-builder.multiple' | sdT\" [(model)]=\"component.properties!.multiple\"></attribute-switch>\r\n @if (component.properties!.viewed) {\r\n <attribute-input label=\"Hyperlink\" [(model)]=\"component.properties!.hyperlink\"></attribute-input>\r\n }\r\n</sd-section>\r\n\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n <attribute-selection\r\n [components]=\"components\"\r\n [component]=\"component\"\r\n [variables]=\"variables\"\r\n [(valuesKey)]=\"component.valuesKey\"\r\n [(values)]=\"component.values\"\r\n (valuesKeyChange)=\"onChanges()\"\r\n (valuesChange)=\"onChanges()\"></attribute-selection>\r\n}\r\n" }]
|
|
4712
4716
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: BuilderService }], propDecorators: { components: [{
|
|
4713
4717
|
type: Input,
|
|
4714
4718
|
args: [{ required: true }]
|
|
@@ -4852,11 +4856,11 @@ class RadioAttribute {
|
|
|
4852
4856
|
this.#changes.next();
|
|
4853
4857
|
};
|
|
4854
4858
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: RadioAttribute, deps: [{ token: i0.ChangeDetectorRef }, { token: BuilderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4855
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: RadioAttribute, isStandalone: true, selector: "radio-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" title=\"
|
|
4859
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: RadioAttribute, isStandalone: true, selector: "radio-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n @if (component.properties!.viewed) {\r\n <attribute-input label=\"Hyperlink\" [(model)]=\"component.properties!.hyperlink\"></attribute-input>\r\n }\r\n</sd-section>\r\n\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n <attribute-select\r\n [form]=\"form\"\r\n [label]=\"'core.component.form-builder.layout' | sdT\"\r\n [(model)]=\"component.properties!.direction\"\r\n [items]=\"[\r\n { value: 'row', display: 'Ngang' },\r\n { value: 'column', display: ('core.component.form-builder.vertical' | sdT) }\r\n ]\"></attribute-select>\r\n </sd-section>\r\n @if (!component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n }\r\n <attribute-selection\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [component]=\"component\"\r\n [(valuesKey)]=\"component.valuesKey\"\r\n [(values)]=\"component.values\"\r\n (valuesKeyChange)=\"onChanges()\"\r\n (valuesChange)=\"onChanges()\"></attribute-selection>\r\n}\r\n", dependencies: [{ kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "collapsed", "collapsable", "hideHeader", "noPaddingBody"], outputs: ["collapsedChange"] }, { kind: "component", type: AttributeTemplate, selector: "attribute-template", inputs: ["component"], outputs: ["sdChange"] }, { kind: "component", type: AttributeSelection, selector: "attribute-selection", inputs: ["components", "variables", "component", "valuesKey", "values"], outputs: ["valuesKeyChange", "valuesChange", "sdChange"] }, { kind: "component", type: AttributeInput, selector: "attribute-input", inputs: ["form", "label", "disabled", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeSwitch, selector: "attribute-switch", inputs: ["form", "label", "model"], outputs: ["modelChange"] }, { kind: "component", type: AttributeSelect, selector: "attribute-select", inputs: ["form", "label", "disabled", "multiple", "items", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeExpression, selector: "attribute-expression", inputs: ["components", "variables", "label", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4856
4860
|
}
|
|
4857
4861
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: RadioAttribute, decorators: [{
|
|
4858
4862
|
type: Component,
|
|
4859
|
-
args: [{ selector: 'radio-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeSelection, AttributeInput, AttributeSwitch, AttributeSelect, AttributeExpression], template: "<sd-section class=\"mt-8\" title=\"
|
|
4863
|
+
args: [{ selector: 'radio-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeSelection, AttributeInput, AttributeSwitch, AttributeSelect, AttributeExpression, SdTPipe], template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n @if (component.properties!.viewed) {\r\n <attribute-input label=\"Hyperlink\" [(model)]=\"component.properties!.hyperlink\"></attribute-input>\r\n }\r\n</sd-section>\r\n\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n <attribute-select\r\n [form]=\"form\"\r\n [label]=\"'core.component.form-builder.layout' | sdT\"\r\n [(model)]=\"component.properties!.direction\"\r\n [items]=\"[\r\n { value: 'row', display: 'Ngang' },\r\n { value: 'column', display: ('core.component.form-builder.vertical' | sdT) }\r\n ]\"></attribute-select>\r\n </sd-section>\r\n @if (!component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n }\r\n <attribute-selection\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [component]=\"component\"\r\n [(valuesKey)]=\"component.valuesKey\"\r\n [(values)]=\"component.values\"\r\n (valuesKeyChange)=\"onChanges()\"\r\n (valuesChange)=\"onChanges()\"></attribute-selection>\r\n}\r\n" }]
|
|
4860
4864
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: BuilderService }], propDecorators: { components: [{
|
|
4861
4865
|
type: Input,
|
|
4862
4866
|
args: [{ required: true }]
|
|
@@ -4875,11 +4879,11 @@ class CheckboxControl {
|
|
|
4875
4879
|
this.component = component;
|
|
4876
4880
|
}
|
|
4877
4881
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: CheckboxControl, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4878
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: CheckboxControl, isStandalone: true, selector: "checkbox-control", inputs: { _component: ["component", "_component"] }, ngImport: i0, template: "@if (component.properties?.viewed) {\r\n <div class=\"d-block T12R text-secondary\">\r\n {{ component.label }}\r\n </div>\r\n <div class=\"T14M\">
|
|
4882
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: CheckboxControl, isStandalone: true, selector: "checkbox-control", inputs: { _component: ["component", "_component"] }, ngImport: i0, template: "@if (component.properties?.viewed) {\r\n <div class=\"d-block T12R text-secondary\">\r\n {{ component.label }}\r\n </div>\r\n <div class=\"T14M\">{{ 'core.component.form-builder.yes-no' | sdT }}</div>\r\n} @else {\r\n <div class=\"c-checkbox\">\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"c-box mr-4\"></div>\r\n <div class=\"T14R\">{{ component.label }}</div>\r\n </div>\r\n </div>\r\n}\r\n", styles: ["@charset \"UTF-8\";.input{width:100%;background:#fff;height:30px;border:1px solid #d3d3d3;position:relative}.c-checkbox .c-box{border:2px solid #828282;width:16px;height:16px;border-radius:2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: SdTPipe, name: "sdT" }] });
|
|
4879
4883
|
}
|
|
4880
4884
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: CheckboxControl, decorators: [{
|
|
4881
4885
|
type: Component,
|
|
4882
|
-
args: [{ selector: 'checkbox-control', imports: [CommonModule], template: "@if (component.properties?.viewed) {\r\n <div class=\"d-block T12R text-secondary\">\r\n {{ component.label }}\r\n </div>\r\n <div class=\"T14M\">
|
|
4886
|
+
args: [{ selector: 'checkbox-control', imports: [CommonModule, SdTPipe], template: "@if (component.properties?.viewed) {\r\n <div class=\"d-block T12R text-secondary\">\r\n {{ component.label }}\r\n </div>\r\n <div class=\"T14M\">{{ 'core.component.form-builder.yes-no' | sdT }}</div>\r\n} @else {\r\n <div class=\"c-checkbox\">\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"c-box mr-4\"></div>\r\n <div class=\"T14R\">{{ component.label }}</div>\r\n </div>\r\n </div>\r\n}\r\n", styles: ["@charset \"UTF-8\";.input{width:100%;background:#fff;height:30px;border:1px solid #d3d3d3;position:relative}.c-checkbox .c-box{border:2px solid #828282;width:16px;height:16px;border-radius:2px}\n"] }]
|
|
4883
4887
|
}], propDecorators: { _component: [{
|
|
4884
4888
|
type: Input,
|
|
4885
4889
|
args: [{ alias: 'component', required: true }]
|
|
@@ -4931,11 +4935,11 @@ class CheckboxAttribute {
|
|
|
4931
4935
|
}
|
|
4932
4936
|
};
|
|
4933
4937
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: CheckboxAttribute, deps: [{ token: i0.ChangeDetectorRef }, { token: BuilderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4934
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: CheckboxAttribute, isStandalone: true, selector: "checkbox-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" title=\"
|
|
4938
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: CheckboxAttribute, isStandalone: true, selector: "checkbox-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n</sd-section>\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n}\r\n", dependencies: [{ kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "collapsed", "collapsable", "hideHeader", "noPaddingBody"], outputs: ["collapsedChange"] }, { kind: "component", type: AttributeTemplate, selector: "attribute-template", inputs: ["component"], outputs: ["sdChange"] }, { kind: "component", type: AttributeInput, selector: "attribute-input", inputs: ["form", "label", "disabled", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeSwitch, selector: "attribute-switch", inputs: ["form", "label", "model"], outputs: ["modelChange"] }, { kind: "component", type: AttributeExpression, selector: "attribute-expression", inputs: ["components", "variables", "label", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4935
4939
|
}
|
|
4936
4940
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: CheckboxAttribute, decorators: [{
|
|
4937
4941
|
type: Component,
|
|
4938
|
-
args: [{ selector: 'checkbox-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeInput, AttributeSwitch, AttributeExpression], template: "<sd-section class=\"mt-8\" title=\"
|
|
4942
|
+
args: [{ selector: 'checkbox-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeInput, AttributeSwitch, AttributeExpression, SdTPipe], template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n</sd-section>\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n}\r\n" }]
|
|
4939
4943
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: BuilderService }], propDecorators: { components: [{
|
|
4940
4944
|
type: Input,
|
|
4941
4945
|
args: [{ required: true }]
|
|
@@ -5004,11 +5008,11 @@ class BuildQueries {
|
|
|
5004
5008
|
this.ref.markForCheck();
|
|
5005
5009
|
};
|
|
5006
5010
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BuildQueries, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5007
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: BuildQueries, isStandalone: true, selector: "build-queries", inputs: { label: "label", _queries: ["queries", "_queries"], components: "components", variables: "variables", _model: ["model", "_model"] }, outputs: { modelChange: "modelChange" }, viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true }], ngImport: i0, template: "@if (!!leftProperties?.length) {\r\n <div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <div style=\"width: 200px\" class=\"d-flex align-items-center\">\r\n <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ queryString }}</a>\r\n </div>\r\n </div>\r\n <sd-modal title=\"
|
|
5011
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: BuildQueries, isStandalone: true, selector: "build-queries", inputs: { label: "label", _queries: ["queries", "_queries"], components: "components", variables: "variables", _model: ["model", "_model"] }, outputs: { modelChange: "modelChange" }, viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true }], ngImport: i0, template: "@if (!!leftProperties?.length) {\r\n <div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <div style=\"width: 200px\" class=\"d-flex align-items-center\">\r\n <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ queryString }}</a>\r\n </div>\r\n </div>\r\n <sd-modal [title]=\"'core.component.form-builder.set-query-value' | sdT\" width=\"400px\">\r\n <div class=\"c-builder\">\r\n @for (property of leftProperties; track property.value) {\r\n <div class=\"d-flex align-items-center py-8\" style=\"gap: 8px\">\r\n <div class=\"T14M\" style=\"width: 150px\">{{ property.display }}</div>\r\n <sd-autocomplete\r\n [label]=\"'core.component.form-builder.value-source-field' | sdT\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"model![property.value]\"\r\n [items]=\"rightProperties\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n </div>\r\n }\r\n </div>\r\n <ng-container sdFooter>\r\n <sd-button prefixIcon=\"save\" [title]=\"'core.component.form-builder.confirm' | sdT\" (click)=\"onAccept()\" color=\"primary\" type=\"fill\"></sd-button>\r\n </ng-container>\r\n </sd-modal>\r\n}\r\n", styles: [".c-builder{padding:8px;width:100%;border:1px solid #e6e6e6;border-radius:4px}.c-builder .c-condition{width:80px}.c-builder .c-condition .c-where{width:80px;border:1px solid #e6e6e6;background-color:#f2f2f2;color:#757575;border-radius:4px;padding:4px;text-align:center}.c-builder .c-condition .c-select{margin-left:10px;width:70px}\n"], dependencies: [{ kind: "component", type: SdAutocomplete$1, selector: "sd-autocomplete", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "limit", "cacheChecksum", "hyperlink", "items", "hideInlineError", "addable", "required", "disabled", "viewed", "validator", "inlineError", "appearance", "model"], outputs: ["modelChange", "sdChange", "sdSelection", "sdAdd"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose"], outputs: ["sdClosed"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5008
5012
|
}
|
|
5009
5013
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BuildQueries, decorators: [{
|
|
5010
5014
|
type: Component,
|
|
5011
|
-
args: [{ selector: 'build-queries', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdAutocomplete$1, SdButton, SdModal], template: "@if (!!leftProperties?.length) {\r\n <div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <div style=\"width: 200px\" class=\"d-flex align-items-center\">\r\n <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ queryString }}</a>\r\n </div>\r\n </div>\r\n <sd-modal title=\"
|
|
5015
|
+
args: [{ selector: 'build-queries', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdAutocomplete$1, SdButton, SdModal, SdTPipe], template: "@if (!!leftProperties?.length) {\r\n <div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <div style=\"width: 200px\" class=\"d-flex align-items-center\">\r\n <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ queryString }}</a>\r\n </div>\r\n </div>\r\n <sd-modal [title]=\"'core.component.form-builder.set-query-value' | sdT\" width=\"400px\">\r\n <div class=\"c-builder\">\r\n @for (property of leftProperties; track property.value) {\r\n <div class=\"d-flex align-items-center py-8\" style=\"gap: 8px\">\r\n <div class=\"T14M\" style=\"width: 150px\">{{ property.display }}</div>\r\n <sd-autocomplete\r\n [label]=\"'core.component.form-builder.value-source-field' | sdT\"\r\n [form]=\"form\"\r\n style=\"flex: 1\"\r\n [(model)]=\"model![property.value]\"\r\n [items]=\"rightProperties\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError></sd-autocomplete>\r\n </div>\r\n }\r\n </div>\r\n <ng-container sdFooter>\r\n <sd-button prefixIcon=\"save\" [title]=\"'core.component.form-builder.confirm' | sdT\" (click)=\"onAccept()\" color=\"primary\" type=\"fill\"></sd-button>\r\n </ng-container>\r\n </sd-modal>\r\n}\r\n", styles: [".c-builder{padding:8px;width:100%;border:1px solid #e6e6e6;border-radius:4px}.c-builder .c-condition{width:80px}.c-builder .c-condition .c-where{width:80px;border:1px solid #e6e6e6;background-color:#f2f2f2;color:#757575;border-radius:4px;padding:4px;text-align:center}.c-builder .c-condition .c-select{margin-left:10px;width:70px}\n"] }]
|
|
5012
5016
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { modal: [{
|
|
5013
5017
|
type: ViewChild,
|
|
5014
5018
|
args: [SdModal]
|
|
@@ -5105,11 +5109,11 @@ class HtmlAttribute {
|
|
|
5105
5109
|
}
|
|
5106
5110
|
};
|
|
5107
5111
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HtmlAttribute, deps: [{ token: i0.ChangeDetectorRef }, { token: FormGenericService }, { token: BuilderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5108
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: HtmlAttribute, isStandalone: true, selector: "html-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, outputs: { attributeChanges: "attributeChanges" }, ngImport: i0, template: "@if (!component.properties!.hidden) {\r\n <sd-section class=\"mt-8\" title=\"
|
|
5112
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: HtmlAttribute, isStandalone: true, selector: "html-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, outputs: { attributeChanges: "attributeChanges" }, ngImport: i0, template: "@if (!component.properties!.hidden) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-select\r\n [label]=\"'core.component.form-builder.template-data' | sdT\"\r\n [(model)]=\"component.template\"\r\n [items]=\"definitionHtmls\"\r\n (sdChange)=\"onChangeDefinition($event)\"></attribute-select>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\"></attribute-input>\r\n <attribute-textarea [form]=\"form\" [label]=\"'core.component.form-builder.content' | sdT\" [(model)]=\"component.content\"></attribute-textarea>\r\n @if (component.properties?.queries?.length) {\r\n <build-queries\r\n [label]=\"'core.component.form-builder.query-condition' | sdT\"\r\n [queries]=\"component.properties?.queries\"\r\n [components]=\"components\"\r\n [variables]=\"variables\" \r\n [(model)]=\"component.properties!.query\"></build-queries>\r\n }\r\n </sd-section>\r\n @if (component.properties?.variables?.length) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.parameter' | sdT\" icon=\"format_list_bulleted\">\r\n @for (variable of component.properties?.variables; track variable.key) {\r\n <attribute-input [form]=\"form\" [label]=\"variable.label\" [(model)]=\"variable.value\"></attribute-input>\r\n }\r\n </sd-section>\r\n }\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n </sd-section>\r\n}\r\n", dependencies: [{ kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "collapsed", "collapsable", "hideHeader", "noPaddingBody"], outputs: ["collapsedChange"] }, { kind: "component", type: AttributeInput, selector: "attribute-input", inputs: ["form", "label", "disabled", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeSelect, selector: "attribute-select", inputs: ["form", "label", "disabled", "multiple", "items", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeExpression, selector: "attribute-expression", inputs: ["components", "variables", "label", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeTextarea, selector: "attribute-textarea", inputs: ["form", "label", "disabled", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: BuildQueries, selector: "build-queries", inputs: ["label", "queries", "components", "variables", "model"], outputs: ["modelChange"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5109
5113
|
}
|
|
5110
5114
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HtmlAttribute, decorators: [{
|
|
5111
5115
|
type: Component,
|
|
5112
|
-
args: [{ selector: 'html-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeInput, AttributeSelect, AttributeExpression, AttributeTextarea, BuildQueries], template: "@if (!component.properties!.hidden) {\r\n <sd-section class=\"mt-8\" title=\"
|
|
5116
|
+
args: [{ selector: 'html-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeInput, AttributeSelect, AttributeExpression, AttributeTextarea, BuildQueries, SdTPipe], template: "@if (!component.properties!.hidden) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-select\r\n [label]=\"'core.component.form-builder.template-data' | sdT\"\r\n [(model)]=\"component.template\"\r\n [items]=\"definitionHtmls\"\r\n (sdChange)=\"onChangeDefinition($event)\"></attribute-select>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\"></attribute-input>\r\n <attribute-textarea [form]=\"form\" [label]=\"'core.component.form-builder.content' | sdT\" [(model)]=\"component.content\"></attribute-textarea>\r\n @if (component.properties?.queries?.length) {\r\n <build-queries\r\n [label]=\"'core.component.form-builder.query-condition' | sdT\"\r\n [queries]=\"component.properties?.queries\"\r\n [components]=\"components\"\r\n [variables]=\"variables\" \r\n [(model)]=\"component.properties!.query\"></build-queries>\r\n }\r\n </sd-section>\r\n @if (component.properties?.variables?.length) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.parameter' | sdT\" icon=\"format_list_bulleted\">\r\n @for (variable of component.properties?.variables; track variable.key) {\r\n <attribute-input [form]=\"form\" [label]=\"variable.label\" [(model)]=\"variable.value\"></attribute-input>\r\n }\r\n </sd-section>\r\n }\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n </sd-section>\r\n}\r\n" }]
|
|
5113
5117
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: FormGenericService }, { type: BuilderService }], propDecorators: { components: [{
|
|
5114
5118
|
type: Input,
|
|
5115
5119
|
args: [{ required: true }]
|
|
@@ -5237,11 +5241,11 @@ class AttributeParameter {
|
|
|
5237
5241
|
this.ref.markForCheck();
|
|
5238
5242
|
};
|
|
5239
5243
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: AttributeParameter, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5240
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: AttributeParameter, isStandalone: true, selector: "attribute-parameter", inputs: { components: "components", label: "label", _model: ["model", "_model"] }, outputs: { modelChange: "modelChange" }, viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true }], ngImport: i0, template: "<div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <div style=\"width: 200px\" class=\"d-flex align-items-center\">\r\n <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ queryString }}</a>\r\n </div>\r\n</div>\r\n<sd-modal title=\"
|
|
5244
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: AttributeParameter, isStandalone: true, selector: "attribute-parameter", inputs: { components: "components", label: "label", _model: ["model", "_model"] }, outputs: { modelChange: "modelChange" }, viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true }], ngImport: i0, template: "<div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <div style=\"width: 200px\" class=\"d-flex align-items-center\">\r\n <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ queryString }}</a>\r\n </div>\r\n</div>\r\n<sd-modal [title]=\"'core.component.form-builder.assign-parameter-value' | sdT\" width=\"500px\">\r\n <div class=\"c-builder\">\r\n <div class=\"d-flex justify-content-end\">\r\n <sd-button prefixIcon=\"add\" [title]=\"'core.component.form-builder.add-field' | sdT\" color=\"primary\" (click)=\"addField()\"></sd-button>\r\n </div>\r\n <!-- C\u1EA5p 1 -->\r\n @for (item of items; track item.id; let idx = $index) {\r\n <div class=\"d-flex align-items-center py-8\" style=\"gap: 8px\">\r\n <sd-input [label]=\"'core.component.form-builder.parameter-name' | sdT\" [form]=\"form\" style=\"flex: 1\" [(model)]=\"item.key\" required hideInlineError></sd-input>\r\n <sd-input [label]=\"'core.component.form-builder.parameter-value' | sdT\" [form]=\"form\" style=\"flex: 1\" [(model)]=\"item.value\" required hideInlineError></sd-input>\r\n <div style=\"width: 32px; min-width: 32px\">\r\n <sd-button\r\n prefixIcon=\"delete\"\r\n [tooltip]=\"'core.component.form-builder.delete' | sdT\"\r\n (click)=\"remove(idx)\"\r\n size=\"sm\"\r\n class=\"p-0\"\r\n ></sd-button>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n <ng-container sdFooter>\r\n <sd-button prefixIcon=\"save\" [title]=\"'core.component.form-builder.confirm' | sdT\" (click)=\"onAccept()\" color=\"primary\" type=\"fill\"></sd-button>\r\n </ng-container>\r\n</sd-modal>\r\n", styles: [".c-builder{padding:8px;width:100%;border:1px solid #e6e6e6;border-radius:4px}.c-builder .c-condition{width:80px}.c-builder .c-condition .c-where{width:80px;border:1px solid #e6e6e6;background-color:#f2f2f2;color:#757575;border-radius:4px;padding:4px;text-align:center}.c-builder .c-condition .c-select{margin-left:10px;width:70px}\n"], dependencies: [{ kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose"], outputs: ["sdClosed"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "tooltip", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "sdFocusForceBlur"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5241
5245
|
}
|
|
5242
5246
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: AttributeParameter, decorators: [{
|
|
5243
5247
|
type: Component,
|
|
5244
|
-
args: [{ selector: 'attribute-parameter', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdButton, SdModal, SdInput], template: "<div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <div style=\"width: 200px\" class=\"d-flex align-items-center\">\r\n <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ queryString }}</a>\r\n </div>\r\n</div>\r\n<sd-modal title=\"
|
|
5248
|
+
args: [{ selector: 'attribute-parameter', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdButton, SdModal, SdInput, SdTPipe], template: "<div class=\"d-flex align-items-center py-4\">\r\n @if (label) {\r\n <div class=\"T14R\" style=\"flex: 1\">{{ label }}</div>\r\n }\r\n <div style=\"width: 200px\" class=\"d-flex align-items-center\">\r\n <a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{ queryString }}</a>\r\n </div>\r\n</div>\r\n<sd-modal [title]=\"'core.component.form-builder.assign-parameter-value' | sdT\" width=\"500px\">\r\n <div class=\"c-builder\">\r\n <div class=\"d-flex justify-content-end\">\r\n <sd-button prefixIcon=\"add\" [title]=\"'core.component.form-builder.add-field' | sdT\" color=\"primary\" (click)=\"addField()\"></sd-button>\r\n </div>\r\n <!-- C\u1EA5p 1 -->\r\n @for (item of items; track item.id; let idx = $index) {\r\n <div class=\"d-flex align-items-center py-8\" style=\"gap: 8px\">\r\n <sd-input [label]=\"'core.component.form-builder.parameter-name' | sdT\" [form]=\"form\" style=\"flex: 1\" [(model)]=\"item.key\" required hideInlineError></sd-input>\r\n <sd-input [label]=\"'core.component.form-builder.parameter-value' | sdT\" [form]=\"form\" style=\"flex: 1\" [(model)]=\"item.value\" required hideInlineError></sd-input>\r\n <div style=\"width: 32px; min-width: 32px\">\r\n <sd-button\r\n prefixIcon=\"delete\"\r\n [tooltip]=\"'core.component.form-builder.delete' | sdT\"\r\n (click)=\"remove(idx)\"\r\n size=\"sm\"\r\n class=\"p-0\"\r\n ></sd-button>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n <ng-container sdFooter>\r\n <sd-button prefixIcon=\"save\" [title]=\"'core.component.form-builder.confirm' | sdT\" (click)=\"onAccept()\" color=\"primary\" type=\"fill\"></sd-button>\r\n </ng-container>\r\n</sd-modal>\r\n", styles: [".c-builder{padding:8px;width:100%;border:1px solid #e6e6e6;border-radius:4px}.c-builder .c-condition{width:80px}.c-builder .c-condition .c-where{width:80px;border:1px solid #e6e6e6;background-color:#f2f2f2;color:#757575;border-radius:4px;padding:4px;text-align:center}.c-builder .c-condition .c-select{margin-left:10px;width:70px}\n"] }]
|
|
5245
5249
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { modal: [{
|
|
5246
5250
|
type: ViewChild,
|
|
5247
5251
|
args: [SdModal]
|
|
@@ -5272,15 +5276,17 @@ class UploadAttribute {
|
|
|
5272
5276
|
this.extension = this.component.properties.extensions?.join(',') || '';
|
|
5273
5277
|
}
|
|
5274
5278
|
#subscription = new Subscription();
|
|
5279
|
+
#i18n = inject(SdI18nService);
|
|
5280
|
+
// Dropdown nguồn upload (mobile); display dịch qua i18n để hỗ trợ EN
|
|
5275
5281
|
sources = [{
|
|
5276
5282
|
value: 'ALL',
|
|
5277
|
-
display: '
|
|
5283
|
+
display: this.#i18n.t('core.component.form-builder.upload-source.all')
|
|
5278
5284
|
}, {
|
|
5279
5285
|
value: 'PHOTO_LIBRARY',
|
|
5280
|
-
display: '
|
|
5286
|
+
display: this.#i18n.t('core.component.form-builder.upload-source.photo-library')
|
|
5281
5287
|
}, {
|
|
5282
5288
|
value: 'CAPTURE',
|
|
5283
|
-
display: '
|
|
5289
|
+
display: this.#i18n.t('core.component.form-builder.upload-source.capture')
|
|
5284
5290
|
}];
|
|
5285
5291
|
constructor(ref, builderService) {
|
|
5286
5292
|
this.ref = ref;
|
|
@@ -5324,11 +5330,11 @@ class UploadAttribute {
|
|
|
5324
5330
|
?.filter(val => !!val) || [];
|
|
5325
5331
|
};
|
|
5326
5332
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: UploadAttribute, deps: [{ token: i0.ChangeDetectorRef }, { token: BuilderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5327
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: UploadAttribute, isStandalone: true, selector: "upload-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" title=\"
|
|
5333
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: UploadAttribute, isStandalone: true, selector: "upload-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n <attribute-select\r\n [label]=\"'core.component.form-builder.type' | sdT\"\r\n [(model)]=\"component.properties!.type\"\r\n [items]=\"[\r\n { value: 'file', display: ('core.component.form-builder.file' | sdT) },\r\n { value: 'image', display: ('core.component.form-builder.image' | sdT) }\r\n ]\"></attribute-select>\r\n</sd-section>\r\n\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n <attribute-input-number [label]=\"'core.component.form-builder.max-files' | sdT\" [(model)]=\"component.properties!.max\"></attribute-input-number>\r\n <attribute-input-number [label]=\"'core.component.form-builder.size-mb' | sdT\" [(model)]=\"component.properties!.maxSize\"></attribute-input-number>\r\n @if (component.properties!.type === 'file') {\r\n <attribute-input [label]=\"'core.component.form-builder.format-example' | sdT\" [model]=\"extension\" (modelChange)=\"onChangeExtension($event)\"></attribute-input>\r\n }\r\n @if (component.properties!.type === 'image') {\r\n <attribute-select [label]=\"'core.component.form-builder.source-mobile' | sdT\" [(model)]=\"component.properties!.source\" [items]=\"sources\"></attribute-select>\r\n }\r\n </sd-section>\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.parameter' | sdT\" icon=\"settings\">\r\n <attribute-parameter [label]=\"'core.component.form-builder.assign-parameter' | sdT\" [components]=\"components\" [(model)]=\"component.properties!.args\"></attribute-parameter>\r\n </sd-section>\r\n}\r\n", dependencies: [{ kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "collapsed", "collapsable", "hideHeader", "noPaddingBody"], outputs: ["collapsedChange"] }, { kind: "component", type: AttributeTemplate, selector: "attribute-template", inputs: ["component"], outputs: ["sdChange"] }, { kind: "component", type: AttributeInput, selector: "attribute-input", inputs: ["form", "label", "disabled", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeInputNumber, selector: "attribute-input-number", inputs: ["label", "disabled", "model"], outputs: ["modelChange"] }, { kind: "component", type: AttributeSwitch, selector: "attribute-switch", inputs: ["form", "label", "model"], outputs: ["modelChange"] }, { kind: "component", type: AttributeSelect, selector: "attribute-select", inputs: ["form", "label", "disabled", "multiple", "items", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeExpression, selector: "attribute-expression", inputs: ["components", "variables", "label", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeParameter, selector: "attribute-parameter", inputs: ["components", "label", "model"], outputs: ["modelChange"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5328
5334
|
}
|
|
5329
5335
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: UploadAttribute, decorators: [{
|
|
5330
5336
|
type: Component,
|
|
5331
|
-
args: [{ selector: 'upload-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeInput, AttributeInputNumber, AttributeSwitch, AttributeSelect, AttributeExpression, AttributeParameter], template: "<sd-section class=\"mt-8\" title=\"
|
|
5337
|
+
args: [{ selector: 'upload-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeInput, AttributeInputNumber, AttributeSwitch, AttributeSelect, AttributeExpression, AttributeParameter, SdTPipe], template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n <attribute-select\r\n [label]=\"'core.component.form-builder.type' | sdT\"\r\n [(model)]=\"component.properties!.type\"\r\n [items]=\"[\r\n { value: 'file', display: ('core.component.form-builder.file' | sdT) },\r\n { value: 'image', display: ('core.component.form-builder.image' | sdT) }\r\n ]\"></attribute-select>\r\n</sd-section>\r\n\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n <attribute-input-number [label]=\"'core.component.form-builder.max-files' | sdT\" [(model)]=\"component.properties!.max\"></attribute-input-number>\r\n <attribute-input-number [label]=\"'core.component.form-builder.size-mb' | sdT\" [(model)]=\"component.properties!.maxSize\"></attribute-input-number>\r\n @if (component.properties!.type === 'file') {\r\n <attribute-input [label]=\"'core.component.form-builder.format-example' | sdT\" [model]=\"extension\" (modelChange)=\"onChangeExtension($event)\"></attribute-input>\r\n }\r\n @if (component.properties!.type === 'image') {\r\n <attribute-select [label]=\"'core.component.form-builder.source-mobile' | sdT\" [(model)]=\"component.properties!.source\" [items]=\"sources\"></attribute-select>\r\n }\r\n </sd-section>\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.parameter' | sdT\" icon=\"settings\">\r\n <attribute-parameter [label]=\"'core.component.form-builder.assign-parameter' | sdT\" [components]=\"components\" [(model)]=\"component.properties!.args\"></attribute-parameter>\r\n </sd-section>\r\n}\r\n" }]
|
|
5332
5338
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: BuilderService }], propDecorators: { components: [{
|
|
5333
5339
|
type: Input,
|
|
5334
5340
|
args: [{ required: true }]
|
|
@@ -5463,7 +5469,7 @@ class AttributeTable {
|
|
|
5463
5469
|
this.modal?.close();
|
|
5464
5470
|
};
|
|
5465
5471
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: AttributeTable, deps: [{ token: SD_FORM_GENERIC_CONFIGURATION }], target: i0.ɵɵFactoryTarget.Component });
|
|
5466
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: AttributeTable, isStandalone: true, selector: "attribute-table", inputs: { components: "components", variables: "variables", _columnsKey: ["columnsKey", "_columnsKey"], _columns: ["columns", "_columns"] }, outputs: { columnsKeyChange: "columnsKeyChange", columnsChange: "columnsChange" }, viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true }], ngImport: i0, template: "<sd-section class=\"mt-8\" title=\"
|
|
5472
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: AttributeTable, isStandalone: true, selector: "attribute-table", inputs: { components: "components", variables: "variables", _columnsKey: ["columnsKey", "_columnsKey"], _columns: ["columns", "_columns"] }, outputs: { columnsKeyChange: "columnsKeyChange", columnsChange: "columnsChange" }, viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true }], ngImport: i0, template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.data' | sdT\" icon=\"format_list_bulleted\">\r\n @if (tables.length) {\r\n <!-- <div class=\"d-flex align-items-center py-4\">\r\n <div class=\"T14M\" style=\"flex: 1\">D\u1EEF li\u1EC7u c\u1ED9t</div>\r\n <sd-autocomplete\r\n style=\"width: 200px\"\r\n size=\"sm\"\r\n [(model)]=\"columnsKey\"\r\n [items]=\"tables\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n (sdChange)=\"onChangeColumnsKey($event)\"\r\n hideInlineError></sd-autocomplete>\r\n </div> -->\r\n <sd-autocomplete\r\n class=\"py-8\"\r\n [label]=\"'core.component.form-builder.column-data' | sdT\"\r\n [(model)]=\"columnsKey\"\r\n [items]=\"tables\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n (sdChange)=\"onChangeColumnsKey($event)\"\r\n hideInlineError></sd-autocomplete>\r\n }\r\n @if (!columnsKey) {\r\n <div class=\"d-flex flex-column\" style=\"gap: 4px\">\r\n <div class=\"T14M\">{{ 'core.component.form-builder.column-list' | sdT }}</div>\r\n @for (item of columns; track item.key; let idx = $index) {\r\n <div class=\"d-flex align-items-center py-4\" style=\"gap: 4px; justify-content: space-between\">\r\n <div class=\"d-flex flex-column\">\r\n <sd-label [label]=\"item.label\" [required]=\"item.validate?.required\"></sd-label>\r\n <div class=\"T12R text-secondary\">{{ item.key }}</div>\r\n </div>\r\n <div class=\"d-flex align-items-center\" style=\"gap: 4px\">\r\n <mat-icon class=\"text-secondary\" style=\"cursor: pointer\" [fontIcon]=\"'edit'\" (click)=\"editColumn(idx)\"></mat-icon>\r\n <mat-icon class=\"text-secondary\" style=\"cursor: pointer\" [fontIcon]=\"'cancel'\" (click)=\"removeColumn(idx)\"></mat-icon>\r\n </div>\r\n </div>\r\n }\r\n <sd-button prefixIcon=\"add\" [title]=\"'core.component.form-builder.add-column' | sdT\" (click)=\"addColumn()\" color=\"primary\"></sd-button>\r\n </div>\r\n }\r\n</sd-section>\r\n<sd-modal [title]=\"'core.component.form-builder.column-config' | sdT\" width=\"600px\">\r\n @if (column) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"column.key\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.column-name' | sdT\" [(model)]=\"column.label\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.width' | sdT\" [(model)]=\"column.width\"></attribute-input>\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"column.validate!.required\"></attribute-switch>\r\n <attribute-select [form]=\"form\" [label]=\"'core.component.form-builder.data-type' | sdT\" [(model)]=\"column.type\" [items]=\"types\"></attribute-select>\r\n </sd-section>\r\n @if (column.type === 'boolean') {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"info\">\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.show-when-true' | sdT\" [(model)]=\"column.displayOnTrue\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.show-when-false' | sdT\" [(model)]=\"column.displayOnFalse\"></attribute-input>\r\n </sd-section>\r\n } @else if (column.type === 'values') {\r\n <attribute-selection\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [component]=\"column\"\r\n [(valuesKey)]=\"column.valuesKey\"\r\n [(values)]=\"column.values\"></attribute-selection>\r\n } @else if (column.type === 'file' || column.type === 'image') {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.parameter' | sdT\" icon=\"settings\">\r\n <attribute-parameter [label]=\"'core.component.form-builder.assign-parameter' | sdT\" [components]=\"components\" [(model)]=\"column!.args\"></attribute-parameter>\r\n </sd-section>\r\n }\r\n }\r\n <ng-container sdFooter>\r\n <sd-button prefixIcon=\"save\" [title]=\"'core.component.form-builder.save' | sdT\" (click)=\"onConfirm()\" color=\"primary\"></sd-button>\r\n </ng-container>\r\n</sd-modal>\r\n", dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: SdLabel, selector: "sd-label", inputs: ["label", "description", "required", "helperText"] }, { kind: "component", type: SdAutocomplete$1, selector: "sd-autocomplete", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "limit", "cacheChecksum", "hyperlink", "items", "hideInlineError", "addable", "required", "disabled", "viewed", "validator", "inlineError", "appearance", "model"], outputs: ["modelChange", "sdChange", "sdSelection", "sdAdd"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "collapsed", "collapsable", "hideHeader", "noPaddingBody"], outputs: ["collapsedChange"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose"], outputs: ["sdClosed"] }, { kind: "component", type: AttributeSelection, selector: "attribute-selection", inputs: ["components", "variables", "component", "valuesKey", "values"], outputs: ["valuesKeyChange", "valuesChange", "sdChange"] }, { kind: "component", type: AttributeInput, selector: "attribute-input", inputs: ["form", "label", "disabled", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeSelect, selector: "attribute-select", inputs: ["form", "label", "disabled", "multiple", "items", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeSwitch, selector: "attribute-switch", inputs: ["form", "label", "model"], outputs: ["modelChange"] }, { kind: "component", type: AttributeParameter, selector: "attribute-parameter", inputs: ["components", "label", "model"], outputs: ["modelChange"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }] });
|
|
5467
5473
|
}
|
|
5468
5474
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: AttributeTable, decorators: [{
|
|
5469
5475
|
type: Component,
|
|
@@ -5479,8 +5485,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
5479
5485
|
AttributeInput,
|
|
5480
5486
|
AttributeSelect,
|
|
5481
5487
|
AttributeSwitch,
|
|
5482
|
-
AttributeParameter
|
|
5483
|
-
], template: "<sd-section class=\"mt-8\" title=\"
|
|
5488
|
+
AttributeParameter, SdTPipe
|
|
5489
|
+
], template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.data' | sdT\" icon=\"format_list_bulleted\">\r\n @if (tables.length) {\r\n <!-- <div class=\"d-flex align-items-center py-4\">\r\n <div class=\"T14M\" style=\"flex: 1\">D\u1EEF li\u1EC7u c\u1ED9t</div>\r\n <sd-autocomplete\r\n style=\"width: 200px\"\r\n size=\"sm\"\r\n [(model)]=\"columnsKey\"\r\n [items]=\"tables\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n (sdChange)=\"onChangeColumnsKey($event)\"\r\n hideInlineError></sd-autocomplete>\r\n </div> -->\r\n <sd-autocomplete\r\n class=\"py-8\"\r\n [label]=\"'core.component.form-builder.column-data' | sdT\"\r\n [(model)]=\"columnsKey\"\r\n [items]=\"tables\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n (sdChange)=\"onChangeColumnsKey($event)\"\r\n hideInlineError></sd-autocomplete>\r\n }\r\n @if (!columnsKey) {\r\n <div class=\"d-flex flex-column\" style=\"gap: 4px\">\r\n <div class=\"T14M\">{{ 'core.component.form-builder.column-list' | sdT }}</div>\r\n @for (item of columns; track item.key; let idx = $index) {\r\n <div class=\"d-flex align-items-center py-4\" style=\"gap: 4px; justify-content: space-between\">\r\n <div class=\"d-flex flex-column\">\r\n <sd-label [label]=\"item.label\" [required]=\"item.validate?.required\"></sd-label>\r\n <div class=\"T12R text-secondary\">{{ item.key }}</div>\r\n </div>\r\n <div class=\"d-flex align-items-center\" style=\"gap: 4px\">\r\n <mat-icon class=\"text-secondary\" style=\"cursor: pointer\" [fontIcon]=\"'edit'\" (click)=\"editColumn(idx)\"></mat-icon>\r\n <mat-icon class=\"text-secondary\" style=\"cursor: pointer\" [fontIcon]=\"'cancel'\" (click)=\"removeColumn(idx)\"></mat-icon>\r\n </div>\r\n </div>\r\n }\r\n <sd-button prefixIcon=\"add\" [title]=\"'core.component.form-builder.add-column' | sdT\" (click)=\"addColumn()\" color=\"primary\"></sd-button>\r\n </div>\r\n }\r\n</sd-section>\r\n<sd-modal [title]=\"'core.component.form-builder.column-config' | sdT\" width=\"600px\">\r\n @if (column) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"column.key\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.column-name' | sdT\" [(model)]=\"column.label\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.width' | sdT\" [(model)]=\"column.width\"></attribute-input>\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"column.validate!.required\"></attribute-switch>\r\n <attribute-select [form]=\"form\" [label]=\"'core.component.form-builder.data-type' | sdT\" [(model)]=\"column.type\" [items]=\"types\"></attribute-select>\r\n </sd-section>\r\n @if (column.type === 'boolean') {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"info\">\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.show-when-true' | sdT\" [(model)]=\"column.displayOnTrue\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.show-when-false' | sdT\" [(model)]=\"column.displayOnFalse\"></attribute-input>\r\n </sd-section>\r\n } @else if (column.type === 'values') {\r\n <attribute-selection\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [component]=\"column\"\r\n [(valuesKey)]=\"column.valuesKey\"\r\n [(values)]=\"column.values\"></attribute-selection>\r\n } @else if (column.type === 'file' || column.type === 'image') {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.parameter' | sdT\" icon=\"settings\">\r\n <attribute-parameter [label]=\"'core.component.form-builder.assign-parameter' | sdT\" [components]=\"components\" [(model)]=\"column!.args\"></attribute-parameter>\r\n </sd-section>\r\n }\r\n }\r\n <ng-container sdFooter>\r\n <sd-button prefixIcon=\"save\" [title]=\"'core.component.form-builder.save' | sdT\" (click)=\"onConfirm()\" color=\"primary\"></sd-button>\r\n </ng-container>\r\n</sd-modal>\r\n" }]
|
|
5484
5490
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
5485
5491
|
type: Inject,
|
|
5486
5492
|
args: [SD_FORM_GENERIC_CONFIGURATION]
|
|
@@ -5558,11 +5564,11 @@ class TableAttribute {
|
|
|
5558
5564
|
this.#changes.next();
|
|
5559
5565
|
};
|
|
5560
5566
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TableAttribute, deps: [{ token: i0.ChangeDetectorRef }, { token: BuilderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5561
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: TableAttribute, isStandalone: true, selector: "table-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" title=\"
|
|
5567
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: TableAttribute, isStandalone: true, selector: "table-attribute", inputs: { components: "components", variables: "variables", _component: ["component", "_component"] }, ngImport: i0, template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n</sd-section>\r\n\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n <attribute-table\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(columnsKey)]=\"component.columnsKey\"\r\n [(columns)]=\"component.columns\"\r\n (columnsKeyChange)=\"onChanges()\"\r\n (columnsChange)=\"onChanges()\"></attribute-table>\r\n}\r\n", dependencies: [{ kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "collapsed", "collapsable", "hideHeader", "noPaddingBody"], outputs: ["collapsedChange"] }, { kind: "component", type: AttributeTemplate, selector: "attribute-template", inputs: ["component"], outputs: ["sdChange"] }, { kind: "component", type: AttributeInput, selector: "attribute-input", inputs: ["form", "label", "disabled", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: AttributeSwitch, selector: "attribute-switch", inputs: ["form", "label", "model"], outputs: ["modelChange"] }, { kind: "component", type: AttributeTable, selector: "attribute-table", inputs: ["components", "variables", "columnsKey", "columns"], outputs: ["columnsKeyChange", "columnsChange"] }, { kind: "component", type: AttributeExpression, selector: "attribute-expression", inputs: ["components", "variables", "label", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5562
5568
|
}
|
|
5563
5569
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TableAttribute, decorators: [{
|
|
5564
5570
|
type: Component,
|
|
5565
|
-
args: [{ selector: 'table-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeInput, AttributeSwitch, AttributeTable, AttributeExpression], template: "<sd-section class=\"mt-8\" title=\"
|
|
5571
|
+
args: [{ selector: 'table-attribute', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdSection, AttributeTemplate, AttributeInput, AttributeSwitch, AttributeTable, AttributeExpression, SdTPipe], template: "<sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.general' | sdT\" icon=\"info\">\r\n <attribute-template [component]=\"component\" (sdChange)=\"onChangeTemplate($event)\"></attribute-template>\r\n <attribute-input [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"component.key\" [disabled]=\"!!component.template\"></attribute-input>\r\n <attribute-input [form]=\"form\" [label]=\"'core.component.form-builder.label' | sdT\" [(model)]=\"component.label\"></attribute-input>\r\n</sd-section>\r\n\r\n@if (!component.properties!.hidden && !component.properties!.viewed) {\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.display' | sdT\" icon=\"visibility\">\r\n <attribute-switch [label]=\"'core.component.form-builder.disabled' | sdT\" [(model)]=\"component.disabled\"></attribute-switch>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.visible-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.visibleWhenExpression\"></attribute-expression>\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.hidden-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.hiddenWhenExpression\"></attribute-expression>\r\n @if (!component.disabled) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.disabled-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.disabledWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n <sd-section class=\"mt-8\" [title]=\"'core.component.form-builder.validation' | sdT\" icon=\"verified_user\">\r\n <attribute-switch [form]=\"form\" [label]=\"'core.component.form-builder.required' | sdT\" [(model)]=\"component.validate!.required\"></attribute-switch>\r\n @if (!component.validate!.required) {\r\n <attribute-expression\r\n [label]=\"'core.component.form-builder.required-when' | sdT\"\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(model)]=\"component.properties!.requiredWhenExpression\"></attribute-expression>\r\n }\r\n </sd-section>\r\n <attribute-table\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [(columnsKey)]=\"component.columnsKey\"\r\n [(columns)]=\"component.columns\"\r\n (columnsKeyChange)=\"onChanges()\"\r\n (columnsChange)=\"onChanges()\"></attribute-table>\r\n}\r\n" }]
|
|
5566
5572
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: BuilderService }], propDecorators: { components: [{
|
|
5567
5573
|
type: Input,
|
|
5568
5574
|
args: [{ required: true }]
|
|
@@ -5696,11 +5702,11 @@ class ConfigureValidationComponent {
|
|
|
5696
5702
|
this.modal?.close();
|
|
5697
5703
|
};
|
|
5698
5704
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ConfigureValidationComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SD_FORM_GENERIC_CONFIGURATION }], target: i0.ɵɵFactoryTarget.Component });
|
|
5699
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ConfigureValidationComponent, isStandalone: true, selector: "configure-validation", outputs: { accept: "accept" }, viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true }], ngImport: i0, template: "<sd-modal title=\"C\u1EA5u h\u00ECnh x\u00E1c th\u1EF1c l\u1ED7i/c\u1EA3nh b\u00E1o\" view=\"dialog\" width=\"800px\" #popupConfigureVariables>\r\n @for (validation of validations; track $index; let idx = $index) {\r\n <div class=\"mat-elevation-z2 position-relative p-8 mb-16\" style=\"border-radius: 8px;\">\r\n <div class=\"row mx-0\">\r\n <sd-select\r\n class=\"col-3\"\r\n label=\"Lo\u1EA1i th\u00F4ng b\u00E1o\"\r\n [(model)]=\"validation.alert\"\r\n [items]=\"alerts\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required></sd-select>\r\n @if (validation.type === 'expression') {\r\n <sd-input class=\"col-9\" [form]=\"form\" label=\"Th\u00F4ng b\u00E1o hi\u1EC3n th\u1ECB\" [(model)]=\"validation.message\" required></sd-input>\r\n <expression-builder class=\"col-12\" label=\"Bi\u1EC3u th\u1EE9c \u0111i\u1EC1u ki\u1EC7n\" [(model)]=\"validation.expression\" [attributes]=\"attributes\"></expression-builder>\r\n } @else if (validation.type === 'function') {\r\n <sd-select\r\n class=\"col-9\"\r\n [form]=\"form\"\r\n [(model)]=\"validation.code\"\r\n [items]=\"functions\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required></sd-select>\r\n }\r\n <mat-icon class=\"c-close-icon\" (click)=\"removaValidation(idx)\">delete</mat-icon>\r\n <!-- <sd-button\r\n \r\n prefixIcon=\"delete\"\r\n (click)=\"removaValidation(idx)\"\r\n color=\"error\"\r\n type=\"link\"></sd-button> -->\r\n </div>\r\n </div>\r\n }\r\n <sd-button title=\"Th\u00EAm x\u00E1c th\u1EF1c\" [matMenuTriggerFor]=\"menu\" prefixIcon=\"add\" color=\"primary\" type=\"link\"></sd-button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button (click)=\"addValidation('expression')\" mat-menu-item type=\"button\">\r\n <!-- <mat-icon fontIcon=\"warning\"></mat-icon> -->\r\n <span>Bi\u1EC3u th\u1EE9c</span>\r\n </button>\r\n <button (click)=\"addValidation('function')\" mat-menu-item type=\"button\">\r\n <!-- <mat-icon fontIcon=\"error\"></mat-icon> -->\r\n <span>Ph\u01B0\u01A1ng th\u1EE9c s\u1EB5n c\u00F3</span>\r\n </button>\r\n </mat-menu>\r\n <ng-container sdFooter>\r\n <sd-button type=\"fill\" title=\"L\u01B0u\" (click)=\"updateValidations()\" prefixIcon=\"save\" color=\"primary\"></sd-button>\r\n </ng-container>\r\n</sd-modal>\r\n", styles: [".text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-light{color:var(--sd-light)!important}.bg-light{background:var(--sd-light)!important}.border-light{border-color:var(--sd-light)!important}.text-dark{color:var(--sd-dark)!important}.bg-dark{background:var(--sd-dark)!important}.border-dark{border-color:var(--sd-dark)!important}.text-black500{color:var(--sd-black500)!important}.bg-black500{background:var(--sd-black500)!important}.border-black500{border-color:var(--sd-black500)!important}.text-black400{color:var(--sd-black400)!important}.bg-black400{background:var(--sd-black400)!important}.border-black400{border-color:var(--sd-black400)!important}.text-black300{color:var(--sd-black300)!important}.bg-black300{background:var(--sd-black300)!important}.border-black300{border-color:var(--sd-black300)!important}.text-black200{color:var(--sd-black200)!important}.bg-black200{background:var(--sd-black200)!important}.border-black200{border-color:var(--sd-black200)!important}.text-black100{color:var(--sd-black100)!important}.bg-black100{background:var(--sd-black100)!important}.border-black100{border-color:var(--sd-black100)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}.c-close-icon{margin-left:auto;font-size:16px;width:16px;height:16px;cursor:pointer;border-radius:50%;color:var(--sd-error);top:4px;right:4px;position:absolute}.c-close-icon:hover{background-color:var(--sd-black200)}\n"], dependencies: [{ kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1$5.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i1$5.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i1$5.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose"], outputs: ["sdClosed"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "tooltip", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "hyperlink", "minWidthPanel", "hideInlineError", "required", "disabled", "viewed", "multiple", "validator", "inlineError", "appearance", "floatLabel", "items", "model"], outputs: ["modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: ExpressionBuilderComponent, selector: "expression-builder", inputs: ["label", "attributes", "model"], outputs: ["modelChange", "sdChange", "edit"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5705
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ConfigureValidationComponent, isStandalone: true, selector: "configure-validation", outputs: { accept: "accept" }, viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true }], ngImport: i0, template: "<sd-modal [title]=\"'core.component.form-builder.config-validation-error-warning' | sdT\" view=\"dialog\" width=\"800px\" #popupConfigureVariables>\r\n @for (validation of validations; track $index; let idx = $index) {\r\n <div class=\"mat-elevation-z2 position-relative p-8 mb-16\" style=\"border-radius: 8px;\">\r\n <div class=\"row mx-0\">\r\n <sd-select\r\n class=\"col-3\"\r\n [label]=\"'core.component.form-builder.message-type' | sdT\"\r\n [(model)]=\"validation.alert\"\r\n [items]=\"alerts\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required></sd-select>\r\n @if (validation.type === 'expression') {\r\n <sd-input class=\"col-9\" [form]=\"form\" [label]=\"'core.component.form-builder.message-display' | sdT\" [(model)]=\"validation.message\" required></sd-input>\r\n <expression-builder class=\"col-12\" [label]=\"'core.component.form-builder.condition-expression' | sdT\" [(model)]=\"validation.expression\" [attributes]=\"attributes\"></expression-builder>\r\n } @else if (validation.type === 'function') {\r\n <sd-select\r\n class=\"col-9\"\r\n [form]=\"form\"\r\n [(model)]=\"validation.code\"\r\n [items]=\"functions\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required></sd-select>\r\n }\r\n <mat-icon class=\"c-close-icon\" (click)=\"removaValidation(idx)\">delete</mat-icon>\r\n <!-- <sd-button\r\n \r\n prefixIcon=\"delete\"\r\n (click)=\"removaValidation(idx)\"\r\n color=\"error\"\r\n type=\"link\"></sd-button> -->\r\n </div>\r\n </div>\r\n }\r\n <sd-button [title]=\"'core.component.form-builder.add-validation' | sdT\" [matMenuTriggerFor]=\"menu\" prefixIcon=\"add\" color=\"primary\" type=\"link\"></sd-button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button (click)=\"addValidation('expression')\" mat-menu-item type=\"button\">\r\n <!-- <mat-icon fontIcon=\"warning\"></mat-icon> -->\r\n <span>{{ 'core.component.form-builder.expression' | sdT }}</span>\r\n </button>\r\n <button (click)=\"addValidation('function')\" mat-menu-item type=\"button\">\r\n <!-- <mat-icon fontIcon=\"error\"></mat-icon> -->\r\n <span>{{ 'core.component.form-builder.available-methods' | sdT }}</span>\r\n </button>\r\n </mat-menu>\r\n <ng-container sdFooter>\r\n <sd-button type=\"fill\" [title]=\"'core.component.form-builder.save' | sdT\" (click)=\"updateValidations()\" prefixIcon=\"save\" color=\"primary\"></sd-button>\r\n </ng-container>\r\n</sd-modal>\r\n", styles: [".text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-light{color:var(--sd-light)!important}.bg-light{background:var(--sd-light)!important}.border-light{border-color:var(--sd-light)!important}.text-dark{color:var(--sd-dark)!important}.bg-dark{background:var(--sd-dark)!important}.border-dark{border-color:var(--sd-dark)!important}.text-black500{color:var(--sd-black500)!important}.bg-black500{background:var(--sd-black500)!important}.border-black500{border-color:var(--sd-black500)!important}.text-black400{color:var(--sd-black400)!important}.bg-black400{background:var(--sd-black400)!important}.border-black400{border-color:var(--sd-black400)!important}.text-black300{color:var(--sd-black300)!important}.bg-black300{background:var(--sd-black300)!important}.border-black300{border-color:var(--sd-black300)!important}.text-black200{color:var(--sd-black200)!important}.bg-black200{background:var(--sd-black200)!important}.border-black200{border-color:var(--sd-black200)!important}.text-black100{color:var(--sd-black100)!important}.bg-black100{background:var(--sd-black100)!important}.border-black100{border-color:var(--sd-black100)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}.c-close-icon{margin-left:auto;font-size:16px;width:16px;height:16px;cursor:pointer;border-radius:50%;color:var(--sd-error);top:4px;right:4px;position:absolute}.c-close-icon:hover{background-color:var(--sd-black200)}\n"], dependencies: [{ kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1$5.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i1$5.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i1$5.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose"], outputs: ["sdClosed"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "tooltip", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "hyperlink", "minWidthPanel", "hideInlineError", "required", "disabled", "viewed", "multiple", "validator", "inlineError", "appearance", "floatLabel", "items", "model"], outputs: ["modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: ExpressionBuilderComponent, selector: "expression-builder", inputs: ["label", "attributes", "model"], outputs: ["modelChange", "sdChange", "edit"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5700
5706
|
}
|
|
5701
5707
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ConfigureValidationComponent, decorators: [{
|
|
5702
5708
|
type: Component,
|
|
5703
|
-
args: [{ selector: 'configure-validation', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatMenuModule, SdModal, SdButton, SdInput, SdSelect, ExpressionBuilderComponent, MatIconModule], template: "<sd-modal title=\"
|
|
5709
|
+
args: [{ selector: 'configure-validation', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatMenuModule, SdModal, SdButton, SdInput, SdSelect, ExpressionBuilderComponent, MatIconModule, SdTPipe], template: "<sd-modal [title]=\"'core.component.form-builder.config-validation-error-warning' | sdT\" view=\"dialog\" width=\"800px\" #popupConfigureVariables>\r\n @for (validation of validations; track $index; let idx = $index) {\r\n <div class=\"mat-elevation-z2 position-relative p-8 mb-16\" style=\"border-radius: 8px;\">\r\n <div class=\"row mx-0\">\r\n <sd-select\r\n class=\"col-3\"\r\n [label]=\"'core.component.form-builder.message-type' | sdT\"\r\n [(model)]=\"validation.alert\"\r\n [items]=\"alerts\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required></sd-select>\r\n @if (validation.type === 'expression') {\r\n <sd-input class=\"col-9\" [form]=\"form\" [label]=\"'core.component.form-builder.message-display' | sdT\" [(model)]=\"validation.message\" required></sd-input>\r\n <expression-builder class=\"col-12\" [label]=\"'core.component.form-builder.condition-expression' | sdT\" [(model)]=\"validation.expression\" [attributes]=\"attributes\"></expression-builder>\r\n } @else if (validation.type === 'function') {\r\n <sd-select\r\n class=\"col-9\"\r\n [form]=\"form\"\r\n [(model)]=\"validation.code\"\r\n [items]=\"functions\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required></sd-select>\r\n }\r\n <mat-icon class=\"c-close-icon\" (click)=\"removaValidation(idx)\">delete</mat-icon>\r\n <!-- <sd-button\r\n \r\n prefixIcon=\"delete\"\r\n (click)=\"removaValidation(idx)\"\r\n color=\"error\"\r\n type=\"link\"></sd-button> -->\r\n </div>\r\n </div>\r\n }\r\n <sd-button [title]=\"'core.component.form-builder.add-validation' | sdT\" [matMenuTriggerFor]=\"menu\" prefixIcon=\"add\" color=\"primary\" type=\"link\"></sd-button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button (click)=\"addValidation('expression')\" mat-menu-item type=\"button\">\r\n <!-- <mat-icon fontIcon=\"warning\"></mat-icon> -->\r\n <span>{{ 'core.component.form-builder.expression' | sdT }}</span>\r\n </button>\r\n <button (click)=\"addValidation('function')\" mat-menu-item type=\"button\">\r\n <!-- <mat-icon fontIcon=\"error\"></mat-icon> -->\r\n <span>{{ 'core.component.form-builder.available-methods' | sdT }}</span>\r\n </button>\r\n </mat-menu>\r\n <ng-container sdFooter>\r\n <sd-button type=\"fill\" [title]=\"'core.component.form-builder.save' | sdT\" (click)=\"updateValidations()\" prefixIcon=\"save\" color=\"primary\"></sd-button>\r\n </ng-container>\r\n</sd-modal>\r\n", styles: [".text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-light{color:var(--sd-light)!important}.bg-light{background:var(--sd-light)!important}.border-light{border-color:var(--sd-light)!important}.text-dark{color:var(--sd-dark)!important}.bg-dark{background:var(--sd-dark)!important}.border-dark{border-color:var(--sd-dark)!important}.text-black500{color:var(--sd-black500)!important}.bg-black500{background:var(--sd-black500)!important}.border-black500{border-color:var(--sd-black500)!important}.text-black400{color:var(--sd-black400)!important}.bg-black400{background:var(--sd-black400)!important}.border-black400{border-color:var(--sd-black400)!important}.text-black300{color:var(--sd-black300)!important}.bg-black300{background:var(--sd-black300)!important}.border-black300{border-color:var(--sd-black300)!important}.text-black200{color:var(--sd-black200)!important}.bg-black200{background:var(--sd-black200)!important}.border-black200{border-color:var(--sd-black200)!important}.text-black100{color:var(--sd-black100)!important}.bg-black100{background:var(--sd-black100)!important}.border-black100{border-color:var(--sd-black100)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}.c-close-icon{margin-left:auto;font-size:16px;width:16px;height:16px;cursor:pointer;border-radius:50%;color:var(--sd-error);top:4px;right:4px;position:absolute}.c-close-icon:hover{background-color:var(--sd-black200)}\n"] }]
|
|
5704
5710
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
5705
5711
|
type: Inject,
|
|
5706
5712
|
args: [SD_FORM_GENERIC_CONFIGURATION]
|
|
@@ -5724,6 +5730,7 @@ class SdFormBuilder extends SdBaseSecureComponent {
|
|
|
5724
5730
|
configureValidation;
|
|
5725
5731
|
formRender;
|
|
5726
5732
|
form = new FormGroup({});
|
|
5733
|
+
#i18n = inject(SdI18nService);
|
|
5727
5734
|
constructor(ref, notifyService, confirmService, builderService) {
|
|
5728
5735
|
super();
|
|
5729
5736
|
this.ref = ref;
|
|
@@ -5923,7 +5930,7 @@ class SdFormBuilder extends SdBaseSecureComponent {
|
|
|
5923
5930
|
this.#syncRowsToComponents();
|
|
5924
5931
|
}
|
|
5925
5932
|
else {
|
|
5926
|
-
this.notifyService.warning('
|
|
5933
|
+
this.notifyService.warning(this.#i18n.t('core.component.form-builder.row-overflow'));
|
|
5927
5934
|
}
|
|
5928
5935
|
}
|
|
5929
5936
|
}
|
|
@@ -6135,11 +6142,11 @@ class SdFormBuilder extends SdBaseSecureComponent {
|
|
|
6135
6142
|
}
|
|
6136
6143
|
};
|
|
6137
6144
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdFormBuilder, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$6.SdNotifyService }, { token: i1$6.SdConfirmService }, { token: BuilderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6138
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdFormBuilder, isStandalone: true, selector: "sd-form-builder", inputs: { _formGeneric: ["formGeneric", "_formGeneric"] }, viewQueries: [{ propertyName: "popupViewJSON", first: true, predicate: ["popupViewJSON"], descendants: true }, { propertyName: "popupConfigureVariables", first: true, predicate: ["popupConfigureVariables"], descendants: true }, { propertyName: "configureValidation", first: true, predicate: ConfigureValidationComponent, descendants: true }, { propertyName: "formRender", first: true, predicate: SdFormRender, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"d-flex form-editor\">\r\n <div class=\"d-flex flex-column form-menu\">\r\n <div class=\"c-header\">Components</div>\r\n <div class=\"component-container\" style=\"flex: 1\">\r\n <div class=\"form-editor-group\" cdkDropList [cdkDropListData]=\"formBuilderComponents\" [cdkDropListEnterPredicate]=\"noReturnPredicate\">\r\n @for (formBuilderComponent of formBuilderComponents; track formBuilderComponent.type) {\r\n <div cdkDrag class=\"form-item\" (click)=\"addComponent(formBuilderComponent)\" aria-hidden=\"true\">\r\n <div class=\"c-form-item\">\r\n <span [innerHtml]=\"formBuilderComponent.icon | sdSafeHtml\"></span>\r\n <div class=\"title\">\r\n {{ formBuilderComponent.name }}\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"d-flex flex-column form-content\">\r\n <div class=\"c-header d-flex align-items-center justify-content-between\">\r\n <div>B\u1ED1 c\u1EE5c</div>\r\n <div class=\"d-flex align-items-center\" style=\"gap: 8px\">\r\n <mat-icon matTooltip=\"Xem JSON\" fontIcon=\"code\" (click)=\"viewJSON()\"></mat-icon>\r\n <mat-icon matTooltip=\"C\u1EA5u h\u00ECnh bi\u1EBFn\" fontIcon=\"scatter_plot\" (click)=\"configureVariables()\"></mat-icon>\r\n <mat-icon matTooltip=\"C\u1EA5u h\u00ECnh x\u00E1c th\u1EF1c c\u1EA3nh b\u00E1o/l\u1ED7i\" fontIcon=\"error\" (click)=\"openConfigureValidation()\"></mat-icon>\r\n <mat-icon\r\n [matTooltip]=\"isPreview ? 'Tr\u1EDF v\u1EC1 thi\u1EBFt k\u1EBF' : 'Xem th\u1EED'\"\r\n [fontIcon]=\"isPreview ? 'stop_circle' : 'play_circle'\"\r\n (click)=\"isPreview = !isPreview\"></mat-icon>\r\n </div>\r\n </div>\r\n <div class=\"p-12 components\" style=\"flex: 1; overflow-y: auto\" id=\"frmComponent\">\r\n @if (isPreview) {\r\n <sd-form-render [configuration]=\"{ components: this.components, validations: this.validations }\"></sd-form-render>\r\n <sd-button title=\"Validate\" (click)=\"onValidate()\"></sd-button>\r\n } @else {\r\n <div\r\n cdkDropList\r\n cdkDropListOrientation=\"vertical\"\r\n [cdkDropListData]=\"dragDropRows\"\r\n class=\"listY\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n (click)=\"clickFormContentEmpty()\"\r\n aria-hidden=\"true\">\r\n @for (row of dragDropRows; track row.rowIndex) {\r\n <div\r\n cdkDrag\r\n (mouseover)=\"onMouseover($event, row)\"\r\n (focus)=\"onFocus($event)\"\r\n id=\"row_{{ row.rowIndex }}\"\r\n class=\"row-item\"\r\n aria-hidden=\"true\">\r\n <div class=\"btn-drag-row-item\"><mat-icon matTooltip=\"K\u00E9o l\u00EAn / xu\u1ED1ng\">drag_indicator</mat-icon></div>\r\n <div\r\n class=\"c-row-item\"\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n [cdkDropListData]=\"row.items\"\r\n (cdkDropListDropped)=\"drop($event)\">\r\n @for (item of row.items; track item.id; let i = $index) {\r\n <div\r\n cdkDrag\r\n [id]=\"item.id\"\r\n class=\"component-item column-{{ item.layout?.columns || 12 }}\"\r\n [class.active]=\"item.id === selectedComponent?.id\"\r\n (click)=\"selectComponent(item)\"\r\n (clickOutside)=\"onClickedOutside($event)\"\r\n (cdkDragStarted)=\"dragStartComponentItem($event)\"\r\n (cdkDragEnded)=\"dragEndComponentItem($event)\"\r\n aria-hidden=\"true\">\r\n <div class=\"c-component-item\" [class.c-hidden]=\"item.properties?.hidden\">\r\n <div class=\"c-actions\">\r\n @if (item.type !== 'group') {\r\n <mat-icon\r\n [matTooltip]=\"item.properties?.viewed ? 'B\u1ECF ch\u1EC9 xem' : 'Ch\u1EC9 xem'\"\r\n (click)=\"onChangeViewed(item)\"\r\n fontSet=\"material-icons-outlined\"\r\n style=\"font-size: 16px; cursor: pointer\"\r\n [class.text-warning]=\"item.properties?.viewed\">\r\n edit_off\r\n </mat-icon>\r\n }\r\n <mat-icon\r\n matTooltip=\"Nh\u00E2n b\u1EA3n\"\r\n (click)=\"onDuplicate(item)\"\r\n fontSet=\"material-icons-outlined\"\r\n style=\"font-size: 16px; cursor: pointer\">\r\n content_copy\r\n </mat-icon>\r\n <mat-icon\r\n [matTooltip]=\"item.properties?.hidden ? 'Hi\u1EC7n' : '\u1EA8n'\"\r\n (click)=\"onChangeHidden(item)\"\r\n fontSet=\"material-icons-outlined\"\r\n style=\"font-size: 16px; cursor: pointer\"\r\n [class.text-warning]=\"item.properties?.hidden\">\r\n visibility_off\r\n </mat-icon>\r\n <mat-icon\r\n matTooltip=\"X\u00F3a\"\r\n (click)=\"removeComponent(item.id)\"\r\n fontSet=\"material-icons-outlined\"\r\n style=\"font-size: 16px; cursor: pointer\"\r\n class=\"text-error\">\r\n delete\r\n </mat-icon>\r\n </div>\r\n @if (item.type === 'textfield') {\r\n <textfield-control [component]=\"item\"></textfield-control>\r\n } @else if (item.type === 'textarea') {\r\n <textarea-control [component]=\"item\"></textarea-control>\r\n } @else if (item.type === 'chip-string') {\r\n <chip-string-control [component]=\"item\"></chip-string-control>\r\n } @else if (item.type === 'chip-calendar') {\r\n <chip-calendar-control [component]=\"item\"></chip-calendar-control>\r\n } @else if (item.type === 'number') {\r\n <number-control [component]=\"item\"></number-control>\r\n } @else if (item.type === 'datetime') {\r\n <datetime-control [component]=\"item\"></datetime-control>\r\n } @else if (item.type === 'select') {\r\n <select-control [component]=\"item\"></select-control>\r\n } @else if (item.type === 'radio') {\r\n <radio-control [component]=\"item\"></radio-control>\r\n } @else if (item.type === 'checkbox') {\r\n <checkbox-control [component]=\"item\"></checkbox-control>\r\n } @else if (item.type === 'html') {\r\n <html-control [component]=\"item\" #html></html-control>\r\n } @else if (item.type === 'upload') {\r\n <upload-control [component]=\"item\"></upload-control>\r\n } @else if (item.type === 'table') {\r\n <table-control [component]=\"item\"></table-control>\r\n }\r\n <div class=\"c-item-backdrop\"></div>\r\n </div>\r\n <div cdkDropList cdkDropListOrientation=\"horizontal\">\r\n <div\r\n cdkDrag\r\n (cdkDragMoved)=\"changeSizeControl($event, item, row.items, i)\"\r\n (cdkDragEnded)=\"dragEndChangeSizeControl($event)\"\r\n class=\"c-bar-resize-right\"\r\n matTooltip=\"Co d\u00E3n\"></div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"d-flex flex-column form-attributes\">\r\n <div class=\"c-header\">Thu\u1ED9c t\u00EDnh</div>\r\n @if (selectedComponent) {\r\n <div class=\"attributes\" style=\"flex: 1\" aria-hidden=\"true\">\r\n @if (selectedComponent.type === 'textfield') {\r\n <textfield-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></textfield-attribute>\r\n } @else if (selectedComponent.type === 'textarea') {\r\n <textarea-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></textarea-attribute>\r\n } @else if (selectedComponent.type === 'chip-string') {\r\n <chip-string-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></chip-string-attribute>\r\n } @else if (selectedComponent.type === 'chip-calendar') {\r\n <chip-calendar-attribute\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [component]=\"selectedComponent\"></chip-calendar-attribute>\r\n } @else if (selectedComponent.type === 'number') {\r\n <number-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></number-attribute>\r\n } @else if (selectedComponent.type === 'datetime') {\r\n <datetime-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></datetime-attribute>\r\n } @else if (selectedComponent.type === 'select') {\r\n <select-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></select-attribute>\r\n } @else if (selectedComponent.type === 'radio') {\r\n <radio-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></radio-attribute>\r\n } @else if (selectedComponent.type === 'checkbox') {\r\n <checkbox-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></checkbox-attribute>\r\n } @else if (selectedComponent.type === 'html') {\r\n <html-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></html-attribute>\r\n } @else if (selectedComponent.type === 'upload') {\r\n <upload-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></upload-attribute>\r\n } @else if (selectedComponent.type === 'table') {\r\n <table-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></table-attribute>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n<sd-modal title=\"JSON\" view=\"dialog\" width=\"80%\" #popupViewJSON>\r\n <sd-textarea [(model)]=\"jsonString\"></sd-textarea>\r\n <ng-container sdFooter>\r\n <sd-button type=\"fill\" title=\"L\u01B0u\" (click)=\"updateJSON()\" prefixIcon=\"save\" color=\"primary\"></sd-button>\r\n </ng-container>\r\n</sd-modal>\r\n<sd-modal title=\"C\u1EA5u h\u00ECnh bi\u1EBFn\" view=\"dialog\" width=\"800px\" #popupConfigureVariables>\r\n @for (variable of clonedVariables; track variable.id) {\r\n <div class=\"d-flex align-items-center\" style=\"gap: 8px\">\r\n <sd-input [form]=\"form\" label=\"Tr\u01B0\u1EDDng d\u1EEF li\u1EC7u\" [(model)]=\"variable.key\" required></sd-input>\r\n <sd-input [form]=\"form\" label=\"Nh\u00E3n hi\u1EC3n th\u1ECB\" [(model)]=\"variable.label\" required></sd-input>\r\n <sd-button prefixIcon=\"delete\" (click)=\"removeVariables(variable.id)\" color=\"error\"></sd-button>\r\n </div>\r\n }\r\n <a href=\"javascript:;\" (click)=\"addVariables()\">Th\u00EAm bi\u1EBFn</a>\r\n <ng-container sdFooter>\r\n <sd-button type=\"fill\" title=\"L\u01B0u\" (click)=\"updateVariables()\" prefixIcon=\"save\" color=\"primary\"></sd-button>\r\n </ng-container>\r\n</sd-modal>\r\n<configure-validation (accept)=\"onUpdateValidations($event)\"></configure-validation>\r\n", styles: [":host::ng-deep .svg{width:40px}:host::ng-deep .mat-form-field.sd-sm.mat-form-field-appearance-outline .mat-form-field-infix input.mat-input-element{margin-top:7px!important}::ng-deep .component-item.cdk-drag-preview .c-component-item{display:none}::ng-deep .component-item.cdk-drag-dragging,::ng-deep .row-item.cdk-drag-dragging{box-shadow:0 4px 8px #0003;border:2px #0e7cfa dashed}::ng-deep .row-item.cdk-drag-preview .c-row-item,::ng-deep .row-item.cdk-drag-preview .btn-drag-row-item{display:none}::ng-deep .form-item.cdk-drag-preview{text-align:center}::ng-deep .form-item.cdk-drag-preview .c-form-item{text-align:center}::ng-deep .form-item.cdk-drag-preview .c-form-item .svg{width:40px}.form-editor{width:100%;height:100%}.form-editor .material-icons{color:#5f6368!important}.form-editor .material-icons:hover{color:#2626b4!important;cursor:pointer!important}.form-editor .c-header{font-weight:500;padding:5px 10px;background-color:#ebebeb;border-bottom:1px solid #d3d3d3;text-transform:uppercase}.form-editor .c-header:last-child{border-right:0!important}.form-editor .c-header a{font-size:12px}.form-editor .form-menu{width:120px}.form-editor .form-menu .component-container{overflow-y:hidden;background:#f6f8fc}.form-editor .form-menu .component-container:hover{overflow-y:auto!important}.form-editor .form-menu .form-editor-group{padding:5px 10px;display:flex;align-items:center;flex-wrap:wrap}.form-editor .form-menu .form-editor-group .form-item{height:68px;display:flex;align-items:center;justify-content:center;font-size:11px;-webkit-user-select:none;user-select:none;color:#333;background:#fff;border:1px solid transparent;width:100px;margin:6px}.form-editor .form-menu .form-editor-group .form-item:hover{background-color:#e7e7e7;border-color:#878b8f;cursor:pointer}.form-editor .form-menu .form-editor-group .form-item .c-form-item{text-align:center}.form-editor .form-menu .form-editor-group .form-item .c-form-item>div.title,.form-editor .form-menu .form-editor-group .form-item .c-form-item>span{text-align:center;white-space:nowrap;font-weight:500}.form-editor .form-content{flex:1;border-right:1px solid #d3d3d3;border-left:1px solid #d3d3d3}.form-editor .form-content .components{background:#fff}.form-editor .form-content .components .row-item{position:relative;transition:transform .2s ease,box-shadow .2s ease;cursor:grab}.form-editor .form-content .components .row-item:hover{outline:1px dashed #bbb;border-radius:8px}.form-editor .form-content .components .row-item:hover .btn-drag-row-item{display:grid}.form-editor .form-content .components .row-item .btn-drag-row-item{display:none;position:absolute;top:0;left:-12px;height:100%;z-index:2;place-items:center;cursor:grab}.form-editor .form-content .components .row-item .btn-drag-row-item mat-icon{font-size:24px;height:24px;width:24px;box-shadow:0 1px 2px #0000001a;background:#fff}.form-editor .form-content .components .component-item{padding:4px 8px;border:2px dashed transparent;position:relative;min-height:28px;cursor:grab;transition:transform .2s ease,box-shadow .2s ease;display:inline-block;margin:4px;border-radius:8px;vertical-align:bottom}.form-editor .form-content .components .component-item:active{cursor:grabbing;box-shadow:0 4px 8px #0003}.form-editor .form-content .components .component-item:hover{border:2px #0e7cfa dashed}.form-editor .form-content .components .component-item:hover .c-actions{display:flex;flex-direction:row;gap:4px}.form-editor .form-content .components .component-item:hover .c-bar-resize-right{display:block;cursor:w-resize}.form-editor .form-content .components .component-item:hover .c-bar-resize-right.disabled{display:none}.form-editor .form-content .components .component-item .c-component-item{overflow:hidden}.form-editor .form-content .components .component-item .c-actions{display:none;position:absolute;right:4px;z-index:2}.form-editor .form-content .components .component-item .c-bar-resize-right{display:none;width:8px;height:80%;position:absolute;top:10%;right:-5px;outline:2px #0e7cfa solid;border-radius:4px;color:#fff;background:#fff;z-index:2}.form-editor .form-content .components .component-item .c-item-backdrop{position:absolute;width:100%;height:100%;top:0;left:0;z-index:1}.form-editor .form-content .components .active{border:2px #0e7cfa solid;outline:1px #0e7cfa solid}.form-editor .form-content .components .column-2{width:calc(16.6666666667% - 8px)}.form-editor .form-content .components .column-3{width:calc(25% - 8px)}.form-editor .form-content .components .column-4{width:calc(33.3333333333% - 8px)}.form-editor .form-content .components .column-5{width:calc(41.6666666667% - 8px)}.form-editor .form-content .components .column-6{width:calc(50% - 8px)}.form-editor .form-content .components .column-7{width:calc(58.3333333333% - 8px)}.form-editor .form-content .components .column-8{width:calc(66.6666666667% - 8px)}.form-editor .form-content .components .column-9{width:calc(75% - 8px)}.form-editor .form-content .components .column-10{width:calc(83.3333333333% - 8px)}.form-editor .form-content .components .column-11{width:calc(91.6666666667% - 8px)}.form-editor .form-content .components .column-12{width:calc(100% - 8px)}.form-editor .form-attributes{width:300px}.form-editor .form-attributes .attributes{overflow-y:auto!important;padding:0 10px;background:#f6f8fc}.form-editor .form-attributes .attributes .group-attribute .title-group{font-weight:500;padding:5px 0;position:relative;cursor:pointer;margin-top:8px}.form-editor .form-attributes .attributes .group-attribute .title-group span{vertical-align:middle;display:inline-block}.form-editor .form-attributes .attributes .group-attribute .title-group mat-icon{vertical-align:middle;position:absolute;right:0}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute{display:grid;margin-bottom:10px}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute label{font-size:12px;font-weight:400;margin:0}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute input,.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute select,.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute textarea{border:1px solid #d3d3d3;height:30px}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute .select-options{padding:5px 0;border-bottom:1px solid #d3d3d3}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute .select-options input{width:100%;margin-bottom:5px}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute .select-options .material-icons{padding-top:22px}.preview-container{margin:0 -24px;position:relative}.preview-container .header-preview{border-bottom:1px solid #eee;padding:10px;font-size:14px;font-weight:500;position:sticky;top:0;background-color:#fff;z-index:9999}.preview-container .header-preview .material-icons:hover{color:#5f6368;cursor:pointer}.preview-container .content{padding:10px}.c-hidden{opacity:.5}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i5.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i5.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "pipe", type:
|
|
6145
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdFormBuilder, isStandalone: true, selector: "sd-form-builder", inputs: { _formGeneric: ["formGeneric", "_formGeneric"] }, viewQueries: [{ propertyName: "popupViewJSON", first: true, predicate: ["popupViewJSON"], descendants: true }, { propertyName: "popupConfigureVariables", first: true, predicate: ["popupConfigureVariables"], descendants: true }, { propertyName: "configureValidation", first: true, predicate: ConfigureValidationComponent, descendants: true }, { propertyName: "formRender", first: true, predicate: SdFormRender, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"d-flex form-editor\">\r\n <div class=\"d-flex flex-column form-menu\">\r\n <div class=\"c-header\">Components</div>\r\n <div class=\"component-container\" style=\"flex: 1\">\r\n <div class=\"form-editor-group\" cdkDropList [cdkDropListData]=\"formBuilderComponents\" [cdkDropListEnterPredicate]=\"noReturnPredicate\">\r\n @for (formBuilderComponent of formBuilderComponents; track formBuilderComponent.type) {\r\n <div cdkDrag class=\"form-item\" (click)=\"addComponent(formBuilderComponent)\" aria-hidden=\"true\">\r\n <div class=\"c-form-item\">\r\n <span [innerHtml]=\"formBuilderComponent.icon | sdSafeHtml\"></span>\r\n <div class=\"title\">\r\n {{ formBuilderComponent.name }}\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"d-flex flex-column form-content\">\r\n <div class=\"c-header d-flex align-items-center justify-content-between\">\r\n <div>{{ 'core.component.form-builder.layout' | sdT }}</div>\r\n <div class=\"d-flex align-items-center\" style=\"gap: 8px\">\r\n <mat-icon matTooltip=\"Xem JSON\" fontIcon=\"code\" (click)=\"viewJSON()\"></mat-icon>\r\n <mat-icon [matTooltip]=\"'core.component.form-builder.config-variable' | sdT\" fontIcon=\"scatter_plot\" (click)=\"configureVariables()\"></mat-icon>\r\n <mat-icon [matTooltip]=\"'core.component.form-builder.config-validation-warning-error' | sdT\" fontIcon=\"error\" (click)=\"openConfigureValidation()\"></mat-icon>\r\n <mat-icon\r\n [matTooltip]=\"isPreview ? ('core.component.form-builder.back-to-design' | sdT) : ('core.component.form-builder.preview' | sdT)\"\r\n [fontIcon]=\"isPreview ? 'stop_circle' : 'play_circle'\"\r\n (click)=\"isPreview = !isPreview\"></mat-icon>\r\n </div>\r\n </div>\r\n <div class=\"p-12 components\" style=\"flex: 1; overflow-y: auto\" id=\"frmComponent\">\r\n @if (isPreview) {\r\n <sd-form-render [configuration]=\"{ components: this.components, validations: this.validations }\"></sd-form-render>\r\n <sd-button title=\"Validate\" (click)=\"onValidate()\"></sd-button>\r\n } @else {\r\n <div\r\n cdkDropList\r\n cdkDropListOrientation=\"vertical\"\r\n [cdkDropListData]=\"dragDropRows\"\r\n class=\"listY\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n (click)=\"clickFormContentEmpty()\"\r\n aria-hidden=\"true\">\r\n @for (row of dragDropRows; track row.rowIndex) {\r\n <div\r\n cdkDrag\r\n (mouseover)=\"onMouseover($event, row)\"\r\n (focus)=\"onFocus($event)\"\r\n id=\"row_{{ row.rowIndex }}\"\r\n class=\"row-item\"\r\n aria-hidden=\"true\">\r\n <div class=\"btn-drag-row-item\"><mat-icon [matTooltip]=\"'core.component.form-builder.drag-vertically' | sdT\">drag_indicator</mat-icon></div>\r\n <div\r\n class=\"c-row-item\"\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n [cdkDropListData]=\"row.items\"\r\n (cdkDropListDropped)=\"drop($event)\">\r\n @for (item of row.items; track item.id; let i = $index) {\r\n <div\r\n cdkDrag\r\n [id]=\"item.id\"\r\n class=\"component-item column-{{ item.layout?.columns || 12 }}\"\r\n [class.active]=\"item.id === selectedComponent?.id\"\r\n (click)=\"selectComponent(item)\"\r\n (clickOutside)=\"onClickedOutside($event)\"\r\n (cdkDragStarted)=\"dragStartComponentItem($event)\"\r\n (cdkDragEnded)=\"dragEndComponentItem($event)\"\r\n aria-hidden=\"true\">\r\n <div class=\"c-component-item\" [class.c-hidden]=\"item.properties?.hidden\">\r\n <div class=\"c-actions\">\r\n @if (item.type !== 'group') {\r\n <mat-icon\r\n [matTooltip]=\"item.properties?.viewed ? ('core.component.form-builder.unset-readonly' | sdT) : ('core.component.form-builder.set-readonly' | sdT)\"\r\n (click)=\"onChangeViewed(item)\"\r\n fontSet=\"material-icons-outlined\"\r\n style=\"font-size: 16px; cursor: pointer\"\r\n [class.text-warning]=\"item.properties?.viewed\">\r\n edit_off\r\n </mat-icon>\r\n }\r\n <mat-icon\r\n [matTooltip]=\"'core.component.form-builder.duplicate' | sdT\"\r\n (click)=\"onDuplicate(item)\"\r\n fontSet=\"material-icons-outlined\"\r\n style=\"font-size: 16px; cursor: pointer\">\r\n content_copy\r\n </mat-icon>\r\n <mat-icon\r\n [matTooltip]=\"item.properties?.hidden ? ('core.component.form-builder.show' | sdT) : ('core.component.form-builder.hide' | sdT)\"\r\n (click)=\"onChangeHidden(item)\"\r\n fontSet=\"material-icons-outlined\"\r\n style=\"font-size: 16px; cursor: pointer\"\r\n [class.text-warning]=\"item.properties?.hidden\">\r\n visibility_off\r\n </mat-icon>\r\n <mat-icon\r\n [matTooltip]=\"'core.component.form-builder.delete' | sdT\"\r\n (click)=\"removeComponent(item.id)\"\r\n fontSet=\"material-icons-outlined\"\r\n style=\"font-size: 16px; cursor: pointer\"\r\n class=\"text-error\">\r\n delete\r\n </mat-icon>\r\n </div>\r\n @if (item.type === 'textfield') {\r\n <textfield-control [component]=\"item\"></textfield-control>\r\n } @else if (item.type === 'textarea') {\r\n <textarea-control [component]=\"item\"></textarea-control>\r\n } @else if (item.type === 'chip-string') {\r\n <chip-string-control [component]=\"item\"></chip-string-control>\r\n } @else if (item.type === 'chip-calendar') {\r\n <chip-calendar-control [component]=\"item\"></chip-calendar-control>\r\n } @else if (item.type === 'number') {\r\n <number-control [component]=\"item\"></number-control>\r\n } @else if (item.type === 'datetime') {\r\n <datetime-control [component]=\"item\"></datetime-control>\r\n } @else if (item.type === 'select') {\r\n <select-control [component]=\"item\"></select-control>\r\n } @else if (item.type === 'radio') {\r\n <radio-control [component]=\"item\"></radio-control>\r\n } @else if (item.type === 'checkbox') {\r\n <checkbox-control [component]=\"item\"></checkbox-control>\r\n } @else if (item.type === 'html') {\r\n <html-control [component]=\"item\" #html></html-control>\r\n } @else if (item.type === 'upload') {\r\n <upload-control [component]=\"item\"></upload-control>\r\n } @else if (item.type === 'table') {\r\n <table-control [component]=\"item\"></table-control>\r\n }\r\n <div class=\"c-item-backdrop\"></div>\r\n </div>\r\n <div cdkDropList cdkDropListOrientation=\"horizontal\">\r\n <div\r\n cdkDrag\r\n (cdkDragMoved)=\"changeSizeControl($event, item, row.items, i)\"\r\n (cdkDragEnded)=\"dragEndChangeSizeControl($event)\"\r\n class=\"c-bar-resize-right\"\r\n [matTooltip]=\"'core.component.form-builder.flex' | sdT\"></div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"d-flex flex-column form-attributes\">\r\n <div class=\"c-header\">{{ 'core.component.form-builder.attribute' | sdT }}</div>\r\n @if (selectedComponent) {\r\n <div class=\"attributes\" style=\"flex: 1\" aria-hidden=\"true\">\r\n @if (selectedComponent.type === 'textfield') {\r\n <textfield-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></textfield-attribute>\r\n } @else if (selectedComponent.type === 'textarea') {\r\n <textarea-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></textarea-attribute>\r\n } @else if (selectedComponent.type === 'chip-string') {\r\n <chip-string-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></chip-string-attribute>\r\n } @else if (selectedComponent.type === 'chip-calendar') {\r\n <chip-calendar-attribute\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [component]=\"selectedComponent\"></chip-calendar-attribute>\r\n } @else if (selectedComponent.type === 'number') {\r\n <number-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></number-attribute>\r\n } @else if (selectedComponent.type === 'datetime') {\r\n <datetime-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></datetime-attribute>\r\n } @else if (selectedComponent.type === 'select') {\r\n <select-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></select-attribute>\r\n } @else if (selectedComponent.type === 'radio') {\r\n <radio-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></radio-attribute>\r\n } @else if (selectedComponent.type === 'checkbox') {\r\n <checkbox-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></checkbox-attribute>\r\n } @else if (selectedComponent.type === 'html') {\r\n <html-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></html-attribute>\r\n } @else if (selectedComponent.type === 'upload') {\r\n <upload-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></upload-attribute>\r\n } @else if (selectedComponent.type === 'table') {\r\n <table-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></table-attribute>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n<sd-modal title=\"JSON\" view=\"dialog\" width=\"80%\" #popupViewJSON>\r\n <sd-textarea [(model)]=\"jsonString\"></sd-textarea>\r\n <ng-container sdFooter>\r\n <sd-button type=\"fill\" [title]=\"'core.component.form-builder.save' | sdT\" (click)=\"updateJSON()\" prefixIcon=\"save\" color=\"primary\"></sd-button>\r\n </ng-container>\r\n</sd-modal>\r\n<sd-modal [title]=\"'core.component.form-builder.config-variable' | sdT\" view=\"dialog\" width=\"800px\" #popupConfigureVariables>\r\n @for (variable of clonedVariables; track variable.id) {\r\n <div class=\"d-flex align-items-center\" style=\"gap: 8px\">\r\n <sd-input [form]=\"form\" [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"variable.key\" required></sd-input>\r\n <sd-input [form]=\"form\" [label]=\"'core.component.form-builder.display-label' | sdT\" [(model)]=\"variable.label\" required></sd-input>\r\n <sd-button prefixIcon=\"delete\" (click)=\"removeVariables(variable.id)\" color=\"error\"></sd-button>\r\n </div>\r\n }\r\n <a href=\"javascript:;\" (click)=\"addVariables()\">{{ 'core.component.form-builder.add-variable' | sdT }}</a>\r\n <ng-container sdFooter>\r\n <sd-button type=\"fill\" [title]=\"'core.component.form-builder.save' | sdT\" (click)=\"updateVariables()\" prefixIcon=\"save\" color=\"primary\"></sd-button>\r\n </ng-container>\r\n</sd-modal>\r\n<configure-validation (accept)=\"onUpdateValidations($event)\"></configure-validation>\r\n", styles: [":host::ng-deep .svg{width:40px}:host::ng-deep .mat-form-field.sd-sm.mat-form-field-appearance-outline .mat-form-field-infix input.mat-input-element{margin-top:7px!important}::ng-deep .component-item.cdk-drag-preview .c-component-item{display:none}::ng-deep .component-item.cdk-drag-dragging,::ng-deep .row-item.cdk-drag-dragging{box-shadow:0 4px 8px #0003;border:2px #0e7cfa dashed}::ng-deep .row-item.cdk-drag-preview .c-row-item,::ng-deep .row-item.cdk-drag-preview .btn-drag-row-item{display:none}::ng-deep .form-item.cdk-drag-preview{text-align:center}::ng-deep .form-item.cdk-drag-preview .c-form-item{text-align:center}::ng-deep .form-item.cdk-drag-preview .c-form-item .svg{width:40px}.form-editor{width:100%;height:100%}.form-editor .material-icons{color:#5f6368!important}.form-editor .material-icons:hover{color:#2626b4!important;cursor:pointer!important}.form-editor .c-header{font-weight:500;padding:5px 10px;background-color:#ebebeb;border-bottom:1px solid #d3d3d3;text-transform:uppercase}.form-editor .c-header:last-child{border-right:0!important}.form-editor .c-header a{font-size:12px}.form-editor .form-menu{width:120px}.form-editor .form-menu .component-container{overflow-y:hidden;background:#f6f8fc}.form-editor .form-menu .component-container:hover{overflow-y:auto!important}.form-editor .form-menu .form-editor-group{padding:5px 10px;display:flex;align-items:center;flex-wrap:wrap}.form-editor .form-menu .form-editor-group .form-item{height:68px;display:flex;align-items:center;justify-content:center;font-size:11px;-webkit-user-select:none;user-select:none;color:#333;background:#fff;border:1px solid transparent;width:100px;margin:6px}.form-editor .form-menu .form-editor-group .form-item:hover{background-color:#e7e7e7;border-color:#878b8f;cursor:pointer}.form-editor .form-menu .form-editor-group .form-item .c-form-item{text-align:center}.form-editor .form-menu .form-editor-group .form-item .c-form-item>div.title,.form-editor .form-menu .form-editor-group .form-item .c-form-item>span{text-align:center;white-space:nowrap;font-weight:500}.form-editor .form-content{flex:1;border-right:1px solid #d3d3d3;border-left:1px solid #d3d3d3}.form-editor .form-content .components{background:#fff}.form-editor .form-content .components .row-item{position:relative;transition:transform .2s ease,box-shadow .2s ease;cursor:grab}.form-editor .form-content .components .row-item:hover{outline:1px dashed #bbb;border-radius:8px}.form-editor .form-content .components .row-item:hover .btn-drag-row-item{display:grid}.form-editor .form-content .components .row-item .btn-drag-row-item{display:none;position:absolute;top:0;left:-12px;height:100%;z-index:2;place-items:center;cursor:grab}.form-editor .form-content .components .row-item .btn-drag-row-item mat-icon{font-size:24px;height:24px;width:24px;box-shadow:0 1px 2px #0000001a;background:#fff}.form-editor .form-content .components .component-item{padding:4px 8px;border:2px dashed transparent;position:relative;min-height:28px;cursor:grab;transition:transform .2s ease,box-shadow .2s ease;display:inline-block;margin:4px;border-radius:8px;vertical-align:bottom}.form-editor .form-content .components .component-item:active{cursor:grabbing;box-shadow:0 4px 8px #0003}.form-editor .form-content .components .component-item:hover{border:2px #0e7cfa dashed}.form-editor .form-content .components .component-item:hover .c-actions{display:flex;flex-direction:row;gap:4px}.form-editor .form-content .components .component-item:hover .c-bar-resize-right{display:block;cursor:w-resize}.form-editor .form-content .components .component-item:hover .c-bar-resize-right.disabled{display:none}.form-editor .form-content .components .component-item .c-component-item{overflow:hidden}.form-editor .form-content .components .component-item .c-actions{display:none;position:absolute;right:4px;z-index:2}.form-editor .form-content .components .component-item .c-bar-resize-right{display:none;width:8px;height:80%;position:absolute;top:10%;right:-5px;outline:2px #0e7cfa solid;border-radius:4px;color:#fff;background:#fff;z-index:2}.form-editor .form-content .components .component-item .c-item-backdrop{position:absolute;width:100%;height:100%;top:0;left:0;z-index:1}.form-editor .form-content .components .active{border:2px #0e7cfa solid;outline:1px #0e7cfa solid}.form-editor .form-content .components .column-2{width:calc(16.6666666667% - 8px)}.form-editor .form-content .components .column-3{width:calc(25% - 8px)}.form-editor .form-content .components .column-4{width:calc(33.3333333333% - 8px)}.form-editor .form-content .components .column-5{width:calc(41.6666666667% - 8px)}.form-editor .form-content .components .column-6{width:calc(50% - 8px)}.form-editor .form-content .components .column-7{width:calc(58.3333333333% - 8px)}.form-editor .form-content .components .column-8{width:calc(66.6666666667% - 8px)}.form-editor .form-content .components .column-9{width:calc(75% - 8px)}.form-editor .form-content .components .column-10{width:calc(83.3333333333% - 8px)}.form-editor .form-content .components .column-11{width:calc(91.6666666667% - 8px)}.form-editor .form-content .components .column-12{width:calc(100% - 8px)}.form-editor .form-attributes{width:300px}.form-editor .form-attributes .attributes{overflow-y:auto!important;padding:0 10px;background:#f6f8fc}.form-editor .form-attributes .attributes .group-attribute .title-group{font-weight:500;padding:5px 0;position:relative;cursor:pointer;margin-top:8px}.form-editor .form-attributes .attributes .group-attribute .title-group span{vertical-align:middle;display:inline-block}.form-editor .form-attributes .attributes .group-attribute .title-group mat-icon{vertical-align:middle;position:absolute;right:0}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute{display:grid;margin-bottom:10px}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute label{font-size:12px;font-weight:400;margin:0}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute input,.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute select,.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute textarea{border:1px solid #d3d3d3;height:30px}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute .select-options{padding:5px 0;border-bottom:1px solid #d3d3d3}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute .select-options input{width:100%;margin-bottom:5px}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute .select-options .material-icons{padding-top:22px}.preview-container{margin:0 -24px;position:relative}.preview-container .header-preview{border-bottom:1px solid #eee;padding:10px;font-size:14px;font-weight:500;position:sticky;top:0;background-color:#fff;z-index:9999}.preview-container .header-preview .material-icons:hover{color:#5f6368;cursor:pointer}.preview-container .content{padding:10px}.c-hidden{opacity:.5}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i5.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i5.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "pipe", type:
|
|
6139
6146
|
// Core Pipes
|
|
6140
6147
|
SdSafeHtmlPipe, name: "sdSafeHtml" }, { kind: "component", type:
|
|
6141
6148
|
// Controls
|
|
6142
|
-
TextFieldControl, selector: "textfield-control", inputs: ["component"] }, { kind: "component", type: TextfieldAttribute, selector: "textfield-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: TextareaControl, selector: "textarea-control", inputs: ["component"] }, { kind: "component", type: TextareaAttribute, selector: "textarea-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: ChipStringControl, selector: "chip-string-control", inputs: ["component"] }, { kind: "component", type: ChipStringAttribute, selector: "chip-string-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: ChipCalendarControl, selector: "chip-calendar-control", inputs: ["component"] }, { kind: "component", type: ChipCalendarAttribute, selector: "chip-calendar-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: NumberControl, selector: "number-control", inputs: ["component"] }, { kind: "component", type: NumberAttribute, selector: "number-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: SelectControl, selector: "select-control", inputs: ["component"] }, { kind: "component", type: SelectAttribute, selector: "select-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: DatetimeControl, selector: "datetime-control", inputs: ["component"] }, { kind: "component", type: DatetimeAttribute, selector: "datetime-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: RadioControl, selector: "radio-control", inputs: ["component"] }, { kind: "component", type: RadioAttribute, selector: "radio-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: CheckboxControl, selector: "checkbox-control", inputs: ["component"] }, { kind: "component", type: CheckboxAttribute, selector: "checkbox-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: HtmlControl, selector: "html-control", inputs: ["component"] }, { kind: "component", type: HtmlAttribute, selector: "html-attribute", inputs: ["components", "variables", "component"], outputs: ["attributeChanges"] }, { kind: "component", type: UploadControl, selector: "upload-control", inputs: ["component"] }, { kind: "component", type: UploadAttribute, selector: "upload-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: TableControl, selector: "table-control", inputs: ["component"] }, { kind: "component", type: TableAttribute, selector: "table-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose"], outputs: ["sdClosed"] }, { kind: "component", type: SdInput$1, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "tooltip", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "sdFocusForceBlur"] }, { kind: "component", type: SdTextarea, selector: "sd-textarea", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "rows", "hideInlineError", "required", "disabled", "viewed", "autoHeight", "maxlength", "pattern", "validator", "inlineError", "appearance", "floatLabel", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdFormRender, selector: "sd-form-render", inputs: ["form", "configuration", "defaultEntity", "entity", "properties", "viewed"] }, { kind: "component", type: ConfigureValidationComponent, selector: "configure-validation", outputs: ["accept"] }] });
|
|
6149
|
+
TextFieldControl, selector: "textfield-control", inputs: ["component"] }, { kind: "component", type: TextfieldAttribute, selector: "textfield-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: TextareaControl, selector: "textarea-control", inputs: ["component"] }, { kind: "component", type: TextareaAttribute, selector: "textarea-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: ChipStringControl, selector: "chip-string-control", inputs: ["component"] }, { kind: "component", type: ChipStringAttribute, selector: "chip-string-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: ChipCalendarControl, selector: "chip-calendar-control", inputs: ["component"] }, { kind: "component", type: ChipCalendarAttribute, selector: "chip-calendar-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: NumberControl, selector: "number-control", inputs: ["component"] }, { kind: "component", type: NumberAttribute, selector: "number-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: SelectControl, selector: "select-control", inputs: ["component"] }, { kind: "component", type: SelectAttribute, selector: "select-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: DatetimeControl, selector: "datetime-control", inputs: ["component"] }, { kind: "component", type: DatetimeAttribute, selector: "datetime-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: RadioControl, selector: "radio-control", inputs: ["component"] }, { kind: "component", type: RadioAttribute, selector: "radio-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: CheckboxControl, selector: "checkbox-control", inputs: ["component"] }, { kind: "component", type: CheckboxAttribute, selector: "checkbox-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: HtmlControl, selector: "html-control", inputs: ["component"] }, { kind: "component", type: HtmlAttribute, selector: "html-attribute", inputs: ["components", "variables", "component"], outputs: ["attributeChanges"] }, { kind: "component", type: UploadControl, selector: "upload-control", inputs: ["component"] }, { kind: "component", type: UploadAttribute, selector: "upload-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: TableControl, selector: "table-control", inputs: ["component"] }, { kind: "component", type: TableAttribute, selector: "table-attribute", inputs: ["components", "variables", "component"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose"], outputs: ["sdClosed"] }, { kind: "component", type: SdInput$1, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "tooltip", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "sdFocusForceBlur"] }, { kind: "component", type: SdTextarea, selector: "sd-textarea", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "rows", "hideInlineError", "required", "disabled", "viewed", "autoHeight", "maxlength", "pattern", "validator", "inlineError", "appearance", "floatLabel", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdFormRender, selector: "sd-form-render", inputs: ["form", "configuration", "defaultEntity", "entity", "properties", "viewed"] }, { kind: "component", type: ConfigureValidationComponent, selector: "configure-validation", outputs: ["accept"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }] });
|
|
6143
6150
|
}
|
|
6144
6151
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdFormBuilder, decorators: [{
|
|
6145
6152
|
type: Component,
|
|
@@ -6180,8 +6187,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
6180
6187
|
SdTextarea,
|
|
6181
6188
|
SdButton,
|
|
6182
6189
|
SdFormRender,
|
|
6183
|
-
ConfigureValidationComponent,
|
|
6184
|
-
], template: "<div class=\"d-flex form-editor\">\r\n <div class=\"d-flex flex-column form-menu\">\r\n <div class=\"c-header\">Components</div>\r\n <div class=\"component-container\" style=\"flex: 1\">\r\n <div class=\"form-editor-group\" cdkDropList [cdkDropListData]=\"formBuilderComponents\" [cdkDropListEnterPredicate]=\"noReturnPredicate\">\r\n @for (formBuilderComponent of formBuilderComponents; track formBuilderComponent.type) {\r\n <div cdkDrag class=\"form-item\" (click)=\"addComponent(formBuilderComponent)\" aria-hidden=\"true\">\r\n <div class=\"c-form-item\">\r\n <span [innerHtml]=\"formBuilderComponent.icon | sdSafeHtml\"></span>\r\n <div class=\"title\">\r\n {{ formBuilderComponent.name }}\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"d-flex flex-column form-content\">\r\n <div class=\"c-header d-flex align-items-center justify-content-between\">\r\n <div>B\u1ED1 c\u1EE5c</div>\r\n <div class=\"d-flex align-items-center\" style=\"gap: 8px\">\r\n <mat-icon matTooltip=\"Xem JSON\" fontIcon=\"code\" (click)=\"viewJSON()\"></mat-icon>\r\n <mat-icon matTooltip=\"C\u1EA5u h\u00ECnh bi\u1EBFn\" fontIcon=\"scatter_plot\" (click)=\"configureVariables()\"></mat-icon>\r\n <mat-icon matTooltip=\"C\u1EA5u h\u00ECnh x\u00E1c th\u1EF1c c\u1EA3nh b\u00E1o/l\u1ED7i\" fontIcon=\"error\" (click)=\"openConfigureValidation()\"></mat-icon>\r\n <mat-icon\r\n [matTooltip]=\"isPreview ? 'Tr\u1EDF v\u1EC1 thi\u1EBFt k\u1EBF' : 'Xem th\u1EED'\"\r\n [fontIcon]=\"isPreview ? 'stop_circle' : 'play_circle'\"\r\n (click)=\"isPreview = !isPreview\"></mat-icon>\r\n </div>\r\n </div>\r\n <div class=\"p-12 components\" style=\"flex: 1; overflow-y: auto\" id=\"frmComponent\">\r\n @if (isPreview) {\r\n <sd-form-render [configuration]=\"{ components: this.components, validations: this.validations }\"></sd-form-render>\r\n <sd-button title=\"Validate\" (click)=\"onValidate()\"></sd-button>\r\n } @else {\r\n <div\r\n cdkDropList\r\n cdkDropListOrientation=\"vertical\"\r\n [cdkDropListData]=\"dragDropRows\"\r\n class=\"listY\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n (click)=\"clickFormContentEmpty()\"\r\n aria-hidden=\"true\">\r\n @for (row of dragDropRows; track row.rowIndex) {\r\n <div\r\n cdkDrag\r\n (mouseover)=\"onMouseover($event, row)\"\r\n (focus)=\"onFocus($event)\"\r\n id=\"row_{{ row.rowIndex }}\"\r\n class=\"row-item\"\r\n aria-hidden=\"true\">\r\n <div class=\"btn-drag-row-item\"><mat-icon matTooltip=\"K\u00E9o l\u00EAn / xu\u1ED1ng\">drag_indicator</mat-icon></div>\r\n <div\r\n class=\"c-row-item\"\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n [cdkDropListData]=\"row.items\"\r\n (cdkDropListDropped)=\"drop($event)\">\r\n @for (item of row.items; track item.id; let i = $index) {\r\n <div\r\n cdkDrag\r\n [id]=\"item.id\"\r\n class=\"component-item column-{{ item.layout?.columns || 12 }}\"\r\n [class.active]=\"item.id === selectedComponent?.id\"\r\n (click)=\"selectComponent(item)\"\r\n (clickOutside)=\"onClickedOutside($event)\"\r\n (cdkDragStarted)=\"dragStartComponentItem($event)\"\r\n (cdkDragEnded)=\"dragEndComponentItem($event)\"\r\n aria-hidden=\"true\">\r\n <div class=\"c-component-item\" [class.c-hidden]=\"item.properties?.hidden\">\r\n <div class=\"c-actions\">\r\n @if (item.type !== 'group') {\r\n <mat-icon\r\n [matTooltip]=\"item.properties?.viewed ? 'B\u1ECF ch\u1EC9 xem' : 'Ch\u1EC9 xem'\"\r\n (click)=\"onChangeViewed(item)\"\r\n fontSet=\"material-icons-outlined\"\r\n style=\"font-size: 16px; cursor: pointer\"\r\n [class.text-warning]=\"item.properties?.viewed\">\r\n edit_off\r\n </mat-icon>\r\n }\r\n <mat-icon\r\n matTooltip=\"Nh\u00E2n b\u1EA3n\"\r\n (click)=\"onDuplicate(item)\"\r\n fontSet=\"material-icons-outlined\"\r\n style=\"font-size: 16px; cursor: pointer\">\r\n content_copy\r\n </mat-icon>\r\n <mat-icon\r\n [matTooltip]=\"item.properties?.hidden ? 'Hi\u1EC7n' : '\u1EA8n'\"\r\n (click)=\"onChangeHidden(item)\"\r\n fontSet=\"material-icons-outlined\"\r\n style=\"font-size: 16px; cursor: pointer\"\r\n [class.text-warning]=\"item.properties?.hidden\">\r\n visibility_off\r\n </mat-icon>\r\n <mat-icon\r\n matTooltip=\"X\u00F3a\"\r\n (click)=\"removeComponent(item.id)\"\r\n fontSet=\"material-icons-outlined\"\r\n style=\"font-size: 16px; cursor: pointer\"\r\n class=\"text-error\">\r\n delete\r\n </mat-icon>\r\n </div>\r\n @if (item.type === 'textfield') {\r\n <textfield-control [component]=\"item\"></textfield-control>\r\n } @else if (item.type === 'textarea') {\r\n <textarea-control [component]=\"item\"></textarea-control>\r\n } @else if (item.type === 'chip-string') {\r\n <chip-string-control [component]=\"item\"></chip-string-control>\r\n } @else if (item.type === 'chip-calendar') {\r\n <chip-calendar-control [component]=\"item\"></chip-calendar-control>\r\n } @else if (item.type === 'number') {\r\n <number-control [component]=\"item\"></number-control>\r\n } @else if (item.type === 'datetime') {\r\n <datetime-control [component]=\"item\"></datetime-control>\r\n } @else if (item.type === 'select') {\r\n <select-control [component]=\"item\"></select-control>\r\n } @else if (item.type === 'radio') {\r\n <radio-control [component]=\"item\"></radio-control>\r\n } @else if (item.type === 'checkbox') {\r\n <checkbox-control [component]=\"item\"></checkbox-control>\r\n } @else if (item.type === 'html') {\r\n <html-control [component]=\"item\" #html></html-control>\r\n } @else if (item.type === 'upload') {\r\n <upload-control [component]=\"item\"></upload-control>\r\n } @else if (item.type === 'table') {\r\n <table-control [component]=\"item\"></table-control>\r\n }\r\n <div class=\"c-item-backdrop\"></div>\r\n </div>\r\n <div cdkDropList cdkDropListOrientation=\"horizontal\">\r\n <div\r\n cdkDrag\r\n (cdkDragMoved)=\"changeSizeControl($event, item, row.items, i)\"\r\n (cdkDragEnded)=\"dragEndChangeSizeControl($event)\"\r\n class=\"c-bar-resize-right\"\r\n matTooltip=\"Co d\u00E3n\"></div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"d-flex flex-column form-attributes\">\r\n <div class=\"c-header\">Thu\u1ED9c t\u00EDnh</div>\r\n @if (selectedComponent) {\r\n <div class=\"attributes\" style=\"flex: 1\" aria-hidden=\"true\">\r\n @if (selectedComponent.type === 'textfield') {\r\n <textfield-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></textfield-attribute>\r\n } @else if (selectedComponent.type === 'textarea') {\r\n <textarea-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></textarea-attribute>\r\n } @else if (selectedComponent.type === 'chip-string') {\r\n <chip-string-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></chip-string-attribute>\r\n } @else if (selectedComponent.type === 'chip-calendar') {\r\n <chip-calendar-attribute\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [component]=\"selectedComponent\"></chip-calendar-attribute>\r\n } @else if (selectedComponent.type === 'number') {\r\n <number-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></number-attribute>\r\n } @else if (selectedComponent.type === 'datetime') {\r\n <datetime-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></datetime-attribute>\r\n } @else if (selectedComponent.type === 'select') {\r\n <select-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></select-attribute>\r\n } @else if (selectedComponent.type === 'radio') {\r\n <radio-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></radio-attribute>\r\n } @else if (selectedComponent.type === 'checkbox') {\r\n <checkbox-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></checkbox-attribute>\r\n } @else if (selectedComponent.type === 'html') {\r\n <html-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></html-attribute>\r\n } @else if (selectedComponent.type === 'upload') {\r\n <upload-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></upload-attribute>\r\n } @else if (selectedComponent.type === 'table') {\r\n <table-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></table-attribute>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n<sd-modal title=\"JSON\" view=\"dialog\" width=\"80%\" #popupViewJSON>\r\n <sd-textarea [(model)]=\"jsonString\"></sd-textarea>\r\n <ng-container sdFooter>\r\n <sd-button type=\"fill\" title=\"L\u01B0u\" (click)=\"updateJSON()\" prefixIcon=\"save\" color=\"primary\"></sd-button>\r\n </ng-container>\r\n</sd-modal>\r\n<sd-modal title=\"C\u1EA5u h\u00ECnh bi\u1EBFn\" view=\"dialog\" width=\"800px\" #popupConfigureVariables>\r\n @for (variable of clonedVariables; track variable.id) {\r\n <div class=\"d-flex align-items-center\" style=\"gap: 8px\">\r\n <sd-input [form]=\"form\" label=\"Tr\u01B0\u1EDDng d\u1EEF li\u1EC7u\" [(model)]=\"variable.key\" required></sd-input>\r\n <sd-input [form]=\"form\" label=\"Nh\u00E3n hi\u1EC3n th\u1ECB\" [(model)]=\"variable.label\" required></sd-input>\r\n <sd-button prefixIcon=\"delete\" (click)=\"removeVariables(variable.id)\" color=\"error\"></sd-button>\r\n </div>\r\n }\r\n <a href=\"javascript:;\" (click)=\"addVariables()\">Th\u00EAm bi\u1EBFn</a>\r\n <ng-container sdFooter>\r\n <sd-button type=\"fill\" title=\"L\u01B0u\" (click)=\"updateVariables()\" prefixIcon=\"save\" color=\"primary\"></sd-button>\r\n </ng-container>\r\n</sd-modal>\r\n<configure-validation (accept)=\"onUpdateValidations($event)\"></configure-validation>\r\n", styles: [":host::ng-deep .svg{width:40px}:host::ng-deep .mat-form-field.sd-sm.mat-form-field-appearance-outline .mat-form-field-infix input.mat-input-element{margin-top:7px!important}::ng-deep .component-item.cdk-drag-preview .c-component-item{display:none}::ng-deep .component-item.cdk-drag-dragging,::ng-deep .row-item.cdk-drag-dragging{box-shadow:0 4px 8px #0003;border:2px #0e7cfa dashed}::ng-deep .row-item.cdk-drag-preview .c-row-item,::ng-deep .row-item.cdk-drag-preview .btn-drag-row-item{display:none}::ng-deep .form-item.cdk-drag-preview{text-align:center}::ng-deep .form-item.cdk-drag-preview .c-form-item{text-align:center}::ng-deep .form-item.cdk-drag-preview .c-form-item .svg{width:40px}.form-editor{width:100%;height:100%}.form-editor .material-icons{color:#5f6368!important}.form-editor .material-icons:hover{color:#2626b4!important;cursor:pointer!important}.form-editor .c-header{font-weight:500;padding:5px 10px;background-color:#ebebeb;border-bottom:1px solid #d3d3d3;text-transform:uppercase}.form-editor .c-header:last-child{border-right:0!important}.form-editor .c-header a{font-size:12px}.form-editor .form-menu{width:120px}.form-editor .form-menu .component-container{overflow-y:hidden;background:#f6f8fc}.form-editor .form-menu .component-container:hover{overflow-y:auto!important}.form-editor .form-menu .form-editor-group{padding:5px 10px;display:flex;align-items:center;flex-wrap:wrap}.form-editor .form-menu .form-editor-group .form-item{height:68px;display:flex;align-items:center;justify-content:center;font-size:11px;-webkit-user-select:none;user-select:none;color:#333;background:#fff;border:1px solid transparent;width:100px;margin:6px}.form-editor .form-menu .form-editor-group .form-item:hover{background-color:#e7e7e7;border-color:#878b8f;cursor:pointer}.form-editor .form-menu .form-editor-group .form-item .c-form-item{text-align:center}.form-editor .form-menu .form-editor-group .form-item .c-form-item>div.title,.form-editor .form-menu .form-editor-group .form-item .c-form-item>span{text-align:center;white-space:nowrap;font-weight:500}.form-editor .form-content{flex:1;border-right:1px solid #d3d3d3;border-left:1px solid #d3d3d3}.form-editor .form-content .components{background:#fff}.form-editor .form-content .components .row-item{position:relative;transition:transform .2s ease,box-shadow .2s ease;cursor:grab}.form-editor .form-content .components .row-item:hover{outline:1px dashed #bbb;border-radius:8px}.form-editor .form-content .components .row-item:hover .btn-drag-row-item{display:grid}.form-editor .form-content .components .row-item .btn-drag-row-item{display:none;position:absolute;top:0;left:-12px;height:100%;z-index:2;place-items:center;cursor:grab}.form-editor .form-content .components .row-item .btn-drag-row-item mat-icon{font-size:24px;height:24px;width:24px;box-shadow:0 1px 2px #0000001a;background:#fff}.form-editor .form-content .components .component-item{padding:4px 8px;border:2px dashed transparent;position:relative;min-height:28px;cursor:grab;transition:transform .2s ease,box-shadow .2s ease;display:inline-block;margin:4px;border-radius:8px;vertical-align:bottom}.form-editor .form-content .components .component-item:active{cursor:grabbing;box-shadow:0 4px 8px #0003}.form-editor .form-content .components .component-item:hover{border:2px #0e7cfa dashed}.form-editor .form-content .components .component-item:hover .c-actions{display:flex;flex-direction:row;gap:4px}.form-editor .form-content .components .component-item:hover .c-bar-resize-right{display:block;cursor:w-resize}.form-editor .form-content .components .component-item:hover .c-bar-resize-right.disabled{display:none}.form-editor .form-content .components .component-item .c-component-item{overflow:hidden}.form-editor .form-content .components .component-item .c-actions{display:none;position:absolute;right:4px;z-index:2}.form-editor .form-content .components .component-item .c-bar-resize-right{display:none;width:8px;height:80%;position:absolute;top:10%;right:-5px;outline:2px #0e7cfa solid;border-radius:4px;color:#fff;background:#fff;z-index:2}.form-editor .form-content .components .component-item .c-item-backdrop{position:absolute;width:100%;height:100%;top:0;left:0;z-index:1}.form-editor .form-content .components .active{border:2px #0e7cfa solid;outline:1px #0e7cfa solid}.form-editor .form-content .components .column-2{width:calc(16.6666666667% - 8px)}.form-editor .form-content .components .column-3{width:calc(25% - 8px)}.form-editor .form-content .components .column-4{width:calc(33.3333333333% - 8px)}.form-editor .form-content .components .column-5{width:calc(41.6666666667% - 8px)}.form-editor .form-content .components .column-6{width:calc(50% - 8px)}.form-editor .form-content .components .column-7{width:calc(58.3333333333% - 8px)}.form-editor .form-content .components .column-8{width:calc(66.6666666667% - 8px)}.form-editor .form-content .components .column-9{width:calc(75% - 8px)}.form-editor .form-content .components .column-10{width:calc(83.3333333333% - 8px)}.form-editor .form-content .components .column-11{width:calc(91.6666666667% - 8px)}.form-editor .form-content .components .column-12{width:calc(100% - 8px)}.form-editor .form-attributes{width:300px}.form-editor .form-attributes .attributes{overflow-y:auto!important;padding:0 10px;background:#f6f8fc}.form-editor .form-attributes .attributes .group-attribute .title-group{font-weight:500;padding:5px 0;position:relative;cursor:pointer;margin-top:8px}.form-editor .form-attributes .attributes .group-attribute .title-group span{vertical-align:middle;display:inline-block}.form-editor .form-attributes .attributes .group-attribute .title-group mat-icon{vertical-align:middle;position:absolute;right:0}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute{display:grid;margin-bottom:10px}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute label{font-size:12px;font-weight:400;margin:0}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute input,.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute select,.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute textarea{border:1px solid #d3d3d3;height:30px}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute .select-options{padding:5px 0;border-bottom:1px solid #d3d3d3}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute .select-options input{width:100%;margin-bottom:5px}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute .select-options .material-icons{padding-top:22px}.preview-container{margin:0 -24px;position:relative}.preview-container .header-preview{border-bottom:1px solid #eee;padding:10px;font-size:14px;font-weight:500;position:sticky;top:0;background-color:#fff;z-index:9999}.preview-container .header-preview .material-icons:hover{color:#5f6368;cursor:pointer}.preview-container .content{padding:10px}.c-hidden{opacity:.5}\n"] }]
|
|
6190
|
+
ConfigureValidationComponent, SdTPipe
|
|
6191
|
+
], template: "<div class=\"d-flex form-editor\">\r\n <div class=\"d-flex flex-column form-menu\">\r\n <div class=\"c-header\">Components</div>\r\n <div class=\"component-container\" style=\"flex: 1\">\r\n <div class=\"form-editor-group\" cdkDropList [cdkDropListData]=\"formBuilderComponents\" [cdkDropListEnterPredicate]=\"noReturnPredicate\">\r\n @for (formBuilderComponent of formBuilderComponents; track formBuilderComponent.type) {\r\n <div cdkDrag class=\"form-item\" (click)=\"addComponent(formBuilderComponent)\" aria-hidden=\"true\">\r\n <div class=\"c-form-item\">\r\n <span [innerHtml]=\"formBuilderComponent.icon | sdSafeHtml\"></span>\r\n <div class=\"title\">\r\n {{ formBuilderComponent.name }}\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"d-flex flex-column form-content\">\r\n <div class=\"c-header d-flex align-items-center justify-content-between\">\r\n <div>{{ 'core.component.form-builder.layout' | sdT }}</div>\r\n <div class=\"d-flex align-items-center\" style=\"gap: 8px\">\r\n <mat-icon matTooltip=\"Xem JSON\" fontIcon=\"code\" (click)=\"viewJSON()\"></mat-icon>\r\n <mat-icon [matTooltip]=\"'core.component.form-builder.config-variable' | sdT\" fontIcon=\"scatter_plot\" (click)=\"configureVariables()\"></mat-icon>\r\n <mat-icon [matTooltip]=\"'core.component.form-builder.config-validation-warning-error' | sdT\" fontIcon=\"error\" (click)=\"openConfigureValidation()\"></mat-icon>\r\n <mat-icon\r\n [matTooltip]=\"isPreview ? ('core.component.form-builder.back-to-design' | sdT) : ('core.component.form-builder.preview' | sdT)\"\r\n [fontIcon]=\"isPreview ? 'stop_circle' : 'play_circle'\"\r\n (click)=\"isPreview = !isPreview\"></mat-icon>\r\n </div>\r\n </div>\r\n <div class=\"p-12 components\" style=\"flex: 1; overflow-y: auto\" id=\"frmComponent\">\r\n @if (isPreview) {\r\n <sd-form-render [configuration]=\"{ components: this.components, validations: this.validations }\"></sd-form-render>\r\n <sd-button title=\"Validate\" (click)=\"onValidate()\"></sd-button>\r\n } @else {\r\n <div\r\n cdkDropList\r\n cdkDropListOrientation=\"vertical\"\r\n [cdkDropListData]=\"dragDropRows\"\r\n class=\"listY\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n (click)=\"clickFormContentEmpty()\"\r\n aria-hidden=\"true\">\r\n @for (row of dragDropRows; track row.rowIndex) {\r\n <div\r\n cdkDrag\r\n (mouseover)=\"onMouseover($event, row)\"\r\n (focus)=\"onFocus($event)\"\r\n id=\"row_{{ row.rowIndex }}\"\r\n class=\"row-item\"\r\n aria-hidden=\"true\">\r\n <div class=\"btn-drag-row-item\"><mat-icon [matTooltip]=\"'core.component.form-builder.drag-vertically' | sdT\">drag_indicator</mat-icon></div>\r\n <div\r\n class=\"c-row-item\"\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n [cdkDropListData]=\"row.items\"\r\n (cdkDropListDropped)=\"drop($event)\">\r\n @for (item of row.items; track item.id; let i = $index) {\r\n <div\r\n cdkDrag\r\n [id]=\"item.id\"\r\n class=\"component-item column-{{ item.layout?.columns || 12 }}\"\r\n [class.active]=\"item.id === selectedComponent?.id\"\r\n (click)=\"selectComponent(item)\"\r\n (clickOutside)=\"onClickedOutside($event)\"\r\n (cdkDragStarted)=\"dragStartComponentItem($event)\"\r\n (cdkDragEnded)=\"dragEndComponentItem($event)\"\r\n aria-hidden=\"true\">\r\n <div class=\"c-component-item\" [class.c-hidden]=\"item.properties?.hidden\">\r\n <div class=\"c-actions\">\r\n @if (item.type !== 'group') {\r\n <mat-icon\r\n [matTooltip]=\"item.properties?.viewed ? ('core.component.form-builder.unset-readonly' | sdT) : ('core.component.form-builder.set-readonly' | sdT)\"\r\n (click)=\"onChangeViewed(item)\"\r\n fontSet=\"material-icons-outlined\"\r\n style=\"font-size: 16px; cursor: pointer\"\r\n [class.text-warning]=\"item.properties?.viewed\">\r\n edit_off\r\n </mat-icon>\r\n }\r\n <mat-icon\r\n [matTooltip]=\"'core.component.form-builder.duplicate' | sdT\"\r\n (click)=\"onDuplicate(item)\"\r\n fontSet=\"material-icons-outlined\"\r\n style=\"font-size: 16px; cursor: pointer\">\r\n content_copy\r\n </mat-icon>\r\n <mat-icon\r\n [matTooltip]=\"item.properties?.hidden ? ('core.component.form-builder.show' | sdT) : ('core.component.form-builder.hide' | sdT)\"\r\n (click)=\"onChangeHidden(item)\"\r\n fontSet=\"material-icons-outlined\"\r\n style=\"font-size: 16px; cursor: pointer\"\r\n [class.text-warning]=\"item.properties?.hidden\">\r\n visibility_off\r\n </mat-icon>\r\n <mat-icon\r\n [matTooltip]=\"'core.component.form-builder.delete' | sdT\"\r\n (click)=\"removeComponent(item.id)\"\r\n fontSet=\"material-icons-outlined\"\r\n style=\"font-size: 16px; cursor: pointer\"\r\n class=\"text-error\">\r\n delete\r\n </mat-icon>\r\n </div>\r\n @if (item.type === 'textfield') {\r\n <textfield-control [component]=\"item\"></textfield-control>\r\n } @else if (item.type === 'textarea') {\r\n <textarea-control [component]=\"item\"></textarea-control>\r\n } @else if (item.type === 'chip-string') {\r\n <chip-string-control [component]=\"item\"></chip-string-control>\r\n } @else if (item.type === 'chip-calendar') {\r\n <chip-calendar-control [component]=\"item\"></chip-calendar-control>\r\n } @else if (item.type === 'number') {\r\n <number-control [component]=\"item\"></number-control>\r\n } @else if (item.type === 'datetime') {\r\n <datetime-control [component]=\"item\"></datetime-control>\r\n } @else if (item.type === 'select') {\r\n <select-control [component]=\"item\"></select-control>\r\n } @else if (item.type === 'radio') {\r\n <radio-control [component]=\"item\"></radio-control>\r\n } @else if (item.type === 'checkbox') {\r\n <checkbox-control [component]=\"item\"></checkbox-control>\r\n } @else if (item.type === 'html') {\r\n <html-control [component]=\"item\" #html></html-control>\r\n } @else if (item.type === 'upload') {\r\n <upload-control [component]=\"item\"></upload-control>\r\n } @else if (item.type === 'table') {\r\n <table-control [component]=\"item\"></table-control>\r\n }\r\n <div class=\"c-item-backdrop\"></div>\r\n </div>\r\n <div cdkDropList cdkDropListOrientation=\"horizontal\">\r\n <div\r\n cdkDrag\r\n (cdkDragMoved)=\"changeSizeControl($event, item, row.items, i)\"\r\n (cdkDragEnded)=\"dragEndChangeSizeControl($event)\"\r\n class=\"c-bar-resize-right\"\r\n [matTooltip]=\"'core.component.form-builder.flex' | sdT\"></div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"d-flex flex-column form-attributes\">\r\n <div class=\"c-header\">{{ 'core.component.form-builder.attribute' | sdT }}</div>\r\n @if (selectedComponent) {\r\n <div class=\"attributes\" style=\"flex: 1\" aria-hidden=\"true\">\r\n @if (selectedComponent.type === 'textfield') {\r\n <textfield-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></textfield-attribute>\r\n } @else if (selectedComponent.type === 'textarea') {\r\n <textarea-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></textarea-attribute>\r\n } @else if (selectedComponent.type === 'chip-string') {\r\n <chip-string-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></chip-string-attribute>\r\n } @else if (selectedComponent.type === 'chip-calendar') {\r\n <chip-calendar-attribute\r\n [components]=\"components\"\r\n [variables]=\"variables\"\r\n [component]=\"selectedComponent\"></chip-calendar-attribute>\r\n } @else if (selectedComponent.type === 'number') {\r\n <number-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></number-attribute>\r\n } @else if (selectedComponent.type === 'datetime') {\r\n <datetime-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></datetime-attribute>\r\n } @else if (selectedComponent.type === 'select') {\r\n <select-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></select-attribute>\r\n } @else if (selectedComponent.type === 'radio') {\r\n <radio-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></radio-attribute>\r\n } @else if (selectedComponent.type === 'checkbox') {\r\n <checkbox-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></checkbox-attribute>\r\n } @else if (selectedComponent.type === 'html') {\r\n <html-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></html-attribute>\r\n } @else if (selectedComponent.type === 'upload') {\r\n <upload-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></upload-attribute>\r\n } @else if (selectedComponent.type === 'table') {\r\n <table-attribute [components]=\"components\" [variables]=\"variables\" [component]=\"selectedComponent\"></table-attribute>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n<sd-modal title=\"JSON\" view=\"dialog\" width=\"80%\" #popupViewJSON>\r\n <sd-textarea [(model)]=\"jsonString\"></sd-textarea>\r\n <ng-container sdFooter>\r\n <sd-button type=\"fill\" [title]=\"'core.component.form-builder.save' | sdT\" (click)=\"updateJSON()\" prefixIcon=\"save\" color=\"primary\"></sd-button>\r\n </ng-container>\r\n</sd-modal>\r\n<sd-modal [title]=\"'core.component.form-builder.config-variable' | sdT\" view=\"dialog\" width=\"800px\" #popupConfigureVariables>\r\n @for (variable of clonedVariables; track variable.id) {\r\n <div class=\"d-flex align-items-center\" style=\"gap: 8px\">\r\n <sd-input [form]=\"form\" [label]=\"'core.component.form-builder.field-key' | sdT\" [(model)]=\"variable.key\" required></sd-input>\r\n <sd-input [form]=\"form\" [label]=\"'core.component.form-builder.display-label' | sdT\" [(model)]=\"variable.label\" required></sd-input>\r\n <sd-button prefixIcon=\"delete\" (click)=\"removeVariables(variable.id)\" color=\"error\"></sd-button>\r\n </div>\r\n }\r\n <a href=\"javascript:;\" (click)=\"addVariables()\">{{ 'core.component.form-builder.add-variable' | sdT }}</a>\r\n <ng-container sdFooter>\r\n <sd-button type=\"fill\" [title]=\"'core.component.form-builder.save' | sdT\" (click)=\"updateVariables()\" prefixIcon=\"save\" color=\"primary\"></sd-button>\r\n </ng-container>\r\n</sd-modal>\r\n<configure-validation (accept)=\"onUpdateValidations($event)\"></configure-validation>\r\n", styles: [":host::ng-deep .svg{width:40px}:host::ng-deep .mat-form-field.sd-sm.mat-form-field-appearance-outline .mat-form-field-infix input.mat-input-element{margin-top:7px!important}::ng-deep .component-item.cdk-drag-preview .c-component-item{display:none}::ng-deep .component-item.cdk-drag-dragging,::ng-deep .row-item.cdk-drag-dragging{box-shadow:0 4px 8px #0003;border:2px #0e7cfa dashed}::ng-deep .row-item.cdk-drag-preview .c-row-item,::ng-deep .row-item.cdk-drag-preview .btn-drag-row-item{display:none}::ng-deep .form-item.cdk-drag-preview{text-align:center}::ng-deep .form-item.cdk-drag-preview .c-form-item{text-align:center}::ng-deep .form-item.cdk-drag-preview .c-form-item .svg{width:40px}.form-editor{width:100%;height:100%}.form-editor .material-icons{color:#5f6368!important}.form-editor .material-icons:hover{color:#2626b4!important;cursor:pointer!important}.form-editor .c-header{font-weight:500;padding:5px 10px;background-color:#ebebeb;border-bottom:1px solid #d3d3d3;text-transform:uppercase}.form-editor .c-header:last-child{border-right:0!important}.form-editor .c-header a{font-size:12px}.form-editor .form-menu{width:120px}.form-editor .form-menu .component-container{overflow-y:hidden;background:#f6f8fc}.form-editor .form-menu .component-container:hover{overflow-y:auto!important}.form-editor .form-menu .form-editor-group{padding:5px 10px;display:flex;align-items:center;flex-wrap:wrap}.form-editor .form-menu .form-editor-group .form-item{height:68px;display:flex;align-items:center;justify-content:center;font-size:11px;-webkit-user-select:none;user-select:none;color:#333;background:#fff;border:1px solid transparent;width:100px;margin:6px}.form-editor .form-menu .form-editor-group .form-item:hover{background-color:#e7e7e7;border-color:#878b8f;cursor:pointer}.form-editor .form-menu .form-editor-group .form-item .c-form-item{text-align:center}.form-editor .form-menu .form-editor-group .form-item .c-form-item>div.title,.form-editor .form-menu .form-editor-group .form-item .c-form-item>span{text-align:center;white-space:nowrap;font-weight:500}.form-editor .form-content{flex:1;border-right:1px solid #d3d3d3;border-left:1px solid #d3d3d3}.form-editor .form-content .components{background:#fff}.form-editor .form-content .components .row-item{position:relative;transition:transform .2s ease,box-shadow .2s ease;cursor:grab}.form-editor .form-content .components .row-item:hover{outline:1px dashed #bbb;border-radius:8px}.form-editor .form-content .components .row-item:hover .btn-drag-row-item{display:grid}.form-editor .form-content .components .row-item .btn-drag-row-item{display:none;position:absolute;top:0;left:-12px;height:100%;z-index:2;place-items:center;cursor:grab}.form-editor .form-content .components .row-item .btn-drag-row-item mat-icon{font-size:24px;height:24px;width:24px;box-shadow:0 1px 2px #0000001a;background:#fff}.form-editor .form-content .components .component-item{padding:4px 8px;border:2px dashed transparent;position:relative;min-height:28px;cursor:grab;transition:transform .2s ease,box-shadow .2s ease;display:inline-block;margin:4px;border-radius:8px;vertical-align:bottom}.form-editor .form-content .components .component-item:active{cursor:grabbing;box-shadow:0 4px 8px #0003}.form-editor .form-content .components .component-item:hover{border:2px #0e7cfa dashed}.form-editor .form-content .components .component-item:hover .c-actions{display:flex;flex-direction:row;gap:4px}.form-editor .form-content .components .component-item:hover .c-bar-resize-right{display:block;cursor:w-resize}.form-editor .form-content .components .component-item:hover .c-bar-resize-right.disabled{display:none}.form-editor .form-content .components .component-item .c-component-item{overflow:hidden}.form-editor .form-content .components .component-item .c-actions{display:none;position:absolute;right:4px;z-index:2}.form-editor .form-content .components .component-item .c-bar-resize-right{display:none;width:8px;height:80%;position:absolute;top:10%;right:-5px;outline:2px #0e7cfa solid;border-radius:4px;color:#fff;background:#fff;z-index:2}.form-editor .form-content .components .component-item .c-item-backdrop{position:absolute;width:100%;height:100%;top:0;left:0;z-index:1}.form-editor .form-content .components .active{border:2px #0e7cfa solid;outline:1px #0e7cfa solid}.form-editor .form-content .components .column-2{width:calc(16.6666666667% - 8px)}.form-editor .form-content .components .column-3{width:calc(25% - 8px)}.form-editor .form-content .components .column-4{width:calc(33.3333333333% - 8px)}.form-editor .form-content .components .column-5{width:calc(41.6666666667% - 8px)}.form-editor .form-content .components .column-6{width:calc(50% - 8px)}.form-editor .form-content .components .column-7{width:calc(58.3333333333% - 8px)}.form-editor .form-content .components .column-8{width:calc(66.6666666667% - 8px)}.form-editor .form-content .components .column-9{width:calc(75% - 8px)}.form-editor .form-content .components .column-10{width:calc(83.3333333333% - 8px)}.form-editor .form-content .components .column-11{width:calc(91.6666666667% - 8px)}.form-editor .form-content .components .column-12{width:calc(100% - 8px)}.form-editor .form-attributes{width:300px}.form-editor .form-attributes .attributes{overflow-y:auto!important;padding:0 10px;background:#f6f8fc}.form-editor .form-attributes .attributes .group-attribute .title-group{font-weight:500;padding:5px 0;position:relative;cursor:pointer;margin-top:8px}.form-editor .form-attributes .attributes .group-attribute .title-group span{vertical-align:middle;display:inline-block}.form-editor .form-attributes .attributes .group-attribute .title-group mat-icon{vertical-align:middle;position:absolute;right:0}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute{display:grid;margin-bottom:10px}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute label{font-size:12px;font-weight:400;margin:0}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute input,.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute select,.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute textarea{border:1px solid #d3d3d3;height:30px}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute .select-options{padding:5px 0;border-bottom:1px solid #d3d3d3}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute .select-options input{width:100%;margin-bottom:5px}.form-editor .form-attributes .attributes .group-attribute .item-group .item-attribute .select-options .material-icons{padding-top:22px}.preview-container{margin:0 -24px;position:relative}.preview-container .header-preview{border-bottom:1px solid #eee;padding:10px;font-size:14px;font-weight:500;position:sticky;top:0;background-color:#fff;z-index:9999}.preview-container .header-preview .material-icons:hover{color:#5f6368;cursor:pointer}.preview-container .content{padding:10px}.c-hidden{opacity:.5}\n"] }]
|
|
6185
6192
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$6.SdNotifyService }, { type: i1$6.SdConfirmService }, { type: BuilderService }], propDecorators: { popupViewJSON: [{
|
|
6186
6193
|
type: ViewChild,
|
|
6187
6194
|
args: ['popupViewJSON']
|
|
@@ -6364,11 +6371,11 @@ class SdFeelExpression extends SdBaseSecureComponent {
|
|
|
6364
6371
|
return attributes;
|
|
6365
6372
|
};
|
|
6366
6373
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdFeelExpression, deps: [{ token: i0.ChangeDetectorRef }, { token: ExpressionFeelPipe }, { token: FormGenericService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6367
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdFeelExpression, isStandalone: true, selector: "sd-feel-expression", inputs: { components: "components", _expression: ["expression", "_expression"], _model: ["model", "_model"] }, outputs: { expressionChange: "expressionChange", modelChange: "modelChange", sdChange: "sdChange" }, viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true }], usesInheritance: true, ngImport: i0, template: "<a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{model || '--'}}</a>\r\n@if (expression) {\r\n<sd-modal title=\"Thi\u1EBFt l\u1EADp bi\u1EC3u th\u1EE9c\">\r\n <div class=\"c-builder\">\r\n <div class=\"d-flex justify-content-end\">\r\n <sd-button prefixIcon=\"calculate\" class=\"mr-4\" title=\"Nh\u00F3m \u0111i\u1EC1u ki\u1EC7n\" color=\"primary\" (click)=\"addCombinator(expression.conditions)\"></sd-button>\r\n <sd-button prefixIcon=\"add\" title=\"\u0110i\u1EC1u ki\u1EC7n\" color=\"primary\" (click)=\"addCondition(expression.conditions)\" type=\"fill\"></sd-button>\r\n </div>\r\n <!-- C\u1EA5p 1 -->\r\n @for (conditionLv1 of expression.conditions; track conditionLv1.key; let idxLv1 = $index) {\r\n <div class=\"d-flex align-items-end py-8\" style=\"gap: 8px;\">\r\n <div class=\"c-condition\">\r\n <!-- D\u00F2ng 1 ch\u1EC9 hi\u1EC7n WHERE -->\r\n @if (idxLv1 === 0) {\r\n <div class=\"c-where\">WHERE</div>\r\n }\r\n <!-- D\u00F2ng 2 hi\u1EC3n th\u1ECB combinator -->\r\n @if (idxLv1 === 1) {\r\n <div class=\"c-select\">\r\n <sd-select\r\n size=\"sm\"\r\n [(model)]=\"expression.combinator\"\r\n [items]=\"[\r\n { value: '&&', display: 'AND' },\r\n { value: '||', display: 'OR' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError=\"\"></sd-select>\r\n </div>\r\n }\r\n </div>\r\n @if (conditionLv1.type === 'condition') {\r\n <sd-autocomplete size=\"sm\" [form]=\"form\" style=\"width: 200px;\" [(model)]=\"conditionLv1.field\" [items]=\"attributes\" valueField=\"value\" displayField=\"display\" required hideInlineError></sd-autocomplete>\r\n @let fieldAttribute = attribute[conditionLv1.field!];\r\n <sd-select size=\"sm\" [form]=\"form\" style=\"width: 100px;\" [(model)]=\"conditionLv1.operator\" [items]=\"attributeOperators[fieldAttribute?.type || 'string']\" valueField=\"value\" displayField=\"display\" [disabled]=\"!fieldAttribute?.type\" required hideInlineError></sd-select>\r\n @if(!!fieldAttribute?.type && conditionLv1.operator && conditionLv1.operator !== 'NULL' && conditionLv1.operator !== 'NOT_NULL') {\r\n @if(fieldAttribute.type === 'string') {\r\n <sd-input size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv1.value\" required hideInlineError></sd-input>\r\n } @else if(fieldAttribute.type === 'number') {\r\n <sd-input-number size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv1.value\" required hideInlineError></sd-input-number>\r\n } @else if(fieldAttribute.type === 'boolean') {\r\n <sd-select size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv1.value\" [items]=\"[{value: true, display: fieldAttribute.displayOnTrue}, {value: false, display: fieldAttribute.displayOnFalse}]\" valueField=\"value\" displayField=\"display\" required hideInlineError></sd-select>\r\n }@else if(fieldAttribute.type === 'values') {\r\n <sd-autocomplete size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv1.value\" [items]=\"fieldAttribute.values\" valueField=\"value\" displayField=\"display\" required hideInlineError></sd-autocomplete>\r\n }\r\n }\r\n <sd-button\r\n class=\"ml-auto\"\r\n prefixIcon=\"delete\"\r\n tooltip=\"X\u00F3a\"\r\n (click)=\"remove(expression.conditions, idxLv1)\"></sd-button>\r\n \r\n } @else if (conditionLv1.type === 'combinator') {\r\n <div class=\"c-builder\">\r\n <div class=\"d-flex justify-content-end\">\r\n <sd-button\r\n class=\"mr-4\"\r\n prefixIcon=\"delete\"\r\n tooltip=\"X\u00F3a\"\r\n (click)=\"remove(expression.conditions, idxLv1)\"></sd-button>\r\n <sd-button prefixIcon=\"add\" title=\"\u0110i\u1EC1u ki\u1EC7n\" size=\"sm\" color=\"primary\" (click)=\"addCondition(conditionLv1.conditions)\" type=\"fill\"></sd-button>\r\n </div>\r\n <!-- C\u1EA5p 2 -->\r\n @for (conditionLv2 of conditionLv1.conditions; track conditionLv2.key; let idxLv2 = $index) {\r\n <div class=\"d-flex align-items-end py-8\" style=\"gap: 8px;\">\r\n <div class=\"c-condition\">\r\n <!-- D\u00F2ng 1 ch\u1EC9 hi\u1EC7n WHERE -->\r\n @if (idxLv2 === 0) {\r\n <div class=\"c-where\">WHERE</div>\r\n }\r\n <!-- D\u00F2ng 2 hi\u1EC3n th\u1ECB combinator -->\r\n @if (idxLv2 === 1) {\r\n <div class=\"c-select\">\r\n <sd-select\r\n size=\"sm\"\r\n [(model)]=\"conditionLv1.combinator\"\r\n [items]=\"[\r\n { value: '&&', display: 'AND' },\r\n { value: '||', display: 'OR' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError=\"\"></sd-select>\r\n </div>\r\n }\r\n </div>\r\n @if (conditionLv2.type === 'condition') {\r\n <sd-autocomplete size=\"sm\" [form]=\"form\" style=\"width: 200px;\" [(model)]=\"conditionLv2.field\" [items]=\"attributes\" valueField=\"value\" displayField=\"display\" required hideInlineError></sd-autocomplete>\r\n @let fieldAttribute = attribute[conditionLv2.field!];\r\n <sd-select size=\"sm\" [form]=\"form\" style=\"width: 100px;\" [(model)]=\"conditionLv2.operator\" [items]=\"attributeOperators[fieldAttribute?.type || 'string']\" valueField=\"value\" displayField=\"display\" [disabled]=\"!fieldAttribute?.type\" required hideInlineError></sd-select>\r\n @if(!!fieldAttribute?.type && conditionLv2.operator && conditionLv2.operator !== 'NULL' && conditionLv2.operator !== 'NOT_NULL') {\r\n @if(fieldAttribute.type === 'string') {\r\n <sd-input size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv2.value\" required hideInlineError></sd-input>\r\n } @else if(fieldAttribute.type === 'number') {\r\n <sd-input-number size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv2.value\" required hideInlineError></sd-input-number>\r\n } @else if(fieldAttribute.type === 'boolean') {\r\n <sd-select size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv2.value\" [items]=\"[{value: true, display: fieldAttribute.displayOnTrue}, {value: false, display: fieldAttribute.displayOnFalse}]\" valueField=\"value\" displayField=\"display\" required hideInlineError></sd-select>\r\n }@else if(fieldAttribute.type === 'values') {\r\n <sd-autocomplete size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv2.value\" [items]=\"fieldAttribute.values\" valueField=\"value\" displayField=\"display\" required hideInlineError></sd-autocomplete>\r\n }\r\n }\r\n <sd-button\r\n class=\"ml-auto\"\r\n prefixIcon=\"delete\"\r\n tooltip=\"X\u00F3a\"\r\n (click)=\"remove(conditionLv1.conditions, idxLv1)\"></sd-button>\r\n \r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n <ng-container sdFooter>\r\n <sd-button prefixIcon=\"save\" title=\"X\u00E1c nh\u1EADn\" (click)=\"onAccept()\" color=\"primary\" type=\"fill\"></sd-button>\r\n </ng-container>\r\n</sd-modal>\r\n}", styles: [".c-builder{padding:8px;width:100%;border:1px solid #e6e6e6;border-radius:4px}.c-builder .c-condition{width:80px}.c-builder .c-condition .c-where{width:80px;border:1px solid #e6e6e6;background-color:#f2f2f2;color:#757575;border-radius:4px;padding:4px;text-align:center}.c-builder .c-condition .c-select{margin-left:10px;width:70px}\n"], dependencies: [{ kind: "component", type: SdInput$1, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "tooltip", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect$1, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "hyperlink", "minWidthPanel", "hideInlineError", "required", "disabled", "viewed", "multiple", "validator", "inlineError", "appearance", "floatLabel", "items", "model"], outputs: ["modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdAutocomplete$1, selector: "sd-autocomplete", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "limit", "cacheChecksum", "hyperlink", "items", "hideInlineError", "addable", "required", "disabled", "viewed", "validator", "inlineError", "appearance", "model"], outputs: ["modelChange", "sdChange", "sdSelection", "sdAdd"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose"], outputs: ["sdClosed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6374
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdFeelExpression, isStandalone: true, selector: "sd-feel-expression", inputs: { components: "components", _expression: ["expression", "_expression"], _model: ["model", "_model"] }, outputs: { expressionChange: "expressionChange", modelChange: "modelChange", sdChange: "sdChange" }, viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true }], usesInheritance: true, ngImport: i0, template: "<a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{model || '--'}}</a>\r\n@if (expression) {\r\n<sd-modal [title]=\"'core.component.form-builder.set-expression' | sdT\">\r\n <div class=\"c-builder\">\r\n <div class=\"d-flex justify-content-end\">\r\n <sd-button prefixIcon=\"calculate\" class=\"mr-4\" [title]=\"'core.component.form-builder.condition-group' | sdT\" color=\"primary\" (click)=\"addCombinator(expression.conditions)\"></sd-button>\r\n <sd-button prefixIcon=\"add\" [title]=\"'core.component.form-builder.condition' | sdT\" color=\"primary\" (click)=\"addCondition(expression.conditions)\" type=\"fill\"></sd-button>\r\n </div>\r\n <!-- C\u1EA5p 1 -->\r\n @for (conditionLv1 of expression.conditions; track conditionLv1.key; let idxLv1 = $index) {\r\n <div class=\"d-flex align-items-end py-8\" style=\"gap: 8px;\">\r\n <div class=\"c-condition\">\r\n <!-- D\u00F2ng 1 ch\u1EC9 hi\u1EC7n WHERE -->\r\n @if (idxLv1 === 0) {\r\n <div class=\"c-where\">WHERE</div>\r\n }\r\n <!-- D\u00F2ng 2 hi\u1EC3n th\u1ECB combinator -->\r\n @if (idxLv1 === 1) {\r\n <div class=\"c-select\">\r\n <sd-select\r\n size=\"sm\"\r\n [(model)]=\"expression.combinator\"\r\n [items]=\"[\r\n { value: '&&', display: 'AND' },\r\n { value: '||', display: 'OR' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError=\"\"></sd-select>\r\n </div>\r\n }\r\n </div>\r\n @if (conditionLv1.type === 'condition') {\r\n <sd-autocomplete size=\"sm\" [form]=\"form\" style=\"width: 200px;\" [(model)]=\"conditionLv1.field\" [items]=\"attributes\" valueField=\"value\" displayField=\"display\" required hideInlineError></sd-autocomplete>\r\n @let fieldAttribute = attribute[conditionLv1.field!];\r\n <sd-select size=\"sm\" [form]=\"form\" style=\"width: 100px;\" [(model)]=\"conditionLv1.operator\" [items]=\"attributeOperators[fieldAttribute?.type || 'string']\" valueField=\"value\" displayField=\"display\" [disabled]=\"!fieldAttribute?.type\" required hideInlineError></sd-select>\r\n @if(!!fieldAttribute?.type && conditionLv1.operator && conditionLv1.operator !== 'NULL' && conditionLv1.operator !== 'NOT_NULL') {\r\n @if(fieldAttribute.type === 'string') {\r\n <sd-input size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv1.value\" required hideInlineError></sd-input>\r\n } @else if(fieldAttribute.type === 'number') {\r\n <sd-input-number size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv1.value\" required hideInlineError></sd-input-number>\r\n } @else if(fieldAttribute.type === 'boolean') {\r\n <sd-select size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv1.value\" [items]=\"[{value: true, display: fieldAttribute.displayOnTrue}, {value: false, display: fieldAttribute.displayOnFalse}]\" valueField=\"value\" displayField=\"display\" required hideInlineError></sd-select>\r\n }@else if(fieldAttribute.type === 'values') {\r\n <sd-autocomplete size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv1.value\" [items]=\"fieldAttribute.values\" valueField=\"value\" displayField=\"display\" required hideInlineError></sd-autocomplete>\r\n }\r\n }\r\n <sd-button\r\n class=\"ml-auto\"\r\n prefixIcon=\"delete\"\r\n [tooltip]=\"'core.component.form-builder.delete' | sdT\"\r\n (click)=\"remove(expression.conditions, idxLv1)\"></sd-button>\r\n \r\n } @else if (conditionLv1.type === 'combinator') {\r\n <div class=\"c-builder\">\r\n <div class=\"d-flex justify-content-end\">\r\n <sd-button\r\n class=\"mr-4\"\r\n prefixIcon=\"delete\"\r\n [tooltip]=\"'core.component.form-builder.delete' | sdT\"\r\n (click)=\"remove(expression.conditions, idxLv1)\"></sd-button>\r\n <sd-button prefixIcon=\"add\" [title]=\"'core.component.form-builder.condition' | sdT\" size=\"sm\" color=\"primary\" (click)=\"addCondition(conditionLv1.conditions)\" type=\"fill\"></sd-button>\r\n </div>\r\n <!-- C\u1EA5p 2 -->\r\n @for (conditionLv2 of conditionLv1.conditions; track conditionLv2.key; let idxLv2 = $index) {\r\n <div class=\"d-flex align-items-end py-8\" style=\"gap: 8px;\">\r\n <div class=\"c-condition\">\r\n <!-- D\u00F2ng 1 ch\u1EC9 hi\u1EC7n WHERE -->\r\n @if (idxLv2 === 0) {\r\n <div class=\"c-where\">WHERE</div>\r\n }\r\n <!-- D\u00F2ng 2 hi\u1EC3n th\u1ECB combinator -->\r\n @if (idxLv2 === 1) {\r\n <div class=\"c-select\">\r\n <sd-select\r\n size=\"sm\"\r\n [(model)]=\"conditionLv1.combinator\"\r\n [items]=\"[\r\n { value: '&&', display: 'AND' },\r\n { value: '||', display: 'OR' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError=\"\"></sd-select>\r\n </div>\r\n }\r\n </div>\r\n @if (conditionLv2.type === 'condition') {\r\n <sd-autocomplete size=\"sm\" [form]=\"form\" style=\"width: 200px;\" [(model)]=\"conditionLv2.field\" [items]=\"attributes\" valueField=\"value\" displayField=\"display\" required hideInlineError></sd-autocomplete>\r\n @let fieldAttribute = attribute[conditionLv2.field!];\r\n <sd-select size=\"sm\" [form]=\"form\" style=\"width: 100px;\" [(model)]=\"conditionLv2.operator\" [items]=\"attributeOperators[fieldAttribute?.type || 'string']\" valueField=\"value\" displayField=\"display\" [disabled]=\"!fieldAttribute?.type\" required hideInlineError></sd-select>\r\n @if(!!fieldAttribute?.type && conditionLv2.operator && conditionLv2.operator !== 'NULL' && conditionLv2.operator !== 'NOT_NULL') {\r\n @if(fieldAttribute.type === 'string') {\r\n <sd-input size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv2.value\" required hideInlineError></sd-input>\r\n } @else if(fieldAttribute.type === 'number') {\r\n <sd-input-number size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv2.value\" required hideInlineError></sd-input-number>\r\n } @else if(fieldAttribute.type === 'boolean') {\r\n <sd-select size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv2.value\" [items]=\"[{value: true, display: fieldAttribute.displayOnTrue}, {value: false, display: fieldAttribute.displayOnFalse}]\" valueField=\"value\" displayField=\"display\" required hideInlineError></sd-select>\r\n }@else if(fieldAttribute.type === 'values') {\r\n <sd-autocomplete size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv2.value\" [items]=\"fieldAttribute.values\" valueField=\"value\" displayField=\"display\" required hideInlineError></sd-autocomplete>\r\n }\r\n }\r\n <sd-button\r\n class=\"ml-auto\"\r\n prefixIcon=\"delete\"\r\n [tooltip]=\"'core.component.form-builder.delete' | sdT\"\r\n (click)=\"remove(conditionLv1.conditions, idxLv1)\"></sd-button>\r\n \r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n <ng-container sdFooter>\r\n <sd-button prefixIcon=\"save\" [title]=\"'core.component.form-builder.confirm' | sdT\" (click)=\"onAccept()\" color=\"primary\" type=\"fill\"></sd-button>\r\n </ng-container>\r\n</sd-modal>\r\n}", styles: [".c-builder{padding:8px;width:100%;border:1px solid #e6e6e6;border-radius:4px}.c-builder .c-condition{width:80px}.c-builder .c-condition .c-where{width:80px;border:1px solid #e6e6e6;background-color:#f2f2f2;color:#757575;border-radius:4px;padding:4px;text-align:center}.c-builder .c-condition .c-select{margin-left:10px;width:70px}\n"], dependencies: [{ kind: "component", type: SdInput$1, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "tooltip", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect$1, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "hyperlink", "minWidthPanel", "hideInlineError", "required", "disabled", "viewed", "multiple", "validator", "inlineError", "appearance", "floatLabel", "items", "model"], outputs: ["modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdAutocomplete$1, selector: "sd-autocomplete", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "limit", "cacheChecksum", "hyperlink", "items", "hideInlineError", "addable", "required", "disabled", "viewed", "validator", "inlineError", "appearance", "model"], outputs: ["modelChange", "sdChange", "sdSelection", "sdAdd"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose"], outputs: ["sdClosed"] }, { kind: "pipe", type: SdTPipe, name: "sdT" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6368
6375
|
}
|
|
6369
6376
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdFeelExpression, decorators: [{
|
|
6370
6377
|
type: Component,
|
|
6371
|
-
args: [{ selector: 'sd-feel-expression', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdInput$1, SdInputNumber, SdSelect$1, SdAutocomplete$1, SdButton, SdSelect$1, SdModal], template: "<a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{model || '--'}}</a>\r\n@if (expression) {\r\n<sd-modal title=\"
|
|
6378
|
+
args: [{ selector: 'sd-feel-expression', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdInput$1, SdInputNumber, SdSelect$1, SdAutocomplete$1, SdButton, SdSelect$1, SdModal, SdTPipe], template: "<a class=\"T12R\" href=\"javascript:;\" (click)=\"edit()\">{{model || '--'}}</a>\r\n@if (expression) {\r\n<sd-modal [title]=\"'core.component.form-builder.set-expression' | sdT\">\r\n <div class=\"c-builder\">\r\n <div class=\"d-flex justify-content-end\">\r\n <sd-button prefixIcon=\"calculate\" class=\"mr-4\" [title]=\"'core.component.form-builder.condition-group' | sdT\" color=\"primary\" (click)=\"addCombinator(expression.conditions)\"></sd-button>\r\n <sd-button prefixIcon=\"add\" [title]=\"'core.component.form-builder.condition' | sdT\" color=\"primary\" (click)=\"addCondition(expression.conditions)\" type=\"fill\"></sd-button>\r\n </div>\r\n <!-- C\u1EA5p 1 -->\r\n @for (conditionLv1 of expression.conditions; track conditionLv1.key; let idxLv1 = $index) {\r\n <div class=\"d-flex align-items-end py-8\" style=\"gap: 8px;\">\r\n <div class=\"c-condition\">\r\n <!-- D\u00F2ng 1 ch\u1EC9 hi\u1EC7n WHERE -->\r\n @if (idxLv1 === 0) {\r\n <div class=\"c-where\">WHERE</div>\r\n }\r\n <!-- D\u00F2ng 2 hi\u1EC3n th\u1ECB combinator -->\r\n @if (idxLv1 === 1) {\r\n <div class=\"c-select\">\r\n <sd-select\r\n size=\"sm\"\r\n [(model)]=\"expression.combinator\"\r\n [items]=\"[\r\n { value: '&&', display: 'AND' },\r\n { value: '||', display: 'OR' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError=\"\"></sd-select>\r\n </div>\r\n }\r\n </div>\r\n @if (conditionLv1.type === 'condition') {\r\n <sd-autocomplete size=\"sm\" [form]=\"form\" style=\"width: 200px;\" [(model)]=\"conditionLv1.field\" [items]=\"attributes\" valueField=\"value\" displayField=\"display\" required hideInlineError></sd-autocomplete>\r\n @let fieldAttribute = attribute[conditionLv1.field!];\r\n <sd-select size=\"sm\" [form]=\"form\" style=\"width: 100px;\" [(model)]=\"conditionLv1.operator\" [items]=\"attributeOperators[fieldAttribute?.type || 'string']\" valueField=\"value\" displayField=\"display\" [disabled]=\"!fieldAttribute?.type\" required hideInlineError></sd-select>\r\n @if(!!fieldAttribute?.type && conditionLv1.operator && conditionLv1.operator !== 'NULL' && conditionLv1.operator !== 'NOT_NULL') {\r\n @if(fieldAttribute.type === 'string') {\r\n <sd-input size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv1.value\" required hideInlineError></sd-input>\r\n } @else if(fieldAttribute.type === 'number') {\r\n <sd-input-number size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv1.value\" required hideInlineError></sd-input-number>\r\n } @else if(fieldAttribute.type === 'boolean') {\r\n <sd-select size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv1.value\" [items]=\"[{value: true, display: fieldAttribute.displayOnTrue}, {value: false, display: fieldAttribute.displayOnFalse}]\" valueField=\"value\" displayField=\"display\" required hideInlineError></sd-select>\r\n }@else if(fieldAttribute.type === 'values') {\r\n <sd-autocomplete size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv1.value\" [items]=\"fieldAttribute.values\" valueField=\"value\" displayField=\"display\" required hideInlineError></sd-autocomplete>\r\n }\r\n }\r\n <sd-button\r\n class=\"ml-auto\"\r\n prefixIcon=\"delete\"\r\n [tooltip]=\"'core.component.form-builder.delete' | sdT\"\r\n (click)=\"remove(expression.conditions, idxLv1)\"></sd-button>\r\n \r\n } @else if (conditionLv1.type === 'combinator') {\r\n <div class=\"c-builder\">\r\n <div class=\"d-flex justify-content-end\">\r\n <sd-button\r\n class=\"mr-4\"\r\n prefixIcon=\"delete\"\r\n [tooltip]=\"'core.component.form-builder.delete' | sdT\"\r\n (click)=\"remove(expression.conditions, idxLv1)\"></sd-button>\r\n <sd-button prefixIcon=\"add\" [title]=\"'core.component.form-builder.condition' | sdT\" size=\"sm\" color=\"primary\" (click)=\"addCondition(conditionLv1.conditions)\" type=\"fill\"></sd-button>\r\n </div>\r\n <!-- C\u1EA5p 2 -->\r\n @for (conditionLv2 of conditionLv1.conditions; track conditionLv2.key; let idxLv2 = $index) {\r\n <div class=\"d-flex align-items-end py-8\" style=\"gap: 8px;\">\r\n <div class=\"c-condition\">\r\n <!-- D\u00F2ng 1 ch\u1EC9 hi\u1EC7n WHERE -->\r\n @if (idxLv2 === 0) {\r\n <div class=\"c-where\">WHERE</div>\r\n }\r\n <!-- D\u00F2ng 2 hi\u1EC3n th\u1ECB combinator -->\r\n @if (idxLv2 === 1) {\r\n <div class=\"c-select\">\r\n <sd-select\r\n size=\"sm\"\r\n [(model)]=\"conditionLv1.combinator\"\r\n [items]=\"[\r\n { value: '&&', display: 'AND' },\r\n { value: '||', display: 'OR' }\r\n ]\"\r\n valueField=\"value\"\r\n displayField=\"display\"\r\n required\r\n hideInlineError=\"\"></sd-select>\r\n </div>\r\n }\r\n </div>\r\n @if (conditionLv2.type === 'condition') {\r\n <sd-autocomplete size=\"sm\" [form]=\"form\" style=\"width: 200px;\" [(model)]=\"conditionLv2.field\" [items]=\"attributes\" valueField=\"value\" displayField=\"display\" required hideInlineError></sd-autocomplete>\r\n @let fieldAttribute = attribute[conditionLv2.field!];\r\n <sd-select size=\"sm\" [form]=\"form\" style=\"width: 100px;\" [(model)]=\"conditionLv2.operator\" [items]=\"attributeOperators[fieldAttribute?.type || 'string']\" valueField=\"value\" displayField=\"display\" [disabled]=\"!fieldAttribute?.type\" required hideInlineError></sd-select>\r\n @if(!!fieldAttribute?.type && conditionLv2.operator && conditionLv2.operator !== 'NULL' && conditionLv2.operator !== 'NOT_NULL') {\r\n @if(fieldAttribute.type === 'string') {\r\n <sd-input size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv2.value\" required hideInlineError></sd-input>\r\n } @else if(fieldAttribute.type === 'number') {\r\n <sd-input-number size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv2.value\" required hideInlineError></sd-input-number>\r\n } @else if(fieldAttribute.type === 'boolean') {\r\n <sd-select size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv2.value\" [items]=\"[{value: true, display: fieldAttribute.displayOnTrue}, {value: false, display: fieldAttribute.displayOnFalse}]\" valueField=\"value\" displayField=\"display\" required hideInlineError></sd-select>\r\n }@else if(fieldAttribute.type === 'values') {\r\n <sd-autocomplete size=\"sm\" [form]=\"form\" style=\"flex:1\" [(model)]=\"conditionLv2.value\" [items]=\"fieldAttribute.values\" valueField=\"value\" displayField=\"display\" required hideInlineError></sd-autocomplete>\r\n }\r\n }\r\n <sd-button\r\n class=\"ml-auto\"\r\n prefixIcon=\"delete\"\r\n [tooltip]=\"'core.component.form-builder.delete' | sdT\"\r\n (click)=\"remove(conditionLv1.conditions, idxLv1)\"></sd-button>\r\n \r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n <ng-container sdFooter>\r\n <sd-button prefixIcon=\"save\" [title]=\"'core.component.form-builder.confirm' | sdT\" (click)=\"onAccept()\" color=\"primary\" type=\"fill\"></sd-button>\r\n </ng-container>\r\n</sd-modal>\r\n}", styles: [".c-builder{padding:8px;width:100%;border:1px solid #e6e6e6;border-radius:4px}.c-builder .c-condition{width:80px}.c-builder .c-condition .c-where{width:80px;border:1px solid #e6e6e6;background-color:#f2f2f2;color:#757575;border-radius:4px;padding:4px;text-align:center}.c-builder .c-condition .c-select{margin-left:10px;width:70px}\n"] }]
|
|
6372
6379
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: ExpressionFeelPipe }, { type: FormGenericService }], propDecorators: { modal: [{
|
|
6373
6380
|
type: ViewChild,
|
|
6374
6381
|
args: [SdModal]
|