ps-toolkit-ui 0.0.199 → 0.0.200

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.
@@ -232,10 +232,23 @@
232
232
  FileSelected: '{} فایل انتخاب شده ({})',
233
233
  Selected: 'انتخاب شده',
234
234
  Limit: 'محدودیت',
235
+ Today: 'امروز : {}',
235
236
  SendCodeLimit: 'محدودیت در ارسال کد',
236
237
  SendCodeError: 'خطا در ارسال کد',
237
238
  CodeNotFound: 'کد تایید ارسال نشده است',
238
239
  Total: 'جمع کل',
240
+ Month1: 'فروردین',
241
+ Month2: 'اردیبهشت',
242
+ Month3: 'خرداد',
243
+ Month4: 'تیر',
244
+ Month5: 'مرداد',
245
+ Month6: 'شهریور',
246
+ Month7: 'مهر',
247
+ Month8: 'آبان',
248
+ Month9: 'آذر',
249
+ Month10: 'دی',
250
+ Month11: 'بهمن',
251
+ Month12: 'اسفند',
239
252
  Day: 'روز',
240
253
  HourP: '{} ساعت',
241
254
  MinuteP: '{} دقیقه',
@@ -6098,7 +6111,7 @@
6098
6111
  { type: core.Component, args: [{
6099
6112
  selector: 'lib-notfound',
6100
6113
  template: "<div id=\"Notfound\">\r\n <div class=\"notfound-con\">\r\n <i class=\"far fa-frown notfound-icon\"></i>\r\n <div class=\"notfound\">404</div>\r\n <div class=\"notfound-text\">{{l(\"Text\")}}</div>\r\n <div class=\"notfound-btn\">\r\n <lib-form-button [inp]=\"back\"></lib-form-button>\r\n </div>\r\n </div>\r\n</div>\r\n",
6101
- styles: ["#Notfound{align-items:center;background-color:#fff;display:flex;float:right;justify-content:center;min-height:calc(100vh - 90px);position:relative;width:100%}#Notfound .notfound-con{border-radius:5px;float:right;height:100%;width:100%}#Notfound .notfound-con .notfound{float:right;font-family:VazirBold;font-size:60px;height:100px;line-height:120px;position:relative;text-align:center;width:100%;z-index:2}#Notfound .notfound-con .notfound-text{float:right;font-family:VazirLight;font-size:16px;height:40px;line-height:40px;position:relative;text-align:center;width:100%;z-index:2}#Notfound .notfound-con .notfound-btn{float:right;margin-right:40%;margin-top:15px;position:relative;width:20%;z-index:2}#Notfound .notfound-con .notfound-icon{color:var(--base-33);float:right;font-size:150px;text-align:center;width:100%}@media (max-width:399.99px){#Notfound .notfound-con{right:5%;width:90%}#Notfound .notfound-con .notfound{font-size:90px}#Notfound .notfound-con .notfound-text{font-size:14px}#Notfound .notfound-con .notfound-icon{font-size:300px;left:-90px}}@media (min-width:400px) and (max-width:499.99px){#Notfound .notfound-con{right:5%;width:90%}#Notfound .notfound-con .notfound{font-size:110px}#Notfound .notfound-con .notfound-text{font-size:16px}#Notfound .notfound-con .notfound-icon{font-size:380px}}@media (min-width:500px) and (max-width:599.99px){#Notfound .notfound-con{right:5%;width:90%}#Notfound .notfound-con .notfound{font-size:110px}#Notfound .notfound-con .notfound-text{font-size:16px}#Notfound .notfound-con .notfound-icon{font-size:380px}}@media (min-width:600px) and (max-width:699.99px){#Notfound .notfound-con{right:10%;width:80%}#Notfound .notfound-con .notfound{font-size:120px}#Notfound .notfound-con .notfound-text{font-size:17px}}"]
6114
+ styles: ["#Notfound{align-items:center;background-color:#fff;display:flex;float:right;justify-content:center;min-height:calc(100vh - 125px);position:relative;width:100%}#Notfound .notfound-con{border-radius:5px;float:right;height:100%;width:100%}#Notfound .notfound-con .notfound{float:right;font-family:VazirBold;font-size:60px;height:100px;line-height:120px;position:relative;text-align:center;width:100%;z-index:2}#Notfound .notfound-con .notfound-text{float:right;font-family:VazirLight;font-size:16px;height:40px;line-height:40px;position:relative;text-align:center;width:100%;z-index:2}#Notfound .notfound-con .notfound-btn{float:right;margin-right:40%;margin-top:15px;position:relative;width:20%;z-index:2}#Notfound .notfound-con .notfound-icon{color:var(--base-33);float:right;font-size:150px;text-align:center;width:100%}@media (max-width:399.99px){#Notfound .notfound-con{right:5%;width:90%}#Notfound .notfound-con .notfound{font-size:90px}#Notfound .notfound-con .notfound-text{font-size:14px}#Notfound .notfound-con .notfound-icon{font-size:300px;left:-90px}}@media (min-width:400px) and (max-width:499.99px){#Notfound .notfound-con{right:5%;width:90%}#Notfound .notfound-con .notfound{font-size:110px}#Notfound .notfound-con .notfound-text{font-size:16px}#Notfound .notfound-con .notfound-icon{font-size:380px}}@media (min-width:500px) and (max-width:599.99px){#Notfound .notfound-con{right:5%;width:90%}#Notfound .notfound-con .notfound{font-size:110px}#Notfound .notfound-con .notfound-text{font-size:16px}#Notfound .notfound-con .notfound-icon{font-size:380px}}@media (min-width:600px) and (max-width:699.99px){#Notfound .notfound-con{right:10%;width:80%}#Notfound .notfound-con .notfound{font-size:120px}#Notfound .notfound-con .notfound-text{font-size:17px}}"]
6102
6115
  },] }
6103
6116
  ];
6104
6117
  NotfoundComponent.ctorParameters = function () { return [
@@ -7035,6 +7048,133 @@
7035
7048
  inp: [{ type: core.Input }]
7036
7049
  };
7037
7050
 
7051
+ var CalendarComponent = /** @class */ (function () {
7052
+ function CalendarComponent(config) {
7053
+ this.config = config;
7054
+ this.state = 'day';
7055
+ this.months = [];
7056
+ this.previousDays = [];
7057
+ this.nextDays = [];
7058
+ this.days = [];
7059
+ var lang = new LangClass(config.currentLang, config.strings);
7060
+ this.l = function (key, v) {
7061
+ if (v === void 0) { v = null; }
7062
+ return lang.get('Public', null, key, v);
7063
+ };
7064
+ this.months = [this.l('Month1'), this.l('Month2'), this.l('Month3'), this.l('Month4'), this.l('Month5'), this.l('Month6'), this.l('Month7'), this.l('Month8'), this.l('Month9'), this.l('Month10'), this.l('Month11'), this.l('Month12')];
7065
+ moment.locale('fa');
7066
+ this.setActive(moment__namespace());
7067
+ }
7068
+ CalendarComponent.prototype.changeState = function (s) {
7069
+ this.state = s;
7070
+ };
7071
+ CalendarComponent.prototype.getYears = function () {
7072
+ var y = parseInt(this.active.format('jYYYY'), 10);
7073
+ var sy = y - (y % 20);
7074
+ return Array.from({ length: 20 }, function (x, i) { return sy + i; });
7075
+ };
7076
+ CalendarComponent.prototype.getActiveMonth = function () {
7077
+ return this.months[parseInt(this.active.format('jM'), 10) - 1];
7078
+ };
7079
+ CalendarComponent.prototype.add = function (c) {
7080
+ this.active.add(c, this.state === 'day' ? 'month' : 'year');
7081
+ this.setDate();
7082
+ };
7083
+ CalendarComponent.prototype.changeMonth = function (c) {
7084
+ this.active = moment__namespace(this.active.format('jYYYY') + '/' + ('0' + c).slice(-2) + '/' + this.active.format('jDD HH:mm:ss'), 'jYYYY/jMM/jDD HH:mm:ss');
7085
+ this.setDate();
7086
+ this.changeState('day');
7087
+ };
7088
+ CalendarComponent.prototype.changeYear = function (c) {
7089
+ this.active = moment__namespace(('000' + c).slice(-4) + '/' + this.active.format('jMM/jDD HH:mm:ss'), 'jYYYY/jMM/jDD HH:mm:ss');
7090
+ this.setDate();
7091
+ this.changeState('month');
7092
+ };
7093
+ CalendarComponent.prototype.setDate = function () {
7094
+ var n = this.active.clone();
7095
+ var countDayInMonth = n.daysInMonth();
7096
+ var startWeek = parseInt(n.startOf('month').format('d'), 10);
7097
+ var previousMonth = n.subtract(1, 'month');
7098
+ var countDayInPreviousMonth = previousMonth.daysInMonth();
7099
+ var nextMonth = n.add(2, 'month');
7100
+ var previousDays = [];
7101
+ var nextDays = [];
7102
+ var days = [];
7103
+ if (startWeek !== 6) {
7104
+ for (var i = countDayInPreviousMonth - startWeek; i <= countDayInPreviousMonth; i++) {
7105
+ previousDays.push(new DayClass(i, this.isToday(previousMonth, i), false));
7106
+ }
7107
+ }
7108
+ for (var i = 1; i <= countDayInMonth; i++) {
7109
+ days.push(new DayClass(i, this.isToday(this.active, i), false));
7110
+ }
7111
+ var end = (days.length + previousDays.length) % 7;
7112
+ if (end !== 0) {
7113
+ for (var i = 1; i <= 7 - end; i++) {
7114
+ nextDays.push(new DayClass(i, this.isToday(nextMonth, i), false));
7115
+ }
7116
+ }
7117
+ this.previousDays = previousDays;
7118
+ this.nextDays = nextDays;
7119
+ this.days = days;
7120
+ };
7121
+ CalendarComponent.prototype.isToday = function (m, d) {
7122
+ var month = parseInt(m.format('jMM'), 10);
7123
+ var year = parseInt(m.format('jYYYY'), 10);
7124
+ return year === this.todayYear && month === this.todayMonth && d === this.todayDay;
7125
+ };
7126
+ CalendarComponent.prototype.setActive = function (m) {
7127
+ this.active = m;
7128
+ this.todayDay = parseInt(this.active.format('jDD'), 10);
7129
+ this.todayMonth = parseInt(this.active.format('jMM'), 10);
7130
+ this.todayYear = parseInt(this.active.format('jYYYY'), 10);
7131
+ this.setDate();
7132
+ };
7133
+ return CalendarComponent;
7134
+ }());
7135
+ CalendarComponent.decorators = [
7136
+ { type: core.Component, args: [{
7137
+ selector: 'lib-calendar',
7138
+ template: "<div id=\"Calendar\">\r\n <div class=\"title\">{{l('Today', this.active.format('dddd jDD jMMMM jYYYY'))}}</div>\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 [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",
7139
+ styles: ["#Calendar{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;background-color:#fff;border-radius:5px;box-shadow:0 1px 3px 0 rgba(0,0,0,.4);float:right;margin-right:5%;position:relative;width:40%;z-index:4}#Calendar>.title{font-family:VazirBold;line-height:40px;text-align:center}#Calendar .days-con,#Calendar .header,#Calendar>.title{float:right;width:100%}#Calendar .header{background:var(--black-33)}#Calendar .header .next-month,#Calendar .header .previous-month{cursor:pointer;float:right;font-size:15px;height:40px;line-height:40px;text-align:center;width:30px}#Calendar .header .next-month:hover,#Calendar .header .previous-month:hover{background:var(--black-33)}#Calendar .header .title{float:right;font-family:VazirBold;font-size:12px;height:40px;text-align:center;width:calc(100% - 60px)}#Calendar .header .header-item{background-color:#fff;border-radius:5px;box-shadow:var(--box-shadow);cursor:pointer;float:right;height:30px;line-height:30px;margin-right:5px;margin-top:5px;text-align:center}#Calendar .header .header-item:hover{background-color:var(--base-11)}#Calendar .header .header-item.year{width:calc(40% - 10px)}#Calendar .header .header-item.month{width:calc(60% - 10px)}#Calendar .days-con .day-names{float:right;font-family:VazirLight;font-size:12px;position:relative;text-align:center;width:100%}#Calendar .days-con .day-names .item{float:right;font-size:12px;height:25px;line-height:25px;text-align:center;width:14.28571%}#Calendar .days-con .days{float:right;font-size:12px;height:300px;text-align:center;width:100%}#Calendar .days-con .days .item{cursor:pointer;float:right;font-size:14px;height:50px;line-height:50px;text-align:center;width:14.28571%}#Calendar .days-con .days .item.not-in-month{cursor:default;opacity:.5}#Calendar .days-con .days .item:hover{background-color:var(--black-33)}#Calendar .days-con .days .item.not-in-month:hover{background-color:unset}#Calendar .days-con .days .item.today{background-color:var(--comp);color:#fff}#Calendar .days-con .days .item.today.not-in-month:hover{background-color:var(--black-33)}#Calendar .months-con{float:right;height:325px;width:100%}#Calendar .months-con .month{cursor:pointer;float:right;font-size:13px;height:81.25px;line-height:81.25px;text-align:center;width:33.33333%}#Calendar .months-con .month.selected,#Calendar .months-con .month:hover{background-color:var(--black-33)}#Calendar .years-con{float:right;width:100%}#Calendar .years-con .year{cursor:pointer;float:right;font-size:13px;height:65px;line-height:65px;text-align:center;width:25%}#Calendar .years-con .year.selected,#Calendar .years-con .year:hover{background-color:var(--black-33)}"]
7140
+ },] }
7141
+ ];
7142
+ CalendarComponent.ctorParameters = function () { return [
7143
+ { type: PsToolkitUiConfigService }
7144
+ ]; };
7145
+
7146
+ var ClockComponent = /** @class */ (function () {
7147
+ function ClockComponent() {
7148
+ }
7149
+ ClockComponent.prototype.ngOnInit = function () {
7150
+ var _this = this;
7151
+ this.clockInterval = setInterval(function () {
7152
+ _this.clockUpdate();
7153
+ }, 1000);
7154
+ };
7155
+ ClockComponent.prototype.ngOnDestroy = function () {
7156
+ clearInterval(this.clockInterval);
7157
+ };
7158
+ ClockComponent.prototype.clockUpdate = function () {
7159
+ this.active = this.active.add(1, 'second');
7160
+ document.getElementById('hour').style.transform = 'rotate(' + (this.active.get('hour') * 30 + (Math.floor(this.active.get('minute') / 12) * 6)) + 'deg)';
7161
+ document.getElementById('minute').style.transform = 'rotate(' + (this.active.get('minute') * 6) + 'deg)';
7162
+ document.getElementById('second').style.transform = 'rotate(' + (this.active.get('second') * 6) + 'deg)';
7163
+ };
7164
+ return ClockComponent;
7165
+ }());
7166
+ ClockComponent.decorators = [
7167
+ { type: core.Component, args: [{
7168
+ selector: 'lib-clock',
7169
+ template: "<div id=\"ClockCon\">\r\n <div id=\"clock\">\r\n <b></b>\r\n <span></span>\r\n <span></span>\r\n <i id=\"hour\"></i>\r\n <i id=\"minute\"></i>\r\n <i id=\"second\"></i>\r\n </div>\r\n</div>\r\n",
7170
+ styles: ["#ClockCon #clock{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;border-radius:5px;float:left;padding:20px;position:relative;width:30%;z-index:4}#ClockCon #clock #clock{background-color:#fff;border:.0625em solid var(--black-33);border-radius:50%;box-shadow:inset .125em .25em .5em var(--black-33),-.25em -.5em .5em var(--black-33),0 0 .0625em .5em var(--black-33),0 0 .0625em .5625em var(--black-33),.125em .25em .5em .5em var(--black-33);height:10em;line-height:1.5em;margin:1em auto;position:relative;transform:scale(1.5);width:10em}#ClockCon #clock #clock *,#ClockCon #clock #clock :after,#ClockCon #clock #clock :before{background-clip:padding-box;box-sizing:border-box}#ClockCon #clock #clock:after,#ClockCon #clock #clock:before,#ClockCon #clock #clock b:after,#ClockCon #clock #clock b:before{position:absolute;text-align:center;width:1.5em}#ClockCon #clock #clock b{position:absolute;top:4.25em;width:100%}#ClockCon #clock #clock:after,#ClockCon #clock #clock:before{left:4.25em}#ClockCon #clock #clock:before{content:\"12\";top:0}#ClockCon #clock #clock:after{bottom:0;content:\"6\"}#ClockCon #clock #clock b:before{content:\"9\";left:0}#ClockCon #clock #clock b:after{content:\"3\";right:0}#ClockCon #clock #clock span{height:100%;left:4.9375em;position:absolute;top:0;width:.125em}#ClockCon #clock #clock span+span{transform:rotate(90deg)}#ClockCon #clock #clock i,#ClockCon #clock #clock span:after,#ClockCon #clock #clock span:before{height:9em;left:0;position:absolute;top:.5em;width:100%}#ClockCon #clock #clock span:after,#ClockCon #clock #clock span:before{border-color:#000;border-style:solid;border-width:.5em 0;content:\"\";transform:rotate(30deg)}#ClockCon #clock #clock span:after{transform:rotate(60deg)}#ClockCon #clock #clock i{background-color:#000;border:solid transparent;border-radius:40%;border-width:0 0 3em;left:4.85em;width:.3em;z-index:2}#ClockCon #clock #clock i:first-of-type{border-width:1.5em 0 3em}#ClockCon #clock #clock i:last-of-type{background-color:var(--comp)}#ClockCon #clock #clock i:last-of-type:after,#ClockCon #clock #clock i:last-of-type:before{border-radius:50%;content:\"\";position:absolute}#ClockCon #clock #clock i:last-of-type:before{background:#000;height:1em;left:-.375em;top:4em;width:1em}#ClockCon #clock #clock i:last-of-type:after{background:#abc;height:.5em;left:-.125em;top:4.25em;width:.5em}"]
7171
+ },] }
7172
+ ];
7173
+ ClockComponent.ctorParameters = function () { return []; };
7174
+ ClockComponent.propDecorators = {
7175
+ clock: [{ type: core.ViewChild, args: ['clock',] }]
7176
+ };
7177
+
7038
7178
  var PsToolkitUiModule = /** @class */ (function () {
7039
7179
  function PsToolkitUiModule() {
7040
7180
  }
@@ -7057,7 +7197,8 @@
7057
7197
  FormFileComponent, FormSelectComponent, FormTableComponent, FormLabelComponent, AccordionComponent, FormRadioComponent, HeaderComponent,
7058
7198
  TooltipComponent, ConfirmComponent, TableComponent, ModalComponent, FormComponent, TableRowComponent, FormTreeComponent, AlertComponent,
7059
7199
  FormTimeComponent, NotfoundComponent, FormFingerComponent, FormCarSearchComponent, FormCarComponent, TableReportComponent,
7060
- SafeStylePipe, LoginComponent, LoadingComponent, NotificationComponent, LayoutComponent, FormHiddenComponent
7200
+ SafeStylePipe, LoginComponent, LoadingComponent, NotificationComponent, LayoutComponent, FormHiddenComponent, CalendarComponent,
7201
+ ClockComponent
7061
7202
  ],
7062
7203
  imports: [
7063
7204
  common.CommonModule,
@@ -7072,7 +7213,8 @@
7072
7213
  FormFileComponent, FormSelectComponent, FormTableComponent, FormLabelComponent, AccordionComponent, FormRadioComponent, HeaderComponent,
7073
7214
  TooltipComponent, ConfirmComponent, TableComponent, ModalComponent, FormComponent, TableRowComponent, FormTreeComponent, AlertComponent,
7074
7215
  FormTimeComponent, NotfoundComponent, FormFingerComponent, FormCarSearchComponent, FormCarComponent, TableReportComponent,
7075
- LoginComponent, LoadingComponent, NotificationComponent, LayoutComponent, FormHiddenComponent
7216
+ LoginComponent, LoadingComponent, NotificationComponent, LayoutComponent, FormHiddenComponent, CalendarComponent,
7217
+ ClockComponent
7076
7218
  ]
7077
7219
  },] }
7078
7220
  ];
@@ -7477,6 +7619,8 @@
7477
7619
  exports.ɵj = LoginComponent;
7478
7620
  exports.ɵk = NotificationComponent;
7479
7621
  exports.ɵl = FormHiddenComponent;
7622
+ exports.ɵm = CalendarComponent;
7623
+ exports.ɵn = ClockComponent;
7480
7624
 
7481
7625
  Object.defineProperty(exports, '__esModule', { value: true });
7482
7626