ps-toolkit-ui 1.14.24 → 1.14.26
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 +49 -12
- 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/form.class.js +3 -2
- package/esm2015/lib/components/calendar/calendar.component.js +6 -5
- package/esm2015/lib/components/form/date/form.date.component.js +40 -5
- package/esm2015/lib/components/form/file/form.file.component.js +1 -1
- package/esm2015/lib/components/table/table.component.js +3 -3
- package/fesm2015/ps-toolkit-ui.js +49 -12
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/form.class.d.ts +2 -1
- package/lib/components/form/date/form.date.component.d.ts +1 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -2438,10 +2438,11 @@
|
|
|
2438
2438
|
return OptionClass;
|
|
2439
2439
|
}());
|
|
2440
2440
|
var DayClass = /** @class */ (function () {
|
|
2441
|
-
function DayClass(day, today, selected) {
|
|
2441
|
+
function DayClass(day, today, selected, active) {
|
|
2442
2442
|
this.day = day;
|
|
2443
2443
|
this.today = today;
|
|
2444
2444
|
this.selected = selected;
|
|
2445
|
+
this.active = active;
|
|
2445
2446
|
}
|
|
2446
2447
|
return DayClass;
|
|
2447
2448
|
}());
|
|
@@ -3708,8 +3709,8 @@
|
|
|
3708
3709
|
TableComponent.decorators = [
|
|
3709
3710
|
{ type: core.Component, args: [{
|
|
3710
3711
|
selector: 'lib-table',
|
|
3711
|
-
template: "<div [id]=\"table.id + 'Table'\" [style]=\"table.style\" #tableDiv [className]=\"(table.class ? table.class : '') + (table.sortable ? 'sortable' : '') + (table.hasChildren ? ' has-children' : '') + ' table-con'\">\r\n <div *ngIf=\"table.displayLabel\" class=\"title\">\r\n <div class=\"f-r\">{{this.table.title ? this.table.title : table.l('List')}}</div>\r\n <span class=\"description\" *ngIf=\"this.table.description != null\" [innerHTML]=\"'( ' + this.table.description + ' )'\"></span>\r\n <div class=\"extra-buttons\" *ngIf=\"table.showExtraButtons\">\r\n <span *ngIf=\"isSelected()\">\r\n <lib-form-icon *ngFor=\"let btn of table.extraButtons\" [inp]=\"btn\"></lib-form-icon>\r\n </span>\r\n <span *ngIf=\"!isSelected()\">\r\n <lib-form-icon [inp]=\"reload\"></lib-form-icon>\r\n <lib-form-icon [inp]=\"maximum\"></lib-form-icon>\r\n </span>\r\n </div>\r\n <div *ngIf=\"table.buttons.length > 0\" class=\"buttons\">\r\n <span *ngFor=\"let btn of table.buttons\">\r\n <lib-form-button [inp]=\"btn\" *ngIf=\"btn.type == type.Button\"></lib-form-button>\r\n <lib-form-label [inp]=\"btn\" *ngIf=\"btn.type == type.Label\"></lib-form-label>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"search-form\" *ngIf=\"table.searchForm\">\r\n <lib-form [form]=\"table.searchForm\"></lib-form>\r\n </div>\r\n <lib-form *ngIf=\"table.form && table.form.onTop\" [form]=\"table.form\"></lib-form>\r\n <div class=\"table\">\r\n <div class=\"header\">\r\n <div [className]=\"(table.hasChildren ? 'with-handle-children ' : '') + (table.sortable ? 'with-handle-sortable ' : '') + (table.withSelect ? 'with-handle-select ' : '') + 'row'\">\r\n <div class=\"handle-con\">\r\n <div class=\"handle handle-sortable\" *ngIf=\"table.sortable\"></div>\r\n <div class=\"handle handle-select\" *ngIf=\"table.hasChildren\"></div>\r\n <div class=\"handle handle-children\" *ngIf=\"table.withSelect\">\r\n <i (click)=\"selectAll()\" [className]=\"(allSelected() ? 'fa-solid fa-square-check c-green' : isSelected() ? 'fa-solid fa-square-minus c-green' : 'fa-regular fa-square') + ' select-row'\" *ngIf=\"table.rows.length > 0\"></i>\r\n </div>\r\n </div>\r\n <div (click)=\"!table.sortable && col.sort && changeSort($event, col.name)\" [className]=\"(!table.sortable && col.sort ? 'sort ' : '') + col.class + ' ' + col.name + '-cell cell w-100'\" *ngFor=\"let col of table.cols\">\r\n <div class=\"header-title\" *ngIf=\"col.search == null || table.sortable\" [innerHTML]=\"table.l(col.name)\"></div>\r\n <div class=\"header-search\" *ngIf=\"!table.sortable && col.search != null\">\r\n <lib-form-textbox *ngIf=\"col.type != colType.Date && col.type != colType.DateTime && col.type != colType.Month && col.enum == null\" [inp]=\"col.search\"></lib-form-textbox>\r\n <lib-form-date *ngIf=\"(col.type == colType.Date || col.type == colType.DateTime || col.type == colType.Month) && col.enum == null\" [inp]=\"col.search\"></lib-form-date>\r\n <lib-form-select *ngIf=\"col.enum != null\" [inp]=\"col.search\"></lib-form-select>\r\n </div>\r\n <i *ngIf=\"!table.sortable && col.sort\" [className]=\"'sort-icon fas' + (table.sort === col.name ? (table.sortType === 'ASC' ? ' fa-sort-up' : ' fa-sort-down') : ' fa-sort')\"></i>\r\n </div>\r\n <div class=\"cell options\" *ngIf=\"table.optionType == tableOptionType.Show\">{{table.l('Options')}}</div>\r\n </div>\r\n </div>\r\n <div class=\"body\" #rows [style]=\"table.perPage > 0 ? {minHeight: table.height * table.perPage + 'px'} : {minHeight: '120px'}\">\r\n <lib-table-row (confirmShow)=\"onConfirmShow($event)\" [level]=\"1\" (changeRows)=\"onChangeRows($event)\" [id]=\"row.id ? row.id : ''\" [table]=\"table\" [row]=\"row\" *ngFor=\"let row of getRows()\"></lib-table-row>\r\n <lib-table-loading [table]=\"table\"></lib-table-loading>\r\n </div>\r\n </div>\r\n <lib-table-pagination [table]=\"table\" *ngIf=\"table.perPage > 0\"></lib-table-pagination>\r\n <lib-modal *ngIf=\"table.modal != null\" [modal]=\"table.modal\"></lib-modal>\r\n <lib-modal [modal]=\"opt\" *ngFor=\"let opt of getModals()\"></lib-modal>\r\n <lib-confirm #confirm [tableId]=\"table.name\"></lib-confirm>\r\n</div>\r\n",
|
|
3712
|
-
styles: [".table-con{background-color:#fff;border-radius:var(--border-radius-base);box-shadow:var(--box-shadow-table);float:right;padding:20px;position:relative
|
|
3712
|
+
template: "<div [id]=\"table.id + 'Table'\" [style]=\"table.style\" #tableDiv [className]=\"(table.class ? table.class : '') + (table.sortable ? 'sortable' : '') + (table.hasChildren ? ' has-children' : '') + ' table-con w-100'\">\r\n <div *ngIf=\"table.displayLabel\" class=\"title\">\r\n <div class=\"f-r\">{{this.table.title ? this.table.title : table.l('List')}}</div>\r\n <span class=\"description\" *ngIf=\"this.table.description != null\" [innerHTML]=\"'( ' + this.table.description + ' )'\"></span>\r\n <div class=\"extra-buttons\" *ngIf=\"table.showExtraButtons\">\r\n <span *ngIf=\"isSelected()\">\r\n <lib-form-icon *ngFor=\"let btn of table.extraButtons\" [inp]=\"btn\"></lib-form-icon>\r\n </span>\r\n <span *ngIf=\"!isSelected()\">\r\n <lib-form-icon [inp]=\"reload\"></lib-form-icon>\r\n <lib-form-icon [inp]=\"maximum\"></lib-form-icon>\r\n </span>\r\n </div>\r\n <div *ngIf=\"table.buttons.length > 0\" class=\"buttons\">\r\n <span *ngFor=\"let btn of table.buttons\">\r\n <lib-form-button [inp]=\"btn\" *ngIf=\"btn.type == type.Button\"></lib-form-button>\r\n <lib-form-label [inp]=\"btn\" *ngIf=\"btn.type == type.Label\"></lib-form-label>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"search-form\" *ngIf=\"table.searchForm\">\r\n <lib-form [form]=\"table.searchForm\"></lib-form>\r\n </div>\r\n <lib-form *ngIf=\"table.form && table.form.onTop\" [form]=\"table.form\"></lib-form>\r\n <div class=\"table\">\r\n <div class=\"header\">\r\n <div [className]=\"(table.hasChildren ? 'with-handle-children ' : '') + (table.sortable ? 'with-handle-sortable ' : '') + (table.withSelect ? 'with-handle-select ' : '') + 'row'\">\r\n <div class=\"handle-con\">\r\n <div class=\"handle handle-sortable\" *ngIf=\"table.sortable\"></div>\r\n <div class=\"handle handle-select\" *ngIf=\"table.hasChildren\"></div>\r\n <div class=\"handle handle-children\" *ngIf=\"table.withSelect\">\r\n <i (click)=\"selectAll()\" [className]=\"(allSelected() ? 'fa-solid fa-square-check c-green' : isSelected() ? 'fa-solid fa-square-minus c-green' : 'fa-regular fa-square') + ' select-row'\" *ngIf=\"table.rows.length > 0\"></i>\r\n </div>\r\n </div>\r\n <div (click)=\"!table.sortable && col.sort && changeSort($event, col.name)\" [className]=\"(!table.sortable && col.sort ? 'sort ' : '') + col.class + ' ' + col.name + '-cell cell w-100'\" *ngFor=\"let col of table.cols\">\r\n <div class=\"header-title\" *ngIf=\"col.search == null || table.sortable\" [innerHTML]=\"table.l(col.name)\"></div>\r\n <div class=\"header-search\" *ngIf=\"!table.sortable && col.search != null\">\r\n <lib-form-textbox *ngIf=\"col.type != colType.Date && col.type != colType.DateTime && col.type != colType.Month && col.enum == null\" [inp]=\"col.search\"></lib-form-textbox>\r\n <lib-form-date *ngIf=\"(col.type == colType.Date || col.type == colType.DateTime || col.type == colType.Month) && col.enum == null\" [inp]=\"col.search\"></lib-form-date>\r\n <lib-form-select *ngIf=\"col.enum != null\" [inp]=\"col.search\"></lib-form-select>\r\n </div>\r\n <i *ngIf=\"!table.sortable && col.sort\" [className]=\"'sort-icon fas' + (table.sort === col.name ? (table.sortType === 'ASC' ? ' fa-sort-up' : ' fa-sort-down') : ' fa-sort')\"></i>\r\n </div>\r\n <div class=\"cell options\" *ngIf=\"table.optionType == tableOptionType.Show\">{{table.l('Options')}}</div>\r\n </div>\r\n </div>\r\n <div class=\"body\" #rows [style]=\"table.perPage > 0 ? {minHeight: table.height * table.perPage + 'px'} : {minHeight: '120px'}\">\r\n <lib-table-row (confirmShow)=\"onConfirmShow($event)\" [level]=\"1\" (changeRows)=\"onChangeRows($event)\" [id]=\"row.id ? row.id : ''\" [table]=\"table\" [row]=\"row\" *ngFor=\"let row of getRows()\"></lib-table-row>\r\n <lib-table-loading [table]=\"table\"></lib-table-loading>\r\n </div>\r\n </div>\r\n <lib-table-pagination [table]=\"table\" *ngIf=\"table.perPage > 0\"></lib-table-pagination>\r\n <lib-modal *ngIf=\"table.modal != null\" [modal]=\"table.modal\"></lib-modal>\r\n <lib-modal [modal]=\"opt\" *ngFor=\"let opt of getModals()\"></lib-modal>\r\n <lib-confirm #confirm [tableId]=\"table.name\"></lib-confirm>\r\n</div>\r\n",
|
|
3713
|
+
styles: [".table-con{background-color:#fff;border-radius:var(--border-radius-base);box-shadow:var(--box-shadow-table);float:right;padding:20px;position:relative}.table-con.maximum{border-radius:0;height:100%;overflow-y:auto;position:fixed;right:0;top:0;width:100%;z-index:102}.table-con>.title{float:right;font-size:16px;font-weight:700;line-height:40px;margin-bottom:10px;position:relative;text-align:right;width:100%}.table-con>.title .description{font-size:13px;font-weight:200;margin-right:10px}.table-con>.title .buttons,.table-con>.title .extra-buttons{float:left;margin-top:5px;position:relative;z-index:1}.table-con>.title .extra-buttons{min-width:80px}.table-con>.search-form{border-radius:var(--border-radius-base);float:right;margin-bottom:10px;width:100%}.table-con .table,.table-con .table .header{float:right;width:100%}.table-con .table .header .row{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;align-items:center;background-color:var(--base-white);border-radius:var(--border-radius-base);display:flex;flex-wrap:wrap;float:right;justify-content:right;position:relative;width:100%}.table-con .table .header .row.with-handle-children,.table-con .table .header .row.with-handle-select,.table-con .table .header .row.with-handle-sortable{padding-right:30px}.table-con .table .header .row.with-handle-children.with-handle-select,.table-con .table .header .row.with-handle-sortable.with-handle-children,.table-con .table .header .row.with-handle-sortable.with-handle-select{padding-right:60px}.table-con .table .header .row.with-handle-sortable.with-handle-children.with-handle-select{padding-right:90px}.table-con .table .header .row .cell{align-items:center;color:var(--black-light);display:flex;float:right;font-size:12px;font-weight:200;font-weight:400;height:45px;justify-content:center;position:relative}.table-con .table .header .row .cell.options{margin-left:auto;margin-right:auto}.table-con .table .header .row .handle-con{height:100%;position:absolute;right:0;top:0}.table-con .table .header .row .handle-con .handle{align-items:center;display:flex;float:right;height:100%;justify-content:center;width:30px}.table-con .table .header .row .handle-con .handle i{cursor:pointer;font-size:18px}.table-con .table .header .row .cell.sort{cursor:pointer}.table-con .table .header .row .cell .header-title{float:right;padding:0 15px;text-align:center;width:calc(100% - 20px)}.table-con .table .header .row .cell .header-search{float:right;width:calc(100% - 20px)}.table-con .table .header .row .cell .sort-icon{float:right;font-size:13px;height:20px;left:5px;line-height:20px;opacity:.6;top:calc(50% - 10px);width:20px}.table-con .table .body{float:right;position:relative;width:100%}::ng-deep .table-con:not(.sortable) .table lib-table-row:last-of-type>.row-con>.row:after{background-image:unset}::ng-deep .table-con .table .header .row .cell .select-row{cursor:pointer;font-size:18px;height:30px;line-height:30px}"]
|
|
3713
3714
|
},] }
|
|
3714
3715
|
];
|
|
3715
3716
|
TableComponent.ctorParameters = function () { return [
|
|
@@ -4181,16 +4182,19 @@
|
|
|
4181
4182
|
var days = [];
|
|
4182
4183
|
if (startWeek !== 6) {
|
|
4183
4184
|
for (var i = countDayInPreviousMonth - startWeek; i <= countDayInPreviousMonth; i++) {
|
|
4184
|
-
previousDays.push(new DayClass(i, this.isToday(previousMonth, i), false));
|
|
4185
|
+
previousDays.push(new DayClass(i, this.isToday(previousMonth, i), false, false));
|
|
4185
4186
|
}
|
|
4186
4187
|
}
|
|
4187
4188
|
for (var i = 1; i <= countDayInMonth; i++) {
|
|
4188
|
-
|
|
4189
|
+
var isActive = true;
|
|
4190
|
+
if (this.inp.allowed != null) {
|
|
4191
|
+
}
|
|
4192
|
+
days.push(new DayClass(i, this.isToday(this.active, i), this.isSelected(this.active, i), isActive));
|
|
4189
4193
|
}
|
|
4190
4194
|
var end = (days.length + previousDays.length) % 7;
|
|
4191
4195
|
if (end !== 0) {
|
|
4192
4196
|
for (var i = 1; i <= 7 - end; i++) {
|
|
4193
|
-
nextDays.push(new DayClass(i, this.isToday(nextMonth, i), false));
|
|
4197
|
+
nextDays.push(new DayClass(i, this.isToday(nextMonth, i), false, false));
|
|
4194
4198
|
}
|
|
4195
4199
|
}
|
|
4196
4200
|
this.previousDays = previousDays;
|
|
@@ -4202,6 +4206,38 @@
|
|
|
4202
4206
|
var year = parseInt(m.format('jYYYY'), 10);
|
|
4203
4207
|
return year === this.todayYear && month === this.todayMonth && d === this.todayDay;
|
|
4204
4208
|
};
|
|
4209
|
+
FormDateComponent.prototype.isActive = function (m, d) {
|
|
4210
|
+
var _a, _b, _c, _d;
|
|
4211
|
+
var month = parseInt(m.format('jMM'), 10);
|
|
4212
|
+
var year = parseInt(m.format('jYYYY'), 10);
|
|
4213
|
+
var start = (_b = (_a = this.inp.allowed.start) === null || _a === void 0 ? void 0 : _a.locale('fa')) !== null && _b !== void 0 ? _b : null;
|
|
4214
|
+
var end = (_d = (_c = this.inp.allowed.end) === null || _c === void 0 ? void 0 : _c.locale('fa')) !== null && _d !== void 0 ? _d : null;
|
|
4215
|
+
console.log(start, end);
|
|
4216
|
+
console.log({
|
|
4217
|
+
year: {
|
|
4218
|
+
start: start.format('jYYYY'),
|
|
4219
|
+
end: end.format('jYYYY'),
|
|
4220
|
+
year: year
|
|
4221
|
+
},
|
|
4222
|
+
month: {
|
|
4223
|
+
start: start.format('jMM'),
|
|
4224
|
+
end: end.format('jMM'),
|
|
4225
|
+
year: year
|
|
4226
|
+
},
|
|
4227
|
+
day: {
|
|
4228
|
+
start: start.format('jDD'),
|
|
4229
|
+
end: end.format('jDD'),
|
|
4230
|
+
d: d
|
|
4231
|
+
},
|
|
4232
|
+
});
|
|
4233
|
+
if (start !== null && (parseInt(start.format('jYYYY'), 10) < year || parseInt(start.format('jMM'), 10) < month || parseInt(start.format('jDD'), 10) < d)) {
|
|
4234
|
+
return false;
|
|
4235
|
+
}
|
|
4236
|
+
if (end !== null && (parseInt(end.format('jYYYY'), 10) > year || parseInt(end.format('jMM'), 10) > month || parseInt(end.format('jDD'), 10) > d)) {
|
|
4237
|
+
return false;
|
|
4238
|
+
}
|
|
4239
|
+
return true;
|
|
4240
|
+
};
|
|
4205
4241
|
FormDateComponent.prototype.isSelected = function (m, d) {
|
|
4206
4242
|
if (this.inp.value == null) {
|
|
4207
4243
|
return false;
|
|
@@ -4338,7 +4374,7 @@
|
|
|
4338
4374
|
FormDateComponent.decorators = [
|
|
4339
4375
|
{ type: core.Component, args: [{
|
|
4340
4376
|
selector: 'lib-form-date',
|
|
4341
|
-
template: "<div #inputDiv [id]=\"inp.id + 'DateInput'\" [style]=\"inp.style\" [className]=\"'form-input-con date w-100' + (inp.error == null ? '' : ' error') + (inp.disabled ? ' disabled' : '') + ' ' + inp.class\">\r\n <div class=\"form-input\" (click)=\"toggleCalendar()\">\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 <div class=\"w-100 p-r\">\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 <input (keydown)=\"onKeyDown($event)\" (keyup)=\"onKeyUp($event)\" (focusout)=\"onFocusOut()\" [disabled]=\"inp.disabled\" [(ngModel)]=\"inp.search\" #inputBase [name]=\"inp.name\" [placeholder]=\"inp.l(inp.name)\" class=\"control\" autocomplete=\"off\" maxlength=\"\">\r\n <div #inputCalendarDiv class=\"calendar\">\r\n <div class=\"header\">\r\n <i (click)=\"add(state === 'day' || state === 'month' ? -1 : -20)\" class=\"fas fa-angle-right previous-month\"></i>\r\n <div class=\"title\">\r\n <div (click)=\"(state === 'day' || state === 'month') && changeState('year')\" class=\"year header-item\">\r\n {{active.format('jYYYY')}}\r\n </div>\r\n <div (click)=\"state === 'day' && changeState('month')\" class=\"month header-item\">\r\n {{getActiveMonth()}}\r\n </div>\r\n </div>\r\n <i (click)=\"add(state === 'day' || state === 'month' ? 1 : 20)\" class=\"fas fa-angle-left next-month\"></i>\r\n </div>\r\n <div [style]=\"state === 'day' ? {} : {display: 'none'}\" class=\"days-con\">\r\n <div class=\"day-names underline\">\r\n <div class=\"item\">\u0634</div>\r\n <div class=\"item\">\u06CC</div>\r\n <div class=\"item\">\u062F</div>\r\n <div class=\"item\">\u0633</div>\r\n <div class=\"item\">\u0686</div>\r\n <div class=\"item\">\u067E</div>\r\n <div class=\"item\">\u062C</div>\r\n </div>\r\n <div class=\"days\">\r\n <div [className]=\"'item not-in-month' + (d.today ? ' today' : '')\" *ngFor=\"let d of previousDays\">{{d.day}}</div>\r\n <div (click)=\"selectDate(d)\" [className]=\"'item' + (d.today ? ' today' : '') + (d.selected ? ' selected' : '')\" *ngFor=\"let d of days\">{{d.day}}</div>\r\n <div [className]=\"'item not-in-month' + (d.today ? ' today' : '')\" *ngFor=\"let d of nextDays\">{{d.day}}</div>\r\n </div>\r\n </div>\r\n <div [style]=\"state === 'month' ? {} : {display: 'none'}\" class=\"months-con\">\r\n <div [className]=\"(i + 1 == active.format('jM') ? 'selected ' : '') + 'month'\" (click)=\"changeMonth(i + 1)\" *ngFor=\"let m of months; let i = index\">{{m}}</div>\r\n </div>\r\n <div [style]=\"state === 'year' ? {} : {display: 'none'}\" class=\"years-con\">\r\n <div [className]=\"(y == active.format('jYYYY') ? 'selected ' : '') + 'year'\" (click)=\"changeYear(y)\" *ngFor=\"let y of getYears()\">{{y}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
4377
|
+
template: "<div #inputDiv [id]=\"inp.id + 'DateInput'\" [style]=\"inp.style\" [className]=\"'form-input-con date w-100' + (inp.error == null ? '' : ' error') + (inp.disabled ? ' disabled' : '') + ' ' + inp.class\">\r\n <div class=\"form-input\" (click)=\"toggleCalendar()\">\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 <div class=\"w-100 p-r\">\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 <input (keydown)=\"onKeyDown($event)\" (keyup)=\"onKeyUp($event)\" (focusout)=\"onFocusOut()\" [disabled]=\"inp.disabled\" [(ngModel)]=\"inp.search\" #inputBase [name]=\"inp.name\" [placeholder]=\"inp.l(inp.name)\" class=\"control\" autocomplete=\"off\" maxlength=\"\">\r\n <div #inputCalendarDiv class=\"calendar\">\r\n <div class=\"header\">\r\n <i (click)=\"add(state === 'day' || state === 'month' ? -1 : -20)\" class=\"fas fa-angle-right previous-month\"></i>\r\n <div class=\"title\">\r\n <div (click)=\"(state === 'day' || state === 'month') && changeState('year')\" class=\"year header-item\">\r\n {{active.format('jYYYY')}}\r\n </div>\r\n <div (click)=\"state === 'day' && changeState('month')\" class=\"month header-item\">\r\n {{getActiveMonth()}}\r\n </div>\r\n </div>\r\n <i (click)=\"add(state === 'day' || state === 'month' ? 1 : 20)\" class=\"fas fa-angle-left next-month\"></i>\r\n </div>\r\n <div [style]=\"state === 'day' ? {} : {display: 'none'}\" class=\"days-con\">\r\n <div class=\"day-names underline\">\r\n <div class=\"item\">\u0634</div>\r\n <div class=\"item\">\u06CC</div>\r\n <div class=\"item\">\u062F</div>\r\n <div class=\"item\">\u0633</div>\r\n <div class=\"item\">\u0686</div>\r\n <div class=\"item\">\u067E</div>\r\n <div class=\"item\">\u062C</div>\r\n </div>\r\n <div class=\"days\">\r\n <div [className]=\"'item not-in-month' + (d.today ? ' today' : '')\" *ngFor=\"let d of previousDays\">{{d.day}}</div>\r\n <div (click)=\"selectDate(d)\" [className]=\"'item' + (d.today ? ' today' : '') + (d.selected ? ' selected' : '') + (!d.active ? ' not-in-month' : '')\" *ngFor=\"let d of days\">{{d.day}}</div>\r\n <div [className]=\"'item not-in-month' + (d.today ? ' today' : '')\" *ngFor=\"let d of nextDays\">{{d.day}}</div>\r\n </div>\r\n </div>\r\n <div [style]=\"state === 'month' ? {} : {display: 'none'}\" class=\"months-con\">\r\n <div [className]=\"(i + 1 == active.format('jM') ? 'selected ' : '') + 'month'\" (click)=\"changeMonth(i + 1)\" *ngFor=\"let m of months; let i = index\">{{m}}</div>\r\n </div>\r\n <div [style]=\"state === 'year' ? {} : {display: 'none'}\" class=\"years-con\">\r\n <div [className]=\"(y == active.format('jYYYY') ? 'selected ' : '') + 'year'\" (click)=\"changeYear(y)\" *ngFor=\"let y of getYears()\">{{y}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
4342
4378
|
styles: [".form-input-con.date{padding:0 15px;position:relative}.form-input-con.date .form-input{float:right;position:relative;width:100%}.form-input-con.date .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.date.error .form-input .label{color:var(--red);font-size:10px}.form-input-con.date .form-input .label .required-icon{color:var(--red);font-size:9px;height:20px;line-height:20px;text-align:center;width:20px}.form-input-con.date .form-input .control{background-color:#fff;background-image:none;border:none;border:var(--border-input);border-radius:var(--border-radius-base);color:var(--black);display:block;font-size:11px;height:35px;padding:5px 35px;position:relative;text-align:center;width:100%;z-index:2}.form-input-con.date .form-input .control:focus{border-radius:var(--border-radius-base) var(--border-radius-base) var(--border-radius-base) 0}.form-input-con.date.top .form-input .control:focus{border-radius:0 var(--border-radius-base) var(--border-radius-base) var(--border-radius-base)}.form-input-con.date .form-input .control:focus,.form-input-con.date .form-input:hover .control{border:var(--border-input-dark);outline:none}.form-input-con.date .form-input i.icon{color:var(--primary);cursor:text;font-size:13px;left:0;line-height:35px}.form-input-con.date .form-input i.clear-icon,.form-input-con.date .form-input i.icon{bottom:0;height:35px;position:absolute;text-align:center;transition:all .35s ease-in-out;width:35px;z-index:3}.form-input-con.date .form-input i.clear-icon{color:var(--red);cursor:pointer;font-size:14px;line-height:38px;right:0}.form-input-con.date.disabled .form-input .control,.form-input-con.date.disabled .form-input .label,.form-input-con.date.disabled .form-input i.icon{cursor:default;filter:blur(.5px);opacity:.7}.form-input-con.date.error .form-input .control,.form-input-con.date.error .form-input i.icon{color:var(--red-light)}.form-input-con.date.error .form-input .control{border:var(--border-input-red)}.form-input-con.date.error .form-input .control:focus,.form-input-con.date.error .form-input:hover .control{border:var(--border-input-red-dark)}.form-input-con.date .form-input .calendar{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;background-color:#fff;border:var(--border-input);border-radius:0 0 var(--border-radius-base) var(--border-radius-base);color:var(--black);height:235px;left:0;overflow:hidden;position:absolute;top:-200000px;width:200px;z-index:102}.form-input-con.date .form-input .control:focus+.calendar{top:35px!important}.form-input-con.date.top .form-input .control:focus+.calendar{border-radius:var(--border-radius-base) var(--border-radius-base) 0 0;bottom:35px;top:unset!important}.form-input-con.date .form-input .days-con{float:right;width:100%}.form-input-con.date .form-input .calendar .header{background:var(--black-white);float:right;width:100%}.form-input-con.date .form-input .calendar .header .next-month,.form-input-con.date .form-input .calendar .header .previous-month{cursor:pointer;float:right;font-size:15px;height:30px;line-height:30px;text-align:center;width:30px}.form-input-con.date .form-input .calendar .header .next-month:hover,.form-input-con.date .form-input .calendar .header .previous-month:hover{background:var(--black-white)}.form-input-con.date .form-input .calendar .header .title{float:right;font-size:12px;font-weight:700;height:30px;line-height:30px;text-align:center;width:calc(100% - 60px)}.form-input-con.date .form-input .calendar .header .header-item{background-color:#fff;border:var(--border-input);border-radius:var(--border-radius-base);cursor:pointer;float:right;height:20px;line-height:20px;margin-right:5px;margin-top:5px;text-align:center}.form-input-con.date .form-input .calendar .header .header-item:hover{background-color:var(--base-white)}.form-input-con.date .form-input .calendar .header .header-item.year{width:calc(40% - 10px)}.form-input-con.date .form-input .calendar .header .header-item.month{width:calc(60% - 10px)}.form-input-con.date .form-input .calendar .days-con .day-names{float:right;font-size:12px;font-weight:200;position:relative;text-align:center;width:100%}.form-input-con.date .form-input .calendar .days-con .day-names .item{float:right;font-size:12px;height:25px;line-height:25px;text-align:center;width:14.28571%}.form-input-con.date .form-input .calendar .days-con .days{float:right;font-size:12px;text-align:center;width:100%}.form-input-con.date .form-input .calendar .days-con .days .item{cursor:pointer;float:right;font-size:11px;height:30px;line-height:30px;text-align:center;width:14.28571%}.form-input-con.date .form-input .calendar .days-con .days .item.not-in-month{background-color:unset!important;cursor:default;opacity:.5}.form-input-con.date .form-input .calendar .days-con .days .item:hover{background-color:var(--black-white)}.form-input-con.date .form-input .calendar .days-con .days .item.not-in-month:hover{background-color:unset}.form-input-con.date .form-input .calendar .days-con .days .item.today{background-color:var(--black-white)}.form-input-con.date .form-input .calendar .days-con .days .item.selected{background-color:var(--primary);color:#fff}.form-input-con.date .form-input .calendar .months-con{float:right;width:100%}.form-input-con.date .form-input .calendar .months-con .month{cursor:pointer;float:right;font-size:11px;height:51.25px;line-height:51.25px;text-align:center;width:33.33333%}.form-input-con.date .form-input .calendar .months-con .month.selected,.form-input-con.date .form-input .calendar .months-con .month:hover{background-color:var(--black-white)}.form-input-con.date .form-input .calendar .years-con{float:right;width:100%}.form-input-con.date .form-input .calendar .years-con .year{cursor:pointer;float:right;font-size:11px;height:41px;line-height:41px;text-align:center;width:25%}.form-input-con.date .form-input .calendar .years-con .year.selected,.form-input-con.date .form-input .calendar .years-con .year:hover{background-color:var(--black-white)}.form-input-con.date.table-search{float:right;width:100%}.form-input-con.date.h-30 .form-input .control{height:30px;padding:5px 30px}.form-input-con.date.h-30 .form-input i.icon{height:30px;line-height:30px;width:30px}.form-input-con.date.h-30 .form-input .control:focus+.calendar{top:30px!important}.form-input-con.date.top.h-30 .form-input .control:focus+.calendar{bottom:30px}.form-input-con.date.h-25 .form-input .control{height:25px;padding:5px}.form-input-con.date.h-25 .form-input i.icon{display:none}.form-input-con.date.h-25 .form-input .control:focus+.calendar{top:25px!important}.form-input-con.date.top.h-25 .form-input .control:focus+.calendar{bottom:25px}.form-input-con.date.h-25 .form-input .control::-moz-placeholder,.form-input-con.date.h-25 .form-input .control::-webkit-input-placeholder{font-size:10px;font-weight:200}"]
|
|
4343
4379
|
},] }
|
|
4344
4380
|
];
|
|
@@ -4574,7 +4610,7 @@
|
|
|
4574
4610
|
{ type: core.Component, args: [{
|
|
4575
4611
|
selector: 'lib-form-file',
|
|
4576
4612
|
template: "<label #inputDiv [id]=\"id + 'FileInput'\" [for]=\"id + 'FileInputBase'\" [className]=\"'form-input-con file w-100' + (inp.error == null ? '' : ' error') + (inp.disabled || inp.loading ? ' disabled' : '') + (inp.value != null && inp.value != '' ? ' has-value' : '') + ' ' + 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 #inputBaseFile class=\"input-base-file\" type=\"file\" [id]=\"id + 'FileInputBase'\" [multiple]=\"inp.multiple\" (change)=\"onChange($event)\">\r\n <input #inputBase type=\"text\" class=\"input-base\" (keydown)=\"onKeyDown($event)\" (focusin)=\"onFocusIn()\">\r\n <div class=\"control\">\r\n <div class=\"title\">{{title()}}</div>\r\n <div class=\"button\">{{inp.multiple ? inp.l(\"ChooseFiles\") : inp.l(\"ChooseFile\")}}</div>\r\n </div>\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 </div>\r\n</label>\r\n",
|
|
4577
|
-
styles: [".form-input-con.file{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;cursor:pointer;padding:0 15px;position:relative}.form-input-con.file .form-input{float:right;position:relative;width:100%}.form-input-con.file .form-input .input-base,.form-input-con.file .form-input .input-base-file{cursor:pointer;height:0;opacity:0;position:absolute;right:50%;top:50%;width:0;z-index:1}.form-input-con.file .form-input .control{background-color:#fff;border:var(--border-input);border-radius:var(--border-radius-base);float:left;font-size:11px;height:35px;line-height:35px;overflow:hidden;padding:0 135px 0 35px;position:relative;text-align:center;text-overflow:ellipsis;
|
|
4613
|
+
styles: [".form-input-con.file{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;cursor:pointer;padding:0 15px;position:relative}.form-input-con.file .form-input{float:right;position:relative;width:100%}.form-input-con.file .form-input .input-base,.form-input-con.file .form-input .input-base-file{cursor:pointer;height:0;opacity:0;position:absolute;right:50%;top:50%;width:0;z-index:1}.form-input-con.file .form-input .control{background-color:#fff;border:var(--border-input);border-radius:var(--border-radius-base);float:left;font-size:11px;height:35px;line-height:35px;overflow:hidden;padding:0 135px 0 35px;position:relative;text-align:center;text-overflow:ellipsis;width:100%;z-index:2}.form-input-con.file .form-input .control .title{-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box;overflow:hidden}.form-input-con.file .form-input .control:hover,.form-input-con.file .form-input .input-base:focus+.control{border:var(--border-input-dark);outline:none}.form-input-con.file .form-input i.icon{bottom:0;color:var(--primary);font-size:13px;height:35px;left:0;line-height:35px;position:absolute;text-align:center;width:35px;z-index:2}.form-input-con.file .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.file .form-input .label .required-icon{color:var(--red);font-size:9px;height:20px;line-height:20px;text-align:center;width:20px}.form-input-con.file .form-input .control .title{float:right;width:100%}.form-input-con.file .form-input .control .button{background-color:var(--green);border-radius:0 var(--border-radius-base) var(--border-radius-base) 0;bottom:0;color:#fff;font-size:10px;height:35px;line-height:35px;position:absolute;right:0;text-align:center;width:100px;z-index:2}.form-input-con.file .form-input .button:hover,.form-input-con.file .form-input .control:hover .button,.form-input-con.file .form-input .input-base:focus+.control .button{background-color:var(--green-dark)}.form-input-con.file.error .form-input .control{border:var(--border-input-red)}.form-input-con.file.error .form-input .label{color:var(--red);font-size:10px}.form-input-con.file.error .form-input .control,.form-input-con.file.error .form-input .icon{color:var(--red)}.form-input-con.file.disabled{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;box-shadow:unset;cursor:default;filter:blur(.5px);opacity:.7;pointer-events:none}.form-input-con.file.h-40 .form-input .control{font-size:13px;height:40px;line-height:40px}.form-input-con.file.has-value.h-40 .form-input .control{direction:ltr;font-size:9px;height:40px}.form-input-con.file.h-40 .form-input .control .button,.form-input-con.file.h-40 .form-input i.icon{height:40px;line-height:40px}form-input-con.file.h-30 .form-input .control{height:30px;line-height:30px}.form-input-con.file.h-30 .form-input .control{direction:ltr;font-size:9px;height:30px;line-height:30px}.form-input-con.file.h-30 .form-input .control .button,.form-input-con.file.h-30 .form-input i.icon{height:30px;line-height:30px}"]
|
|
4578
4614
|
},] }
|
|
4579
4615
|
];
|
|
4580
4616
|
FormFileComponent.ctorParameters = function () { return []; };
|
|
@@ -7771,7 +7807,8 @@
|
|
|
7771
7807
|
if (v === void 0) { v = null; }
|
|
7772
7808
|
return lang.get('Public', null, key, v);
|
|
7773
7809
|
};
|
|
7774
|
-
this.months = [this.l('Month1'), this.l('Month2'), this.l('Month3'), this.l('Month4'), this.l('Month5'),
|
|
7810
|
+
this.months = [this.l('Month1'), this.l('Month2'), this.l('Month3'), this.l('Month4'), this.l('Month5'),
|
|
7811
|
+
this.l('Month6'), this.l('Month7'), this.l('Month8'), this.l('Month9'), this.l('Month10'), this.l('Month11'), this.l('Month12')];
|
|
7775
7812
|
this.setActive(moment__namespace());
|
|
7776
7813
|
}
|
|
7777
7814
|
CalendarComponent.prototype.changeState = function (s) {
|
|
@@ -7811,16 +7848,16 @@
|
|
|
7811
7848
|
var days = [];
|
|
7812
7849
|
if (startWeek !== 6) {
|
|
7813
7850
|
for (var i = countDayInPreviousMonth - startWeek; i <= countDayInPreviousMonth; i++) {
|
|
7814
|
-
previousDays.push(new DayClass(i, this.isToday(previousMonth, i), false));
|
|
7851
|
+
previousDays.push(new DayClass(i, this.isToday(previousMonth, i), false, false));
|
|
7815
7852
|
}
|
|
7816
7853
|
}
|
|
7817
7854
|
for (var i = 1; i <= countDayInMonth; i++) {
|
|
7818
|
-
days.push(new DayClass(i, this.isToday(this.active, i), false));
|
|
7855
|
+
days.push(new DayClass(i, this.isToday(this.active, i), false, true));
|
|
7819
7856
|
}
|
|
7820
7857
|
var end = (days.length + previousDays.length) % 7;
|
|
7821
7858
|
if (end !== 0) {
|
|
7822
7859
|
for (var i = 1; i <= 7 - end; i++) {
|
|
7823
|
-
nextDays.push(new DayClass(i, this.isToday(nextMonth, i), false));
|
|
7860
|
+
nextDays.push(new DayClass(i, this.isToday(nextMonth, i), false, false));
|
|
7824
7861
|
}
|
|
7825
7862
|
}
|
|
7826
7863
|
this.previousDays = previousDays;
|