ps-toolkit-ui 1.3.29 → 1.3.32
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/ps-toolkit-ui.umd.js +93 -116
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/enum.class.js +14 -13
- package/esm2015/lib/classes/form.class.js +1 -56
- package/esm2015/lib/components/form/index/form.component.js +2 -2
- package/esm2015/lib/components/form/tree/form.tree.component.js +68 -20
- package/esm2015/lib/components/form/tree/item/form.tree.item.component.js +8 -6
- package/esm2015/lib/components/login/login.component.js +3 -3
- package/fesm2015/ps-toolkit-ui.js +88 -93
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/enum.class.d.ts +13 -12
- package/lib/classes/form.class.d.ts +0 -6
- package/lib/components/form/tree/form.tree.component.d.ts +7 -2
- package/lib/components/form/tree/item/form.tree.item.component.d.ts +3 -1
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
- package/src/assets/styles/base.css +1 -1
|
@@ -757,18 +757,19 @@
|
|
|
757
757
|
InputType[InputType["Price"] = 23] = "Price";
|
|
758
758
|
InputType[InputType["Radio"] = 24] = "Radio";
|
|
759
759
|
InputType[InputType["Tree"] = 25] = "Tree";
|
|
760
|
-
InputType[InputType["
|
|
761
|
-
InputType[InputType["
|
|
762
|
-
InputType[InputType["
|
|
763
|
-
InputType[InputType["
|
|
764
|
-
InputType[InputType["
|
|
765
|
-
InputType[InputType["
|
|
766
|
-
InputType[InputType["
|
|
767
|
-
InputType[InputType["
|
|
768
|
-
InputType[InputType["
|
|
769
|
-
InputType[InputType["
|
|
770
|
-
InputType[InputType["
|
|
771
|
-
InputType[InputType["
|
|
760
|
+
InputType[InputType["TreeRadio"] = 26] = "TreeRadio";
|
|
761
|
+
InputType[InputType["Plaque"] = 27] = "Plaque";
|
|
762
|
+
InputType[InputType["PlaqueM"] = 28] = "PlaqueM";
|
|
763
|
+
InputType[InputType["SelectAutoCompletePlaque"] = 29] = "SelectAutoCompletePlaque";
|
|
764
|
+
InputType[InputType["SelectAutoCompletePlaqueM"] = 30] = "SelectAutoCompletePlaqueM";
|
|
765
|
+
InputType[InputType["BankCard"] = 31] = "BankCard";
|
|
766
|
+
InputType[InputType["Constant"] = 32] = "Constant";
|
|
767
|
+
InputType[InputType["Hidden"] = 33] = "Hidden";
|
|
768
|
+
InputType[InputType["Table"] = 34] = "Table";
|
|
769
|
+
InputType[InputType["CarSearch"] = 35] = "CarSearch";
|
|
770
|
+
InputType[InputType["Car"] = 36] = "Car";
|
|
771
|
+
InputType[InputType["Finger"] = 37] = "Finger";
|
|
772
|
+
InputType[InputType["Color"] = 38] = "Color";
|
|
772
773
|
})(exports.InputType || (exports.InputType = {}));
|
|
773
774
|
(function (OperationEnum) {
|
|
774
775
|
OperationEnum[OperationEnum["All"] = -1] = "All";
|
|
@@ -1934,69 +1935,6 @@
|
|
|
1934
1935
|
this.selected = selected;
|
|
1935
1936
|
this.children = children;
|
|
1936
1937
|
}
|
|
1937
|
-
TreeRowClass.prototype.toggle = function (onlyChild) {
|
|
1938
|
-
var _this = this;
|
|
1939
|
-
if (onlyChild === void 0) { onlyChild = true; }
|
|
1940
|
-
if (this.selected) {
|
|
1941
|
-
this.unCheck(onlyChild);
|
|
1942
|
-
if (onlyChild) {
|
|
1943
|
-
setTimeout(function () { _this.unCheckParent(); });
|
|
1944
|
-
}
|
|
1945
|
-
}
|
|
1946
|
-
else {
|
|
1947
|
-
this.check(onlyChild);
|
|
1948
|
-
if (onlyChild) {
|
|
1949
|
-
setTimeout(function () { _this.checkParent(); });
|
|
1950
|
-
}
|
|
1951
|
-
}
|
|
1952
|
-
};
|
|
1953
|
-
TreeRowClass.prototype.check = function (onlyChild, c) {
|
|
1954
|
-
if (c === void 0) { c = this; }
|
|
1955
|
-
c.selected = true;
|
|
1956
|
-
if (onlyChild) {
|
|
1957
|
-
c.checkChildren(onlyChild);
|
|
1958
|
-
}
|
|
1959
|
-
};
|
|
1960
|
-
TreeRowClass.prototype.unCheck = function (onlyChild, c) {
|
|
1961
|
-
var _this = this;
|
|
1962
|
-
if (c === void 0) { c = this; }
|
|
1963
|
-
c.selected = false;
|
|
1964
|
-
if (onlyChild) {
|
|
1965
|
-
c.children.forEach(function (ch) {
|
|
1966
|
-
_this.unCheck(onlyChild, ch);
|
|
1967
|
-
});
|
|
1968
|
-
}
|
|
1969
|
-
};
|
|
1970
|
-
TreeRowClass.prototype.checkChildren = function (onlyChild) {
|
|
1971
|
-
var _this = this;
|
|
1972
|
-
this.children.forEach(function (ch) {
|
|
1973
|
-
_this.check(onlyChild, ch);
|
|
1974
|
-
});
|
|
1975
|
-
};
|
|
1976
|
-
TreeRowClass.prototype.checkParent = function (p) {
|
|
1977
|
-
if (p === void 0) { p = this.parent; }
|
|
1978
|
-
if (p) {
|
|
1979
|
-
if (p.children.filter(function (x) { return !x.selected; }).length > 0) {
|
|
1980
|
-
p.selected = null;
|
|
1981
|
-
}
|
|
1982
|
-
else {
|
|
1983
|
-
p.selected = true;
|
|
1984
|
-
}
|
|
1985
|
-
this.checkParent(p.parent);
|
|
1986
|
-
}
|
|
1987
|
-
};
|
|
1988
|
-
TreeRowClass.prototype.unCheckParent = function (p) {
|
|
1989
|
-
if (p === void 0) { p = this.parent; }
|
|
1990
|
-
if (p) {
|
|
1991
|
-
if (p.children.filter(function (x) { return x.selected || x.selected == null; }).length > 0) {
|
|
1992
|
-
p.selected = null;
|
|
1993
|
-
}
|
|
1994
|
-
else {
|
|
1995
|
-
p.selected = false;
|
|
1996
|
-
}
|
|
1997
|
-
this.unCheckParent(p.parent);
|
|
1998
|
-
}
|
|
1999
|
-
};
|
|
2000
1938
|
return TreeRowClass;
|
|
2001
1939
|
}());
|
|
2002
1940
|
var AccordionClass = /** @class */ (function () {
|
|
@@ -4198,7 +4136,7 @@
|
|
|
4198
4136
|
FormComponent.decorators = [
|
|
4199
4137
|
{ type: core.Component, args: [{
|
|
4200
4138
|
selector: 'lib-form',
|
|
4201
|
-
template: "<form [style]=\"form.style\" *ngIf=\"form\" [id]=\"form.id + 'Form'\" [className]=\"'form' + (form.class ? ' ' + form.class : '')\">\r\n <div *ngIf=\"form.displayLabel\" [className]=\"(form.subName ? '' : 'underline ') + 'title'\">{{this.form.l(this.form.name)}}</div>\r\n <div *ngIf=\"form.displayLabel && form.subName\" class=\"sub-title underline\">{{this.form.l(this.form.subName)}}</div>\r\n <div *ngIf=\"form.loading\" class=\"loading\">\r\n <div class=\"text\" [innerHTML]=\"form.l('LoadingTable', 'Processing')\"></div>\r\n </div>\r\n <div *ngIf=\"!form.permission\" class=\"loading\">\r\n <div class=\"text\"><i class=\"fas fa-shield-alt icon\"></i>{{ form.l(\"PermissionDenied\") }}</div>\r\n </div>\r\n <div class=\"inputs\">\r\n <span *ngFor=\"let inp of form.inputs; let i = index\">\r\n <lib-form-textbox (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Text || inp.type == type.Password || inp.type == type.Mobile || inp.type == type.Phone || inp.type == type.Email || inp.type == type.NationalCode || inp.type == type.Number || inp.type == type.Url || inp.type == type.PostalCode || inp.type == type.Price || inp.type == type.Sheba || inp.type == type.Color)\" [inp]=\"inp\"></lib-form-textbox>\r\n <lib-form-textarea (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.TextArea\" [inp]=\"inp\"></lib-form-textarea>\r\n <lib-form-checkbox (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Check\" [inp]=\"inp\"></lib-form-checkbox>\r\n <lib-form-select [inForm]=\"true\" (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Select || inp.type == type.SelectSearch || inp.type == type.SelectAutoComplete)\" [inp]=\"inp\"></lib-form-select>\r\n <lib-form-date [inForm]=\"true\" (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Date\" [inp]=\"inp\"></lib-form-date>\r\n <lib-form-time [inForm]=\"true\" (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Time\" [inp]=\"inp\"></lib-form-time>\r\n <lib-form-datetime [inForm]=\"true\" (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.DateTime\" [inp]=\"inp\"></lib-form-datetime>\r\n <lib-form-label *ngIf=\"inp.visible && inp.type == type.Label\" [inp]=\"inp\"></lib-form-label>\r\n <lib-form-file (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.File\" [inp]=\"inp\"></lib-form-file>\r\n <lib-form-button (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Button || inp.type == type.Submit)\" [inp]=\"inp\"></lib-form-button>\r\n <lib-form-icon (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Icon\" [inp]=\"inp\"></lib-form-icon>\r\n <lib-form-radio (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Radio\" [inp]=\"inp\"></lib-form-radio>\r\n <lib-form-tree (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Tree\" [inp]=\"inp\"></lib-form-tree>\r\n <lib-form-plaque (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Plaque || inp.type == type.PlaqueM)\" [inp]=\"inp\"></lib-form-plaque>\r\n <lib-form-plaque-select (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.SelectAutoCompletePlaque || inp.type == type.SelectAutoCompletePlaqueM)\" [inp]=\"inp\"></lib-form-plaque-select>\r\n <lib-form-bank-card (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.BankCard\" [inp]=\"inp\"></lib-form-bank-card>\r\n <lib-form-car-search (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.CarSearch\" [inp]=\"inp\"></lib-form-car-search>\r\n <lib-form-car (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Car\" [inp]=\"inp\"></lib-form-car>\r\n <lib-form-finger (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Finger\" [inp]=\"inp\"></lib-form-finger>\r\n <lib-form-table *ngIf=\"inp.visible && inp.type == type.Table\" [inp]=\"inp\"></lib-form-table>\r\n <lib-form-hidden *ngIf=\"inp.type == type.Hidden\" [inp]=\"inp\"></lib-form-hidden>\r\n </span>\r\n </div>\r\n</form>\r\n",
|
|
4139
|
+
template: "<form [style]=\"form.style\" *ngIf=\"form\" [id]=\"form.id + 'Form'\" [className]=\"'form' + (form.class ? ' ' + form.class : '')\">\r\n <div *ngIf=\"form.displayLabel\" [className]=\"(form.subName ? '' : 'underline ') + 'title'\">{{this.form.l(this.form.name)}}</div>\r\n <div *ngIf=\"form.displayLabel && form.subName\" class=\"sub-title underline\">{{this.form.l(this.form.subName)}}</div>\r\n <div *ngIf=\"form.loading\" class=\"loading\">\r\n <div class=\"text\" [innerHTML]=\"form.l('LoadingTable', 'Processing')\"></div>\r\n </div>\r\n <div *ngIf=\"!form.permission\" class=\"loading\">\r\n <div class=\"text\"><i class=\"fas fa-shield-alt icon\"></i>{{ form.l(\"PermissionDenied\") }}</div>\r\n </div>\r\n <div class=\"inputs\">\r\n <span *ngFor=\"let inp of form.inputs; let i = index\">\r\n <lib-form-textbox (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Text || inp.type == type.Password || inp.type == type.Mobile || inp.type == type.Phone || inp.type == type.Email || inp.type == type.NationalCode || inp.type == type.Number || inp.type == type.Url || inp.type == type.PostalCode || inp.type == type.Price || inp.type == type.Sheba || inp.type == type.Color)\" [inp]=\"inp\"></lib-form-textbox>\r\n <lib-form-textarea (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.TextArea\" [inp]=\"inp\"></lib-form-textarea>\r\n <lib-form-checkbox (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Check\" [inp]=\"inp\"></lib-form-checkbox>\r\n <lib-form-select [inForm]=\"true\" (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Select || inp.type == type.SelectSearch || inp.type == type.SelectAutoComplete)\" [inp]=\"inp\"></lib-form-select>\r\n <lib-form-date [inForm]=\"true\" (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Date\" [inp]=\"inp\"></lib-form-date>\r\n <lib-form-time [inForm]=\"true\" (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Time\" [inp]=\"inp\"></lib-form-time>\r\n <lib-form-datetime [inForm]=\"true\" (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.DateTime\" [inp]=\"inp\"></lib-form-datetime>\r\n <lib-form-label *ngIf=\"inp.visible && inp.type == type.Label\" [inp]=\"inp\"></lib-form-label>\r\n <lib-form-file (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.File\" [inp]=\"inp\"></lib-form-file>\r\n <lib-form-button (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Button || inp.type == type.Submit)\" [inp]=\"inp\"></lib-form-button>\r\n <lib-form-icon (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Icon\" [inp]=\"inp\"></lib-form-icon>\r\n <lib-form-radio (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Radio\" [inp]=\"inp\"></lib-form-radio>\r\n <lib-form-tree (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Tree || inp.type == type.TreeRadio)\" [inp]=\"inp\"></lib-form-tree>\r\n <lib-form-plaque (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Plaque || inp.type == type.PlaqueM)\" [inp]=\"inp\"></lib-form-plaque>\r\n <lib-form-plaque-select (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.SelectAutoCompletePlaque || inp.type == type.SelectAutoCompletePlaqueM)\" [inp]=\"inp\"></lib-form-plaque-select>\r\n <lib-form-bank-card (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.BankCard\" [inp]=\"inp\"></lib-form-bank-card>\r\n <lib-form-car-search (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.CarSearch\" [inp]=\"inp\"></lib-form-car-search>\r\n <lib-form-car (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Car\" [inp]=\"inp\"></lib-form-car>\r\n <lib-form-finger (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Finger\" [inp]=\"inp\"></lib-form-finger>\r\n <lib-form-table *ngIf=\"inp.visible && inp.type == type.Table\" [inp]=\"inp\"></lib-form-table>\r\n <lib-form-hidden *ngIf=\"inp.type == type.Hidden\" [inp]=\"inp\"></lib-form-hidden>\r\n </span>\r\n </div>\r\n</form>\r\n",
|
|
4202
4140
|
styles: [".form{border-radius:var(--border-radius-base);float:right;padding:20px;position:relative;width:100%}.form>.title{font-family:VazirBold;font-size:16px;height:40px}.form>.sub-title,.form>.title{float:right;line-height:30px;margin-bottom:10px;position:relative;text-align:right;width:100%}.form>.sub-title{color:var(--black-light);font-family:VazirLight;font-size:12px;height:30px}.form .loading{background-color:#fff;border-radius:var(--border-radius-base);height:100%;right:0;top:0;z-index:4}.form .loading,.form .loading .text{position:absolute;text-align:center;width:100%}.form .loading .text{font-family:VazirBold;height:35px;line-height:35px;top:calc(50% - 20px)}::ng-deep .form .loading .icon{font-size:20px!important;line-height:30px;margin-left:5px;position:relative;top:5px}.form-buttons,.form-error{float:right;width:100%}.form-error{color:var(--red-light);font-size:11px;height:15px;line-height:8px;margin-top:10px;padding:0 10px;position:relative;text-align:center}.form-error .message{float:left;width:calc(100% - 40px)}.form-error .icon{float:right;height:20px;line-height:6px;right:0;top:0;width:40px}.form .inputs{margin:0 -15px}"]
|
|
4203
4141
|
},] }
|
|
4204
4142
|
];
|
|
@@ -5953,8 +5891,13 @@
|
|
|
5953
5891
|
var FormTreeItemComponent = /** @class */ (function () {
|
|
5954
5892
|
function FormTreeItemComponent() {
|
|
5955
5893
|
this.parent = null;
|
|
5956
|
-
this.
|
|
5894
|
+
this.toggle = new core.EventEmitter();
|
|
5957
5895
|
}
|
|
5896
|
+
Object.defineProperty(FormTreeItemComponent.prototype, "type", {
|
|
5897
|
+
get: function () { return exports.InputType; },
|
|
5898
|
+
enumerable: false,
|
|
5899
|
+
configurable: true
|
|
5900
|
+
});
|
|
5958
5901
|
FormTreeItemComponent.prototype.ngOnInit = function () {
|
|
5959
5902
|
this.item.parent = this.parent;
|
|
5960
5903
|
};
|
|
@@ -5973,15 +5916,15 @@
|
|
|
5973
5916
|
}
|
|
5974
5917
|
};
|
|
5975
5918
|
FormTreeItemComponent.prototype.onClick = function () {
|
|
5976
|
-
this.
|
|
5919
|
+
this.toggle.emit(this.item);
|
|
5977
5920
|
};
|
|
5978
5921
|
return FormTreeItemComponent;
|
|
5979
5922
|
}());
|
|
5980
5923
|
FormTreeItemComponent.decorators = [
|
|
5981
5924
|
{ type: core.Component, args: [{
|
|
5982
5925
|
selector: 'lib-form-tree-item',
|
|
5983
|
-
template: "<div [className]=\"(item.selected ? 'selected ' : item.selected == null ? 'null ' : '') + 'row-item'\">\r\n <div (click)=\"onClick()\"
|
|
5984
|
-
styles: [".row-item{float:left;position:relative;text-align:center;width:90%}.row-item .content{background-color:rgba(11,72,107,.06666666666666667);border-radius:var(--border-radius-base);cursor:pointer;float:right;width:100%}.row-item .open-close{cursor:pointer;font-size:20px;height:40px;line-height:38px;position:absolute;right:-25px;text-align:center;width:15px}.row-item .content.parent,.row-item .content:hover{background-color:rgba(11,72,107,.13333333333333333)}.row-item .content.parent:hover{background-color:rgba(11,72,107,.26666666666666666)}.row-item .children{display:none;padding:10px;position:relative}.row-item .children,.row-item .children .items{float:left;width:100%}.row-item .children>.line{height:calc(100% - 30px);right:20px;top:15px;width:2px}.row-item .children .row-item>.line,.row-item .children>.line{background-color:rgba(11,72,107,.13333333333333333);position:absolute}.row-item .children .row-item>.line{height:2px;right:-35px;top:17px;width:10px}.row-item .checkbox{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;align-items:center;cursor:pointer;display:flex;float:right;font-size:11px;justify-content:center;line-height:20px;min-height:40px;padding:5px 30px;position:relative;text-align:center;width:100%;z-index:2}.row-item .control{cursor:pointer;height:0;opacity:0;position:absolute;right:50%;top:50%;width:0;z-index:1}.row-item>.checkbox:before{content:\"\\f0c8\";font-family:Font Awesome\\ 5 Pro;font-size:18px;font-weight:400;height:40px;line-height:40px;position:absolute;right:0;top:0;width:30px}.row-item.selected>.checkbox:before{animation:pop .18s ease-in;color:var(--green);content:\"\\f14a\";font-weight:900}.row-item.null>.checkbox:before{animation:pop .18s ease-in;color:var(--green);content:\"\\f146\";font-weight:900}.row-item:after{background-image:linear-gradient(90deg,transparent,rgba(50,50,50,.25),transparent);border:0;bottom:-1px;content:\"\";float:right;height:1px;position:absolute;right:0;width:100%}::ng-deep lib-form-tree-item:last-of-type>.row-item:after{display:none}"]
|
|
5926
|
+
template: "<div [className]=\"(item.selected ? 'selected ' : item.selected == null ? 'null ' : '') + 'row-item'\">\r\n <div (click)=\"onClick()\" [className]=\"'checkbox' + (this.tree.type === type.TreeRadio ? ' radio' : '')\">{{tree.l(item.name)}}</div>\r\n <i *ngIf=\"item.children.length > 0\" (click)=\"openClose($event)\" [className]=\"(index == 0 && level == 0 ? 'fa-duotone fa-caret-down ' : 'fa-duotone fa-caret-left ') + 'open-close'\"></i>\r\n <div [className]=\"(index == 0 && level == 0 ? 'open ' : '') + 'children'\" [style]=\"index == 0 && level == 0 ? {display: 'block'} : {}\" *ngIf=\"item.children.length > 0\">\r\n <div class=\"items rightline\">\r\n <lib-form-tree-item [level]=\"level + 1\" (toggle)=\"toggle.emit($event)\" [index]=\"i\" [item]=\"child\" [parent]=\"item\" [tree]=\"tree\" *ngFor=\"let child of item.children; let i = index\"></lib-form-tree-item>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
5927
|
+
styles: [".row-item{float:left;position:relative;text-align:center;width:90%}.row-item .content{background-color:rgba(11,72,107,.06666666666666667);border-radius:var(--border-radius-base);cursor:pointer;float:right;width:100%}.row-item .open-close{cursor:pointer;font-size:20px;height:40px;line-height:38px;position:absolute;right:-25px;text-align:center;width:15px}.row-item .content.parent,.row-item .content:hover{background-color:rgba(11,72,107,.13333333333333333)}.row-item .content.parent:hover{background-color:rgba(11,72,107,.26666666666666666)}.row-item .children{display:none;padding:10px;position:relative}.row-item .children,.row-item .children .items{float:left;width:100%}.row-item .children>.line{height:calc(100% - 30px);right:20px;top:15px;width:2px}.row-item .children .row-item>.line,.row-item .children>.line{background-color:rgba(11,72,107,.13333333333333333);position:absolute}.row-item .children .row-item>.line{height:2px;right:-35px;top:17px;width:10px}.row-item .checkbox{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;align-items:center;cursor:pointer;display:flex;float:right;font-size:11px;justify-content:center;line-height:20px;min-height:40px;padding:5px 30px;position:relative;text-align:center;width:100%;z-index:2}.row-item .control{cursor:pointer;height:0;opacity:0;position:absolute;right:50%;top:50%;width:0;z-index:1}.row-item>.checkbox:before{content:\"\\f0c8\";font-family:Font Awesome\\ 5 Pro;font-size:18px;font-weight:400;height:40px;line-height:40px;position:absolute;right:0;top:0;width:30px}.row-item>.checkbox.radio:before{content:\"\\f111\"}.row-item.selected>.checkbox:before{animation:pop .18s ease-in;color:var(--green);content:\"\\f14a\";content:\"\\f192\";font-weight:900}.row-item.null>.checkbox:before{animation:pop .18s ease-in;color:var(--green);content:\"\\f146\";font-weight:900}.row-item:after{background-image:linear-gradient(90deg,transparent,rgba(50,50,50,.25),transparent);border:0;bottom:-1px;content:\"\";float:right;height:1px;position:absolute;right:0;width:100%}::ng-deep lib-form-tree-item:last-of-type>.row-item:after{display:none}"]
|
|
5985
5928
|
},] }
|
|
5986
5929
|
];
|
|
5987
5930
|
FormTreeItemComponent.ctorParameters = function () { return []; };
|
|
@@ -5992,7 +5935,7 @@
|
|
|
5992
5935
|
tree: [{ type: core.Input }],
|
|
5993
5936
|
parent: [{ type: core.Input }],
|
|
5994
5937
|
base: [{ type: core.Input }],
|
|
5995
|
-
|
|
5938
|
+
toggle: [{ type: core.Output }],
|
|
5996
5939
|
inputDiv: [{ type: core.ViewChild, args: ['inputDiv',] }],
|
|
5997
5940
|
inputBase: [{ type: core.ViewChild, args: ['inputBase',] }]
|
|
5998
5941
|
};
|
|
@@ -6019,7 +5962,7 @@
|
|
|
6019
5962
|
return _this.getSelected();
|
|
6020
5963
|
};
|
|
6021
5964
|
this.inp.setValue = function (v) {
|
|
6022
|
-
_this.
|
|
5965
|
+
_this.setValue(v.map(String));
|
|
6023
5966
|
};
|
|
6024
5967
|
this.inp.clear = function () {
|
|
6025
5968
|
_this.inp.setValue([], false);
|
|
@@ -6068,57 +6011,91 @@
|
|
|
6068
6011
|
});
|
|
6069
6012
|
return l;
|
|
6070
6013
|
};
|
|
6071
|
-
FormTreeComponent.prototype.
|
|
6014
|
+
FormTreeComponent.prototype.setValue = function (ids, rows) {
|
|
6072
6015
|
var e_2, _a;
|
|
6073
|
-
if (
|
|
6074
|
-
var isChecked = false;
|
|
6075
|
-
var cIsChecked = false;
|
|
6016
|
+
if (rows === void 0) { rows = this.inp.rows; }
|
|
6076
6017
|
try {
|
|
6077
|
-
for (var
|
|
6078
|
-
var r =
|
|
6018
|
+
for (var rows_1 = __values(rows), rows_1_1 = rows_1.next(); !rows_1_1.done; rows_1_1 = rows_1.next()) {
|
|
6019
|
+
var r = rows_1_1.value;
|
|
6079
6020
|
r.selected = ids.includes(r.value);
|
|
6080
|
-
if (r.selected) {
|
|
6081
|
-
isChecked = true;
|
|
6082
|
-
}
|
|
6083
6021
|
if (this.inp.onlyChild) {
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
r.selected = r.children.filter(function (x) { return !x.selected; }).length > 0 ? null : true;
|
|
6022
|
+
if (r.selected) {
|
|
6023
|
+
this.checkParent(r.parent);
|
|
6087
6024
|
}
|
|
6025
|
+
this.setValue(ids, r.children);
|
|
6088
6026
|
}
|
|
6089
6027
|
}
|
|
6090
6028
|
}
|
|
6091
6029
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
6092
6030
|
finally {
|
|
6093
6031
|
try {
|
|
6094
|
-
if (
|
|
6032
|
+
if (rows_1_1 && !rows_1_1.done && (_a = rows_1.return)) _a.call(rows_1);
|
|
6095
6033
|
}
|
|
6096
6034
|
finally { if (e_2) throw e_2.error; }
|
|
6097
6035
|
}
|
|
6098
|
-
return
|
|
6036
|
+
return true;
|
|
6099
6037
|
};
|
|
6100
|
-
FormTreeComponent.prototype.
|
|
6101
|
-
|
|
6038
|
+
FormTreeComponent.prototype.toggle = function (row) {
|
|
6039
|
+
if (row.selected) {
|
|
6040
|
+
this.unCheck(row);
|
|
6041
|
+
if (this.inp.onlyChild && this.inp.type === exports.InputType.Tree) {
|
|
6042
|
+
this.unCheckParent(row.parent);
|
|
6043
|
+
}
|
|
6044
|
+
}
|
|
6045
|
+
else {
|
|
6046
|
+
this.check(row);
|
|
6047
|
+
if (this.inp.onlyChild && this.inp.type === exports.InputType.Tree) {
|
|
6048
|
+
this.checkParent(row.parent);
|
|
6049
|
+
}
|
|
6050
|
+
}
|
|
6051
|
+
};
|
|
6052
|
+
FormTreeComponent.prototype.check = function (c) {
|
|
6053
|
+
if (this.inp.type === exports.InputType.Tree) {
|
|
6054
|
+
c.selected = true;
|
|
6055
|
+
if (this.inp.onlyChild) {
|
|
6056
|
+
this.checkChildren(c);
|
|
6057
|
+
}
|
|
6058
|
+
}
|
|
6059
|
+
else {
|
|
6060
|
+
this.inp.clear();
|
|
6061
|
+
c.selected = true;
|
|
6062
|
+
}
|
|
6063
|
+
};
|
|
6064
|
+
FormTreeComponent.prototype.unCheck = function (c) {
|
|
6102
6065
|
var _this = this;
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6066
|
+
c.selected = false;
|
|
6067
|
+
if (this.inp.onlyChild) {
|
|
6068
|
+
c.children.forEach(function (ch) {
|
|
6069
|
+
_this.unCheck(ch);
|
|
6070
|
+
});
|
|
6071
|
+
}
|
|
6072
|
+
};
|
|
6073
|
+
FormTreeComponent.prototype.checkChildren = function (c) {
|
|
6074
|
+
var _this = this;
|
|
6075
|
+
c.children.forEach(function (ch) {
|
|
6076
|
+
_this.check(ch);
|
|
6077
|
+
});
|
|
6078
|
+
};
|
|
6079
|
+
FormTreeComponent.prototype.checkParent = function (p) {
|
|
6080
|
+
if (p) {
|
|
6081
|
+
if (p.children.filter(function (x) { return !x.selected; }).length > 0) {
|
|
6082
|
+
p.selected = null;
|
|
6106
6083
|
}
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
var this_1 = this;
|
|
6110
|
-
try {
|
|
6111
|
-
for (var chs_2 = __values(chs), chs_2_1 = chs_2.next(); !chs_2_1.done; chs_2_1 = chs_2.next()) {
|
|
6112
|
-
var r = chs_2_1.value;
|
|
6113
|
-
_loop_1(r);
|
|
6084
|
+
else {
|
|
6085
|
+
p.selected = true;
|
|
6114
6086
|
}
|
|
6087
|
+
this.checkParent(p.parent);
|
|
6115
6088
|
}
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6089
|
+
};
|
|
6090
|
+
FormTreeComponent.prototype.unCheckParent = function (p) {
|
|
6091
|
+
if (p) {
|
|
6092
|
+
if (p.children.filter(function (x) { return x.selected || x.selected == null; }).length > 0) {
|
|
6093
|
+
p.selected = null;
|
|
6120
6094
|
}
|
|
6121
|
-
|
|
6095
|
+
else {
|
|
6096
|
+
p.selected = false;
|
|
6097
|
+
}
|
|
6098
|
+
this.unCheckParent(p.parent);
|
|
6122
6099
|
}
|
|
6123
6100
|
};
|
|
6124
6101
|
return FormTreeComponent;
|
|
@@ -6126,7 +6103,7 @@
|
|
|
6126
6103
|
FormTreeComponent.decorators = [
|
|
6127
6104
|
{ type: core.Component, args: [{
|
|
6128
6105
|
selector: 'lib-form-tree',
|
|
6129
|
-
template: "<div #inputDiv [id]=\"inp.name + 'Input'\" [className]=\"'form-input-con tree w-100' + (inp.error == null ? '' : ' error') + (inp.disabled ? ' disabled' : '') + ' ' + inp.class\">\r\n <div class=\"form-input\" (click)=\"onClick()\">\r\n <div *ngIf=\"inp.displayLabel\" class=\"label\"><i *ngIf=\"inp.required\" class=\"fas fa-star-of-life required-icon\"></i>{{inp.getLabel()}}</div>\r\n <input #inputBase type=\"checkbox\" class=\"input-base\" (keydown)=\"onKeyDown($event)\" (focusin)=\"onFocusIn()\">\r\n <div [className]=\"(inp.loading ? 'o-h ' : '') + 'control'\">\r\n <i *ngIf=\"inp.icon != null || inp.loading\" #inputIcon [className]=\"(inp.loading ? 'fa-duotone fa-spin fa-spinner' : inp.icon) + ' icon'\"></i>\r\n <i *ngIf=\"inp.withClear && inp.value\" (click)=\"inp.clear()\" class=\"fa-duotone fa-eraser clear-icon\"></i>\r\n <lib-form-tree-item [level]=\"0\" [index]=\"i\" [item]=\"item\" [tree]=\"inp\" [base]=\"true\" *ngFor=\"let item of inp.rows; let i = index\"></lib-form-tree-item>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
6106
|
+
template: "<div #inputDiv [id]=\"inp.name + 'Input'\" [className]=\"'form-input-con tree w-100' + (inp.error == null ? '' : ' error') + (inp.disabled ? ' disabled' : '') + ' ' + inp.class\">\r\n <div class=\"form-input\" (click)=\"onClick()\">\r\n <div *ngIf=\"inp.displayLabel\" class=\"label\"><i *ngIf=\"inp.required\" class=\"fas fa-star-of-life required-icon\"></i>{{inp.getLabel()}}</div>\r\n <input #inputBase type=\"checkbox\" class=\"input-base\" (keydown)=\"onKeyDown($event)\" (focusin)=\"onFocusIn()\">\r\n <div [className]=\"(inp.loading ? 'o-h ' : '') + 'control'\">\r\n <i *ngIf=\"inp.icon != null || inp.loading\" #inputIcon [className]=\"(inp.loading ? 'fa-duotone fa-spin fa-spinner' : inp.icon) + ' icon'\"></i>\r\n <i *ngIf=\"inp.withClear && inp.value\" (click)=\"inp.clear()\" class=\"fa-duotone fa-eraser clear-icon\"></i>\r\n <lib-form-tree-item [level]=\"0\" [index]=\"i\" (toggle)=\"toggle($event)\" [item]=\"item\" [tree]=\"inp\" [base]=\"true\" *ngFor=\"let item of inp.rows; let i = index\"></lib-form-tree-item>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
6130
6107
|
styles: [".form-input-con.tree{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;padding:0 15px;position:relative}.form-input-con.tree .form-input{float:right;position:relative;width:100%}.form-input-con.tree .form-input .label{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;cursor:default;direction:rtl;float:right;font-size:12px;height:20px;line-height:20px;margin-bottom:3px;padding:0 10px;text-align:right;width:100%}.form-input-con.tree.error .form-input .label{color:var(--red);font-size:10px}.form-input-con.tree .form-input .label .required-icon{color:var(--red);font-size:9px;height:20px;line-height:20px;text-align:center;width:20px}.form-input-con.tree .form-input>.control{background-color:#fff;border:var(--border-input);border-radius:var(--border-radius-base);float:right;max-height:400px;min-height:35px;overflow-x:hidden;overflow-y:auto;padding:10px;position:relative;width:100%}.form-input-con.tree.without-border .form-input>.control{border:unset}.form-input-con.tree:not(.without-border) .form-input .input-base:focus+.control,.form-input-con.tree:not(.without-border) .form-input:hover .control{border:var(--border-input-dark)}.form-input-con.tree.error .form-input .input-base:focus+.control,.form-input-con.tree.error .form-input:hover .control{border:var(--border-input-red-dark)}.form-input-con.tree .form-input .input-base{cursor:pointer;height:0;opacity:0;position:absolute;right:50%;top:50%;width:0;z-index:1}.form-input-con.tree .form-input i.icon{color:var(--primary);cursor:default;left:0;line-height:35px;top:0;z-index:1}.form-input-con.tree .form-input i.clear-icon,.form-input-con.tree .form-input i.icon{font-size:14px;height:35px;position:absolute;text-align:center;transition:all .35s ease-in-out;width:35px}.form-input-con.tree .form-input i.clear-icon{bottom:0;color:var(--red);cursor:pointer;line-height:38px;right:0;z-index:3}.form-input-con.tree.error .form-input>.control{border:var(--border-input-red)}.form-input-con.tree.error .form-input i.icon{color:var(--red)}"]
|
|
6131
6108
|
},] }
|
|
6132
6109
|
];
|
|
@@ -6702,12 +6679,12 @@
|
|
|
6702
6679
|
}
|
|
6703
6680
|
LoginComponent.prototype.ngOnInit = function () {
|
|
6704
6681
|
var _this = this;
|
|
6682
|
+
var rules = new InputClass(this.config.environment, this.login.l, 'Rules', null, exports.InputType.Label, 'm-t-10', this.login.rules);
|
|
6705
6683
|
if (this.login.type === 'Sms') {
|
|
6706
6684
|
var sendCodeForm_1 = new FormClass(this.config.environment, this.login.l, 'SendCode', true, this.login.sendCodeUrl);
|
|
6707
6685
|
var sendCode = new InputClass(this.config.environment, this.login.l, 'SendCode', 'fa-duotone fa-paper-plane', exports.InputType.Submit, 'h-45' + (this.loginTemplate === 'Simple' ? ' primary' : ''));
|
|
6708
6686
|
sendCodeForm_1.subName = 'SendCodeSubTitle';
|
|
6709
6687
|
this.mobile = new InputClass(this.config.environment, this.login.l, 'Mobile', 'fa-duotone fa-mobile-alt', exports.InputType.Mobile, 'm-b-20 h-45', '', true, 4, 50);
|
|
6710
|
-
var rules = new InputClass(this.config.environment, this.login.l, 'Rules', null, exports.InputType.Label, 'm-t-10', this.login.rules);
|
|
6711
6688
|
sendCodeForm_1.onSuccess = function () {
|
|
6712
6689
|
loginForm_1.subName = _this.login.l('LoginSmsSubTitle', _this.mobile.data());
|
|
6713
6690
|
_this.mobile.type = exports.InputType.Hidden;
|
|
@@ -6817,7 +6794,7 @@
|
|
|
6817
6794
|
this.username,
|
|
6818
6795
|
password,
|
|
6819
6796
|
login
|
|
6820
|
-
];
|
|
6797
|
+
].concat(this.login.rules != null ? [rules] : []);
|
|
6821
6798
|
login.onClick = function () {
|
|
6822
6799
|
loginForm_2.submit();
|
|
6823
6800
|
};
|