raise-common-lib 0.0.197 → 0.0.199
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/bundles/raise-common-lib.umd.js +96 -40
- package/bundles/raise-common-lib.umd.js.map +1 -1
- package/bundles/raise-common-lib.umd.min.js +1 -1
- package/bundles/raise-common-lib.umd.min.js.map +1 -1
- package/esm2015/lib/dialog/common-dialog/index.component.js +12 -3
- package/esm2015/lib/form/drawer-form/drawer-form.component.js +73 -39
- package/esm5/lib/dialog/common-dialog/index.component.js +12 -3
- package/esm5/lib/form/drawer-form/drawer-form.component.js +86 -39
- package/fesm2015/raise-common-lib.js +83 -40
- package/fesm2015/raise-common-lib.js.map +1 -1
- package/fesm5/raise-common-lib.js +96 -40
- package/fesm5/raise-common-lib.js.map +1 -1
- package/lib/dialog/common-dialog/index.component.d.ts +1 -0
- package/lib/form/drawer-form/drawer-form.component.d.ts +7 -1
- package/package.json +1 -1
- package/raise-common-lib.metadata.json +1 -1
|
@@ -22450,6 +22450,8 @@
|
|
|
22450
22450
|
this.formChange = new core.EventEmitter();
|
|
22451
22451
|
this.fieldChange = new core.EventEmitter();
|
|
22452
22452
|
this.sections = [];
|
|
22453
|
+
this.fieldTypeMap = {};
|
|
22454
|
+
this.formFieldMap = {};
|
|
22453
22455
|
this.form = {};
|
|
22454
22456
|
this.fieldValidMap = {};
|
|
22455
22457
|
// 存储 datepicker 的值
|
|
@@ -22476,15 +22478,15 @@
|
|
|
22476
22478
|
function (changes) {
|
|
22477
22479
|
if (changes._sections) {
|
|
22478
22480
|
this.sections = filterShowSection(changes._sections.currentValue);
|
|
22479
|
-
this.
|
|
22480
|
-
this.
|
|
22481
|
-
this.formChange.emit(this.form);
|
|
22481
|
+
this.formatFieldMap();
|
|
22482
|
+
this.setForm(__assign({}, this.form, this._form));
|
|
22482
22483
|
}
|
|
22483
22484
|
if (changes._form) {
|
|
22484
22485
|
if (!changes._form.currentValue[FORM_PROXY_TAG]) {
|
|
22485
|
-
this.
|
|
22486
|
-
|
|
22487
|
-
|
|
22486
|
+
this.setForm(changes._form.currentValue);
|
|
22487
|
+
}
|
|
22488
|
+
else {
|
|
22489
|
+
this.form = changes._form.currentValue;
|
|
22488
22490
|
}
|
|
22489
22491
|
if (!changes._form.firstChange) {
|
|
22490
22492
|
this.checkFormChange(changes._form.previousValue, changes._form.currentValue);
|
|
@@ -22517,6 +22519,13 @@
|
|
|
22517
22519
|
_this.sectionContainers = containers;
|
|
22518
22520
|
_this.customSectionRender(containers);
|
|
22519
22521
|
}));
|
|
22522
|
+
this.dropdowns.changes.subscribe((/**
|
|
22523
|
+
* @param {?} dropdowns
|
|
22524
|
+
* @return {?}
|
|
22525
|
+
*/
|
|
22526
|
+
function (dropdowns) {
|
|
22527
|
+
_this.dropdowns = dropdowns;
|
|
22528
|
+
}));
|
|
22520
22529
|
if (this.showAnchor) {
|
|
22521
22530
|
this.initAnchorScrollHandler();
|
|
22522
22531
|
}
|
|
@@ -22533,22 +22542,7 @@
|
|
|
22533
22542
|
var _this = this;
|
|
22534
22543
|
if (this.customTemplate && containers.length > 0) {
|
|
22535
22544
|
/** @type {?} */
|
|
22536
|
-
var customFields_1 = [];
|
|
22537
|
-
this.sections.forEach((/**
|
|
22538
|
-
* @param {?} section
|
|
22539
|
-
* @return {?}
|
|
22540
|
-
*/
|
|
22541
|
-
function (section) {
|
|
22542
|
-
section.fields.forEach((/**
|
|
22543
|
-
* @param {?} field
|
|
22544
|
-
* @return {?}
|
|
22545
|
-
*/
|
|
22546
|
-
function (field) {
|
|
22547
|
-
if (field.fieldFormType === "Custom") {
|
|
22548
|
-
customFields_1.push(field);
|
|
22549
|
-
}
|
|
22550
|
-
}));
|
|
22551
|
-
}));
|
|
22545
|
+
var customFields_1 = this.fieldTypeMap.Custom || [];
|
|
22552
22546
|
containers.forEach((/**
|
|
22553
22547
|
* @param {?} container
|
|
22554
22548
|
* @param {?} index
|
|
@@ -22594,6 +22588,47 @@
|
|
|
22594
22588
|
}));
|
|
22595
22589
|
}
|
|
22596
22590
|
};
|
|
22591
|
+
/**
|
|
22592
|
+
* @return {?}
|
|
22593
|
+
*/
|
|
22594
|
+
DrawerFormComponent.prototype.formatFieldMap = /**
|
|
22595
|
+
* @return {?}
|
|
22596
|
+
*/
|
|
22597
|
+
function () {
|
|
22598
|
+
var _this = this;
|
|
22599
|
+
this.fieldTypeMap = {};
|
|
22600
|
+
this.formFieldMap = {};
|
|
22601
|
+
this.sections.forEach((/**
|
|
22602
|
+
* @param {?} section
|
|
22603
|
+
* @return {?}
|
|
22604
|
+
*/
|
|
22605
|
+
function (section) {
|
|
22606
|
+
section.fields.forEach((/**
|
|
22607
|
+
* @param {?} field
|
|
22608
|
+
* @return {?}
|
|
22609
|
+
*/
|
|
22610
|
+
function (field) {
|
|
22611
|
+
if (!_this.fieldTypeMap[field.fieldFormType]) {
|
|
22612
|
+
_this.fieldTypeMap[field.fieldFormType] = [];
|
|
22613
|
+
}
|
|
22614
|
+
_this.fieldTypeMap[field.fieldFormType].push(field);
|
|
22615
|
+
_this.formFieldMap[field.formKey] = field;
|
|
22616
|
+
}));
|
|
22617
|
+
}));
|
|
22618
|
+
};
|
|
22619
|
+
/**
|
|
22620
|
+
* @param {?} form
|
|
22621
|
+
* @return {?}
|
|
22622
|
+
*/
|
|
22623
|
+
DrawerFormComponent.prototype.setForm = /**
|
|
22624
|
+
* @param {?} form
|
|
22625
|
+
* @return {?}
|
|
22626
|
+
*/
|
|
22627
|
+
function (form) {
|
|
22628
|
+
this.form = this.getFormProxy(this.formatForm(this.sections, form));
|
|
22629
|
+
this.syncFormField();
|
|
22630
|
+
this.formChange.emit(this.form);
|
|
22631
|
+
};
|
|
22597
22632
|
/**
|
|
22598
22633
|
* @param {?} value
|
|
22599
22634
|
* @param {?} compareValue
|
|
@@ -22896,21 +22931,7 @@
|
|
|
22896
22931
|
* @return {?}
|
|
22897
22932
|
*/
|
|
22898
22933
|
function (formKey) {
|
|
22899
|
-
|
|
22900
|
-
var fieldItem = null;
|
|
22901
|
-
this.sections.find((/**
|
|
22902
|
-
* @param {?} section
|
|
22903
|
-
* @return {?}
|
|
22904
|
-
*/
|
|
22905
|
-
function (section) {
|
|
22906
|
-
fieldItem = section.fields.find((/**
|
|
22907
|
-
* @param {?} field
|
|
22908
|
-
* @return {?}
|
|
22909
|
-
*/
|
|
22910
|
-
function (field) { return field.formKey === formKey; }));
|
|
22911
|
-
return fieldItem;
|
|
22912
|
-
}));
|
|
22913
|
-
return fieldItem;
|
|
22934
|
+
return this.formFieldMap[formKey] || null;
|
|
22914
22935
|
};
|
|
22915
22936
|
/**
|
|
22916
22937
|
* @private
|
|
@@ -23052,6 +23073,25 @@
|
|
|
23052
23073
|
}
|
|
23053
23074
|
event.updateData(this.getOptions(field), query);
|
|
23054
23075
|
};
|
|
23076
|
+
/**
|
|
23077
|
+
* @param {?} event
|
|
23078
|
+
* @param {?} field
|
|
23079
|
+
* @return {?}
|
|
23080
|
+
*/
|
|
23081
|
+
DrawerFormComponent.prototype.onDropdownDataBound = /**
|
|
23082
|
+
* @param {?} event
|
|
23083
|
+
* @param {?} field
|
|
23084
|
+
* @return {?}
|
|
23085
|
+
*/
|
|
23086
|
+
function (event, field) {
|
|
23087
|
+
/** @type {?} */
|
|
23088
|
+
var index = this.fieldTypeMap[field.fieldFormType].indexOf(field);
|
|
23089
|
+
/** @type {?} */
|
|
23090
|
+
var component = this.dropdowns.toArray()[index];
|
|
23091
|
+
if (event.items.length > 0 && index !== -1 && component) {
|
|
23092
|
+
component.value = this.form[field.formKey];
|
|
23093
|
+
}
|
|
23094
|
+
};
|
|
23055
23095
|
/**
|
|
23056
23096
|
* @param {?} field
|
|
23057
23097
|
* @return {?}
|
|
@@ -23188,7 +23228,7 @@
|
|
|
23188
23228
|
DrawerFormComponent.decorators = [
|
|
23189
23229
|
{ type: core.Component, args: [{
|
|
23190
23230
|
selector: "rs-drawer-form",
|
|
23191
|
-
template: "<div #drawerFormEl class=\"rs-drawer-form-container\">\r\n <div class=\"section-container\">\r\n <div #sectionEl class=\"section-item\" *ngFor=\"let section of sections\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"section-expand-checkbox\"\r\n *ngIf=\"section.title\"\r\n />\r\n <div class=\"section-title\" *ngIf=\"section.title\">\r\n <span>{{ section.title }}</span>\r\n </div>\r\n <div class=\"section-form\" *ngIf=\"!section.customKey\">\r\n <div\r\n class=\"form-item\"\r\n *ngFor=\"let field of section.fields\"\r\n [attr.data-required]=\"field.required ? 'yes' : 'no'\"\r\n [attr.data-disabled]=\"field.disabled || formDisabled ? 'yes' : 'no'\"\r\n [attr.data-error]=\"\r\n fieldValidMap[field.formKey] === false ? 'yes' : 'no'\r\n \"\r\n >\r\n <div class=\"form-label\">\r\n <span>{{ field.label }}</span>\r\n <ejs-tooltip\r\n class=\"form-tooltip\"\r\n cssClass=\"rs-drawer-tooltip\"\r\n *ngIf=\"field.tooltip\"\r\n position=\"RightCenter\"\r\n [content]=\"field.tooltip\"\r\n >\r\n <span class=\"tooltip-icon\"></span>\r\n </ejs-tooltip>\r\n </div>\r\n <div class=\"form-content\">\r\n <!-- Radio -->\r\n <rs-radio-group\r\n *ngIf=\"field.fieldFormType === 'Radio'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-radio-group>\r\n <!-- Checkbox -->\r\n <rs-checkbox-group\r\n *ngIf=\"field.fieldFormType === 'Checkbox'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-checkbox-group>\r\n <!-- Switch -->\r\n <rs-switch-input\r\n *ngIf=\"field.fieldFormType === 'Switch'\"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-switch-input>\r\n <!-- Input -->\r\n <input\r\n class=\"e-input\"\r\n *ngIf=\"\r\n field.fieldFormType === 'Text' ||\r\n field.fieldFormType === 'Email'\r\n \"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n [required]=\"field.required\"\r\n [attr.maxlength]=\"field.maxlength\"\r\n [attr.minlength]=\"field.minlength\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (input)=\"onInput($event.target.value, field)\"\r\n (change)=\"onChange($event.target.value, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n autocomplete=\"off\"\r\n />\r\n <!-- Textarea -->\r\n <textarea\r\n class=\"e-input\"\r\n *ngIf=\"field.fieldFormType === 'Textarea'\"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n [required]=\"field.required\"\r\n [attr.maxlength]=\"field.maxlength\"\r\n [attr.minlength]=\"field.minlength\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (input)=\"onInput($event.target.value, field)\"\r\n (change)=\"onChange($event.target.value, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n autocomplete=\"off\"\r\n rows=\"3\"\r\n ></textarea>\r\n <!-- Number Input -->\r\n <ejs-numerictextbox\r\n *ngIf=\"field.fieldFormType === 'Number'\"\r\n [value]=\"form[field.formKey]\"\r\n [max]=\"field.max\"\r\n [min]=\"field.min\"\r\n [step]=\"field.step\"\r\n [decimals]=\"field.decimals\"\r\n [format]=\"field.format || numberFormat\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-numerictextbox>\r\n <!-- Tags Input -->\r\n <rs-tag-input\r\n *ngIf=\"field.fieldFormType === 'Tags'\"\r\n [value]=\"form[field.formKey]\"\r\n [fields]=\"getOptionFields(field)\"\r\n [inputMaxlength]=\"field.maxlength\"\r\n [inputMinlength]=\"field.minlength\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></rs-tag-input>\r\n <!-- AutoComplete -->\r\n <ejs-autocomplete\r\n *ngIf=\"field.fieldFormType === 'AutoComplete'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-autocomplete>\r\n <!-- Dropdown -->\r\n <ejs-dropdownlist\r\n *ngIf=\"field.fieldFormType === 'Dropdown'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [allowFiltering]=\"true\"\r\n [showClearButton]=\"true\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-dropdownlist>\r\n <!-- MultiSelect -->\r\n <ejs-multiselect\r\n *ngIf=\"field.fieldFormType === 'MultiSelect'\"\r\n mode=\"CheckBox\"\r\n [ngModel]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [allowFiltering]=\"true\"\r\n [showDropDownIcon]=\"true\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n >\r\n </ejs-multiselect>\r\n <!-- Datepicker -->\r\n <ejs-datepicker\r\n *ngIf=\"field.fieldFormType === 'Datepicker'\"\r\n [(value)]=\"dateForm[field.formKey]\"\r\n [format]=\"field.format || dateFormat\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"\r\n fieldValidMap[field.formKey] === false ||\r\n dateValidMap[field.formKey] === false\r\n \"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onDatePickerBlur($event, field)\"\r\n ></ejs-datepicker>\r\n <ng-template\r\n #customTemplateContainer\r\n *ngIf=\"field.fieldFormType === 'Custom'\"\r\n ></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"section-form\" *ngIf=\"section.customKey\">\r\n <ng-template #customSectionContainer></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"sections.length > 1 && showAnchor\" class=\"anchor-container\">\r\n <div\r\n class=\"anchor-item\"\r\n *ngFor=\"let section of sections; let index = index\"\r\n [style.display]=\"section.title ? 'block' : 'none'\"\r\n [attr.data-active]=\"scrollIndex === index ? 'yes' : 'no'\"\r\n [attr.data-content]=\"section.title\"\r\n (click)=\"onClickAnchor(index)\"\r\n ></div>\r\n </div>\r\n</div>\r\n",
|
|
23231
|
+
template: "<div #drawerFormEl class=\"rs-drawer-form-container\">\r\n <div class=\"section-container\">\r\n <div #sectionEl class=\"section-item\" *ngFor=\"let section of sections\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"section-expand-checkbox\"\r\n *ngIf=\"section.title\"\r\n />\r\n <div class=\"section-title\" *ngIf=\"section.title\">\r\n <span>{{ section.title }}</span>\r\n </div>\r\n <div class=\"section-form\" *ngIf=\"!section.customKey\">\r\n <div\r\n class=\"form-item\"\r\n *ngFor=\"let field of section.fields\"\r\n [attr.data-required]=\"field.required ? 'yes' : 'no'\"\r\n [attr.data-disabled]=\"field.disabled || formDisabled ? 'yes' : 'no'\"\r\n [attr.data-error]=\"\r\n fieldValidMap[field.formKey] === false ? 'yes' : 'no'\r\n \"\r\n >\r\n <div class=\"form-label\">\r\n <span>{{ field.label }}</span>\r\n <ejs-tooltip\r\n class=\"form-tooltip\"\r\n cssClass=\"rs-drawer-tooltip\"\r\n *ngIf=\"field.tooltip\"\r\n position=\"RightCenter\"\r\n [content]=\"field.tooltip\"\r\n >\r\n <span class=\"tooltip-icon\"></span>\r\n </ejs-tooltip>\r\n </div>\r\n <div class=\"form-content\">\r\n <!-- Radio -->\r\n <rs-radio-group\r\n *ngIf=\"field.fieldFormType === 'Radio'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-radio-group>\r\n <!-- Checkbox -->\r\n <rs-checkbox-group\r\n *ngIf=\"field.fieldFormType === 'Checkbox'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-checkbox-group>\r\n <!-- Switch -->\r\n <rs-switch-input\r\n *ngIf=\"field.fieldFormType === 'Switch'\"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-switch-input>\r\n <!-- Input -->\r\n <input\r\n class=\"e-input\"\r\n *ngIf=\"\r\n field.fieldFormType === 'Text' ||\r\n field.fieldFormType === 'Email'\r\n \"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n [required]=\"field.required\"\r\n [attr.maxlength]=\"field.maxlength\"\r\n [attr.minlength]=\"field.minlength\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (input)=\"onInput($event.target.value, field)\"\r\n (change)=\"onChange($event.target.value, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n autocomplete=\"off\"\r\n />\r\n <!-- Textarea -->\r\n <textarea\r\n class=\"e-input\"\r\n *ngIf=\"field.fieldFormType === 'Textarea'\"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n [required]=\"field.required\"\r\n [attr.maxlength]=\"field.maxlength\"\r\n [attr.minlength]=\"field.minlength\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (input)=\"onInput($event.target.value, field)\"\r\n (change)=\"onChange($event.target.value, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n autocomplete=\"off\"\r\n rows=\"3\"\r\n ></textarea>\r\n <!-- Number Input -->\r\n <ejs-numerictextbox\r\n *ngIf=\"field.fieldFormType === 'Number'\"\r\n [value]=\"form[field.formKey]\"\r\n [max]=\"field.max\"\r\n [min]=\"field.min\"\r\n [step]=\"field.step\"\r\n [decimals]=\"field.decimals\"\r\n [format]=\"field.format || numberFormat\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-numerictextbox>\r\n <!-- Tags Input -->\r\n <rs-tag-input\r\n *ngIf=\"field.fieldFormType === 'Tags'\"\r\n [value]=\"form[field.formKey]\"\r\n [fields]=\"getOptionFields(field)\"\r\n [inputMaxlength]=\"field.maxlength\"\r\n [inputMinlength]=\"field.minlength\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></rs-tag-input>\r\n <!-- AutoComplete -->\r\n <ejs-autocomplete\r\n *ngIf=\"field.fieldFormType === 'AutoComplete'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-autocomplete>\r\n <!-- Dropdown -->\r\n <ejs-dropdownlist\r\n #dropdown\r\n *ngIf=\"field.fieldFormType === 'Dropdown'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [allowFiltering]=\"true\"\r\n [showClearButton]=\"true\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (dataBound)=\"onDropdownDataBound($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-dropdownlist>\r\n <!-- MultiSelect -->\r\n <ejs-multiselect\r\n *ngIf=\"field.fieldFormType === 'MultiSelect'\"\r\n mode=\"CheckBox\"\r\n [ngModel]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [allowFiltering]=\"true\"\r\n [showDropDownIcon]=\"true\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n >\r\n </ejs-multiselect>\r\n <!-- Datepicker -->\r\n <ejs-datepicker\r\n *ngIf=\"field.fieldFormType === 'Datepicker'\"\r\n [(value)]=\"dateForm[field.formKey]\"\r\n [format]=\"field.format || dateFormat\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"\r\n fieldValidMap[field.formKey] === false ||\r\n dateValidMap[field.formKey] === false\r\n \"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onDatePickerBlur($event, field)\"\r\n ></ejs-datepicker>\r\n <ng-template\r\n #customTemplateContainer\r\n *ngIf=\"field.fieldFormType === 'Custom'\"\r\n ></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"section-form\" *ngIf=\"section.customKey\">\r\n <ng-template #customSectionContainer></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"sections.length > 1 && showAnchor\" class=\"anchor-container\">\r\n <div\r\n class=\"anchor-item\"\r\n *ngFor=\"let section of sections; let index = index\"\r\n [style.display]=\"section.title ? 'block' : 'none'\"\r\n [attr.data-active]=\"scrollIndex === index ? 'yes' : 'no'\"\r\n [attr.data-content]=\"section.title\"\r\n (click)=\"onClickAnchor(index)\"\r\n ></div>\r\n </div>\r\n</div>\r\n",
|
|
23192
23232
|
styles: [":host{display:block;margin-top:16px}.rs-drawer-form-container{display:flex;flex-flow:row nowrap;align-items:flex-start;gap:32px}.rs-drawer-form-container .section-container{flex:auto;display:flex;flex-flow:column nowrap;max-width:1576px}.rs-drawer-form-container .section-item{position:relative}.rs-drawer-form-container .section-item:not(:first-child){border-top:1px solid #eaedf0}.rs-drawer-form-container .section-expand-checkbox{display:block;width:100%;height:28px;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;position:absolute;top:0;left:0}.rs-drawer-form-container .section-expand-checkbox:checked+.section-title::before{transform:rotate(-90deg)}.rs-drawer-form-container .section-expand-checkbox:checked+.section-title+.section-form{max-height:0;overflow:hidden}.rs-drawer-form-container .section-title{padding:6px 0;margin-bottom:12px;color:#44566c;font-family:Arial;font-size:13px;font-style:normal;font-weight:700;line-height:16px;display:flex;flex-flow:row nowrap;align-items:center;pointer-events:none}.rs-drawer-form-container .section-title::before{content:url(../../../assets/img/down-arrow.svg);display:block;height:16px;width:16px;margin-right:8px}.rs-drawer-form-container .section-form{display:flex;flex-flow:row wrap;justify-content:space-between;gap:12px 56px;max-width:1576px;padding:0 24px;margin-bottom:20px}.rs-drawer-form-container .section-form .form-item{min-height:28px;min-width:400px;max-width:700px;width:calc((100% - 56px)/ 2);display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:flex-start}.rs-drawer-form-container .section-form .form-item[data-required=yes] .form-label>span:first-child::after{content:\"*\";color:var(--rs-input-require-label-color)}.rs-drawer-form-container .section-form .form-item .form-label{flex:none;width:144px;height:28px;margin-right:16px;color:#43566c;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:14px;display:flex;flex-flow:row nowrap;align-items:center}.rs-drawer-form-container .section-form .form-item .form-label .form-tooltip{margin-left:4px}.rs-drawer-form-container .section-form .form-item .form-label .form-tooltip .tooltip-icon::before{content:\" \";display:block;width:14px;height:14px;background-image:url(../../../assets/img/tooltip-icon.svg);background-size:contain;cursor:pointer}.rs-drawer-form-container .section-form .form-item .form-content{flex:auto}@media (max-width:1420px){.rs-drawer-form-container .section-form .form-item{width:100%}}.rs-drawer-form-container .anchor-container{flex:none;display:flex;flex-flow:column nowrap;gap:4px;min-width:120px;height:auto;position:-webkit-sticky;position:sticky;top:56px}.rs-drawer-form-container .anchor-item{min-width:120px;padding:4px 12px;border-left:1px solid #eaedf0;cursor:pointer;color:#44566c;font-family:Arial;font-size:11px;font-style:normal;font-weight:400;line-height:16px;position:relative}.rs-drawer-form-container .anchor-item::before{content:attr(data-content);color:#44566c;font-weight:400;position:absolute;left:12px}.rs-drawer-form-container .anchor-item::after{content:attr(data-content);visibility:hidden;color:#1364b3;font-weight:700}.rs-drawer-form-container .anchor-item[data-active=yes]{border-color:#1f7bff}.rs-drawer-form-container .anchor-item[data-active=yes]::before{visibility:hidden}.rs-drawer-form-container .anchor-item[data-active=yes]::after{visibility:visible}.rs-drawer-tooltip.e-tooltip-wrap{border:none;background-color:#44566c}.rs-drawer-tooltip.e-tooltip-wrap .e-arrow-tip{height:4px;visibility:hidden}"]
|
|
23193
23233
|
}] }
|
|
23194
23234
|
];
|
|
@@ -23213,6 +23253,7 @@
|
|
|
23213
23253
|
rootEl: [{ type: core.ViewChild, args: ["drawerFormEl", { static: false },] }],
|
|
23214
23254
|
containers: [{ type: core.ViewChildren, args: ["customTemplateContainer", { read: core.ViewContainerRef },] }],
|
|
23215
23255
|
sectionContainers: [{ type: core.ViewChildren, args: ["customSectionContainer", { read: core.ViewContainerRef },] }],
|
|
23256
|
+
dropdowns: [{ type: core.ViewChildren, args: ["dropdown",] }],
|
|
23216
23257
|
sectionEls: [{ type: core.ViewChildren, args: ["sectionEl",] }]
|
|
23217
23258
|
};
|
|
23218
23259
|
return DrawerFormComponent;
|
|
@@ -23257,8 +23298,14 @@
|
|
|
23257
23298
|
*/
|
|
23258
23299
|
DrawerFormComponent.prototype.sectionContainers;
|
|
23259
23300
|
/** @type {?} */
|
|
23301
|
+
DrawerFormComponent.prototype.dropdowns;
|
|
23302
|
+
/** @type {?} */
|
|
23260
23303
|
DrawerFormComponent.prototype.sections;
|
|
23261
23304
|
/** @type {?} */
|
|
23305
|
+
DrawerFormComponent.prototype.fieldTypeMap;
|
|
23306
|
+
/** @type {?} */
|
|
23307
|
+
DrawerFormComponent.prototype.formFieldMap;
|
|
23308
|
+
/** @type {?} */
|
|
23262
23309
|
DrawerFormComponent.prototype.form;
|
|
23263
23310
|
/** @type {?} */
|
|
23264
23311
|
DrawerFormComponent.prototype.fieldValidMap;
|
|
@@ -23292,12 +23339,13 @@
|
|
|
23292
23339
|
this.hideCloseIcon = false;
|
|
23293
23340
|
this.hideCloseBtn = false;
|
|
23294
23341
|
this.hideSaveBtn = false;
|
|
23295
|
-
this.hideDiscardBtn =
|
|
23342
|
+
this.hideDiscardBtn = true;
|
|
23296
23343
|
this.saveBtnLabel = "";
|
|
23297
23344
|
this.cancelBtnLabel = "";
|
|
23298
23345
|
this.discardBtnLabel = "";
|
|
23299
23346
|
this.showErrorIcon = false;
|
|
23300
23347
|
this.showZoomBtn = false;
|
|
23348
|
+
this.customSave = false;
|
|
23301
23349
|
// 显示相关属性
|
|
23302
23350
|
this.dialogStyle = {};
|
|
23303
23351
|
this.size = "";
|
|
@@ -23370,7 +23418,12 @@
|
|
|
23370
23418
|
* @return {?}
|
|
23371
23419
|
*/
|
|
23372
23420
|
function () {
|
|
23373
|
-
this.
|
|
23421
|
+
if (this.customSave) {
|
|
23422
|
+
this.saveEmit.emit();
|
|
23423
|
+
}
|
|
23424
|
+
else {
|
|
23425
|
+
this.dialogRef.close("save");
|
|
23426
|
+
}
|
|
23374
23427
|
};
|
|
23375
23428
|
/**
|
|
23376
23429
|
* @return {?}
|
|
@@ -23418,6 +23471,7 @@
|
|
|
23418
23471
|
discardBtnLabel: [{ type: core.Input }],
|
|
23419
23472
|
showErrorIcon: [{ type: core.Input }],
|
|
23420
23473
|
showZoomBtn: [{ type: core.Input }],
|
|
23474
|
+
customSave: [{ type: core.Input }],
|
|
23421
23475
|
onCloseRequest: [{ type: core.Input }],
|
|
23422
23476
|
dialogStyle: [{ type: core.Input }],
|
|
23423
23477
|
size: [{ type: core.Input }],
|
|
@@ -23453,6 +23507,8 @@
|
|
|
23453
23507
|
/** @type {?} */
|
|
23454
23508
|
CommonDialogComponent.prototype.showZoomBtn;
|
|
23455
23509
|
/** @type {?} */
|
|
23510
|
+
CommonDialogComponent.prototype.customSave;
|
|
23511
|
+
/** @type {?} */
|
|
23456
23512
|
CommonDialogComponent.prototype.onCloseRequest;
|
|
23457
23513
|
/** @type {?} */
|
|
23458
23514
|
CommonDialogComponent.prototype.dialogStyle;
|