@studio-west/employees 0.1.3 → 0.1.5

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.
@@ -1 +1 @@
1
- .wrapper[data-v-1e7f76f5]{display:flex}.wrapper .month_year[data-v-1e7f76f5]{display:flex;justify-content:space-around;align-items:center}.wrapper .month_year span:not(.text) button[data-v-1e7f76f5]{font-size:1.3em}.wrapper>div[data-v-1e7f76f5]:not(:first-child){margin-left:2rem}.wrapper button[data-v-1e7f76f5]{height:30px;text-align:center;line-height:30px;cursor:pointer;background:none;border:none;border-radius:.2rem;transition:all .3s ease}.wrapper button[data-v-1e7f76f5]:hover:not(.disabled):not(.active){color:var(--el-color-success)}.wrapper .week[data-v-1e7f76f5]{border-bottom:1px solid var(--el-color-info);margin-bottom:.5rem}.wrapper .month[data-v-1e7f76f5],.wrapper .week[data-v-1e7f76f5]{width:250px;display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr 1fr;gap:.2rem}.wrapper .month>button[data-v-1e7f76f5],.wrapper .week>button[data-v-1e7f76f5]{width:30px}.wrapper .month>button.disabled[data-v-1e7f76f5],.wrapper .week>button.disabled[data-v-1e7f76f5]{color:var(--el-color-info);cursor:not-allowed}.wrapper .month>button.active[data-v-1e7f76f5],.wrapper .week>button.active[data-v-1e7f76f5]{background-color:#007bff}.noBorder .el-input__wrapper{box-shadow:none}
1
+ .wrapper[data-v-a842f008]{display:flex}.wrapper .month_year[data-v-a842f008]{display:flex;justify-content:space-around;align-items:center}.wrapper .month_year span:not(.text) button[data-v-a842f008]{font-size:1.3em}.wrapper>div[data-v-a842f008]:not(:first-child){margin-left:2rem}.wrapper button[data-v-a842f008]{height:30px;text-align:center;line-height:30px;cursor:pointer;background:none;border:none;border-radius:.2rem;transition:all .3s ease}.wrapper button[data-v-a842f008]:hover:not(.disabled):not(.active){color:var(--el-color-success)}.wrapper .week[data-v-a842f008]{border-bottom:1px solid var(--el-color-info);margin-bottom:.5rem}.wrapper .month[data-v-a842f008],.wrapper .week[data-v-a842f008]{width:250px;display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr 1fr;gap:.2rem}.wrapper .month>button[data-v-a842f008],.wrapper .week>button[data-v-a842f008]{width:30px}.wrapper .month>button.disabled[data-v-a842f008],.wrapper .week>button.disabled[data-v-a842f008]{color:var(--el-color-info);cursor:not-allowed}.wrapper .month>button.preholiday[data-v-a842f008],.wrapper .week>button.preholiday[data-v-a842f008]{background-color:#fdd404}.wrapper .month>button.weekend[data-v-a842f008],.wrapper .week>button.weekend[data-v-a842f008]{background-color:#ff8080}.wrapper .month>button.holiday[data-v-a842f008],.wrapper .week>button.holiday[data-v-a842f008]{background-color:red}.wrapper .month>button.nowork[data-v-a842f008],.wrapper .week>button.nowork[data-v-a842f008]{background-color:red}.wrapper .month>button.active[data-v-a842f008],.wrapper .week>button.active[data-v-a842f008]{background-color:#007bff}.noBorder .el-input__wrapper{box-shadow:none}
@@ -0,0 +1,107 @@
1
+ import c from "js-cookie";
2
+ function h(t, r) {
3
+ if (arguments.length === 0 || !t)
4
+ return null;
5
+ const o = r || "{Y}-{m}-{d} {G}:{i}:{s}";
6
+ let e;
7
+ typeof t == "object" ? e = t : (typeof t == "string" && (/^[0-9]+$/.test(t) ? t = parseInt(t) : t = t.replace(new RegExp(/-/gm), "/")), typeof t == "number" && t.toString().length === 10 && (t = t * 1e3), e = new Date(t));
8
+ const a = "ru-RU", l = {
9
+ Y: e.getFullYear(),
10
+ m: (e.getMonth() + 1).toString().padStart(2, "0"),
11
+ d: e.getDate(),
12
+ dd: e.getDate().toString().padStart(2, "0"),
13
+ G: e.getHours(),
14
+ H: e.getHours().toString().padStart(2, "0"),
15
+ i: e.getMinutes().toString().padStart(2, "0"),
16
+ s: e.getSeconds().toString().padStart(2, "0"),
17
+ D: new Intl.DateTimeFormat(a, { weekday: "short" }).format(e),
18
+ F: new Intl.DateTimeFormat(a, { month: "long" }).format(e),
19
+ M: new Intl.DateTimeFormat(a, { month: "short" }).format(e)
20
+ };
21
+ return o.replace(/{(dd|[YmdGHisDFM])+}/g, (f, s) => l[s]);
22
+ }
23
+ function p(t, r) {
24
+ let e = t.replace(/[0-9]/g, "").split("").reverse().map((a) => a.charCodeAt(0));
25
+ return n(e, r, 0), e.map((a) => String.fromCharCode(a)).reverse().join("");
26
+ }
27
+ function g(t) {
28
+ return t.split(" ", 3).map((r, o) => o !== 0 ? r.slice(0, 1) + "." : r).join(" ");
29
+ }
30
+ (void 0).holiday = {};
31
+ function m() {
32
+ if (typeof this.holiday.holidays < "u") return this.holiday;
33
+ fetch(
34
+ "https://cp.avanta-telecom.ru/api/v2/calendar/getHoliday",
35
+ {
36
+ method: "GET",
37
+ // *GET, POST, PUT, DELETE, etc.
38
+ mode: "cors",
39
+ // no-cors, *cors, same-origin
40
+ cache: "default",
41
+ // *default, no-cache, reload, force-cache, only-if-cached
42
+ credentials: "same-origin",
43
+ // include, *same-origin, omit
44
+ headers: {
45
+ "Content-Type": "application/json",
46
+ Accept: "text/html",
47
+ "X-Token": i(),
48
+ "Cache-Control": "no-cache"
49
+ },
50
+ redirect: "follow",
51
+ // manual, *follow, error
52
+ referrerPolicy: "no-referrer"
53
+ // no-referrer, *client
54
+ // body: JSON.stringify(data), // body data type must match "Content-Type" header
55
+ }
56
+ ).then((t) => {
57
+ if (!t.ok)
58
+ throw new Error(`HTTP error! status: ${t.status}`);
59
+ return t.json();
60
+ }).then((t) => (t.result.holiday = [
61
+ "2024-01-01",
62
+ "2024-01-02",
63
+ "2024-01-03",
64
+ "2024-01-04",
65
+ "2024-01-05",
66
+ "2024-01-06",
67
+ "2024-01-07",
68
+ "2024-01-08",
69
+ "2024-02-23",
70
+ "2024-03-08",
71
+ "2024-05-01",
72
+ "2024-05-09",
73
+ "2024-06-12",
74
+ "2024-11-04",
75
+ "2025-01-01",
76
+ "2025-01-02",
77
+ "2025-01-03",
78
+ "2025-01-04",
79
+ "2025-01-05",
80
+ "2025-01-06",
81
+ "2025-01-07",
82
+ "2025-01-08",
83
+ "2025-02-23",
84
+ "2025-03-08",
85
+ "2025-05-01",
86
+ "2025-05-09",
87
+ "2025-06-12",
88
+ "2025-11-04"
89
+ ], this.holiday = t.result, t.result)).catch((t) => {
90
+ console.error("Ошибка загрузки файла:", t);
91
+ });
92
+ }
93
+ function n(t, r, o) {
94
+ if (typeof r != "number" || r < 1) return !0;
95
+ if (r = r - 1, (typeof t[o] != "number" || t[o] < 65) && (t[o] = 65), t[o] + r <= 90) t[o] = t[o] + r;
96
+ else {
97
+ let e = Math.floor((t[o] - 65 + r) / 26);
98
+ t[o] = (t[o] - 65 + r) % 26 + 65, n(t, e, o + 1);
99
+ }
100
+ }
101
+ const i = () => c.get("X-Token") || !1;
102
+ export {
103
+ g as b,
104
+ p as c,
105
+ m as h,
106
+ h as p
107
+ };
@@ -0,0 +1 @@
1
+ "use strict";const i=require("js-cookie");function c(t,r){if(arguments.length===0||!t)return null;const o=r||"{Y}-{m}-{d} {G}:{i}:{s}";let e;typeof t=="object"?e=t:(typeof t=="string"&&(/^[0-9]+$/.test(t)?t=parseInt(t):t=t.replace(new RegExp(/-/gm),"/")),typeof t=="number"&&t.toString().length===10&&(t=t*1e3),e=new Date(t));const a="ru-RU",l={Y:e.getFullYear(),m:(e.getMonth()+1).toString().padStart(2,"0"),d:e.getDate(),dd:e.getDate().toString().padStart(2,"0"),G:e.getHours(),H:e.getHours().toString().padStart(2,"0"),i:e.getMinutes().toString().padStart(2,"0"),s:e.getSeconds().toString().padStart(2,"0"),D:new Intl.DateTimeFormat(a,{weekday:"short"}).format(e),F:new Intl.DateTimeFormat(a,{month:"long"}).format(e),M:new Intl.DateTimeFormat(a,{month:"short"}).format(e)};return o.replace(/{(dd|[YmdGHisDFM])+}/g,(g,s)=>l[s])}function u(t,r){let e=t.replace(/[0-9]/g,"").split("").reverse().map(a=>a.charCodeAt(0));return n(e,r,0),e.map(a=>String.fromCharCode(a)).reverse().join("")}function f(t){return t.split(" ",3).map((r,o)=>o!==0?r.slice(0,1)+".":r).join(" ")}(void 0).holiday={};function h(){if(typeof this.holiday.holidays<"u")return this.holiday;fetch("https://cp.avanta-telecom.ru/api/v2/calendar/getHoliday",{method:"GET",mode:"cors",cache:"default",credentials:"same-origin",headers:{"Content-Type":"application/json",Accept:"text/html","X-Token":p(),"Cache-Control":"no-cache"},redirect:"follow",referrerPolicy:"no-referrer"}).then(t=>{if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return t.json()}).then(t=>(t.result.holiday=["2024-01-01","2024-01-02","2024-01-03","2024-01-04","2024-01-05","2024-01-06","2024-01-07","2024-01-08","2024-02-23","2024-03-08","2024-05-01","2024-05-09","2024-06-12","2024-11-04","2025-01-01","2025-01-02","2025-01-03","2025-01-04","2025-01-05","2025-01-06","2025-01-07","2025-01-08","2025-02-23","2025-03-08","2025-05-01","2025-05-09","2025-06-12","2025-11-04"],this.holiday=t.result,t.result)).catch(t=>{console.error("Ошибка загрузки файла:",t)})}function n(t,r,o){if(typeof r!="number"||r<1)return!0;if(r=r-1,(typeof t[o]!="number"||t[o]<65)&&(t[o]=65),t[o]+r<=90)t[o]=t[o]+r;else{let e=Math.floor((t[o]-65+r)/26);t[o]=(t[o]-65+r)%26+65,n(t,e,o+1)}}const p=()=>i.get("X-Token")||!1;exports.byInitials=f;exports.cellsDynamically=u;exports.holidays=h;exports.parseTime=c;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studio-west/employees",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -1,41 +0,0 @@
1
- function g(t, r) {
2
- if (arguments.length === 0 || !t)
3
- return null;
4
- const a = r || "{Y}-{m}-{d} {G}:{i}:{s}";
5
- let e;
6
- typeof t == "object" ? e = t : (typeof t == "string" && (/^[0-9]+$/.test(t) ? t = parseInt(t) : t = t.replace(new RegExp(/-/gm), "/")), typeof t == "number" && t.toString().length === 10 && (t = t * 1e3), e = new Date(t));
7
- const o = "ru-RU", s = {
8
- Y: e.getFullYear(),
9
- m: (e.getMonth() + 1).toString().padStart(2, "0"),
10
- d: e.getDate(),
11
- dd: e.getDate().toString().padStart(2, "0"),
12
- G: e.getHours(),
13
- H: e.getHours().toString().padStart(2, "0"),
14
- i: e.getMinutes().toString().padStart(2, "0"),
15
- s: e.getSeconds().toString().padStart(2, "0"),
16
- D: new Intl.DateTimeFormat(o, { weekday: "short" }).format(e),
17
- F: new Intl.DateTimeFormat(o, { month: "long" }).format(e),
18
- M: new Intl.DateTimeFormat(o, { month: "short" }).format(e)
19
- };
20
- return a.replace(/{(dd|[YmdGHisDFM])+}/g, (f, l) => s[l]);
21
- }
22
- function p(t, r) {
23
- let e = t.replace(/[0-9]/g, "").split("").reverse().map((o) => o.charCodeAt(0));
24
- return n(e, r, 0), e.map((o) => String.fromCharCode(o)).reverse().join("");
25
- }
26
- function u(t) {
27
- return t.split(" ", 3).map((r, a) => a !== 0 ? r.slice(0, 1) + "." : r).join(" ");
28
- }
29
- function n(t, r, a) {
30
- if (typeof r != "number" || r < 1) return !0;
31
- if (r = r - 1, (typeof t[a] != "number" || t[a] < 65) && (t[a] = 65), t[a] + r <= 90) t[a] = t[a] + r;
32
- else {
33
- let e = Math.floor((t[a] - 65 + r) / 26);
34
- t[a] = (t[a] - 65 + r) % 26 + 65, n(t, e, a + 1);
35
- }
36
- }
37
- export {
38
- u as b,
39
- p as c,
40
- g as p
41
- };
@@ -1 +0,0 @@
1
- "use strict";function f(t,r){if(arguments.length===0||!t)return null;const a=r||"{Y}-{m}-{d} {G}:{i}:{s}";let e;typeof t=="object"?e=t:(typeof t=="string"&&(/^[0-9]+$/.test(t)?t=parseInt(t):t=t.replace(new RegExp(/-/gm),"/")),typeof t=="number"&&t.toString().length===10&&(t=t*1e3),e=new Date(t));const n="ru-RU",l={Y:e.getFullYear(),m:(e.getMonth()+1).toString().padStart(2,"0"),d:e.getDate(),dd:e.getDate().toString().padStart(2,"0"),G:e.getHours(),H:e.getHours().toString().padStart(2,"0"),i:e.getMinutes().toString().padStart(2,"0"),s:e.getSeconds().toString().padStart(2,"0"),D:new Intl.DateTimeFormat(n,{weekday:"short"}).format(e),F:new Intl.DateTimeFormat(n,{month:"long"}).format(e),M:new Intl.DateTimeFormat(n,{month:"short"}).format(e)};return a.replace(/{(dd|[YmdGHisDFM])+}/g,(p,s)=>l[s])}function u(t,r){let e=t.replace(/[0-9]/g,"").split("").reverse().map(n=>n.charCodeAt(0));return o(e,r,0),e.map(n=>String.fromCharCode(n)).reverse().join("")}function g(t){return t.split(" ",3).map((r,a)=>a!==0?r.slice(0,1)+".":r).join(" ")}function o(t,r,a){if(typeof r!="number"||r<1)return!0;if(r=r-1,(typeof t[a]!="number"||t[a]<65)&&(t[a]=65),t[a]+r<=90)t[a]=t[a]+r;else{let e=Math.floor((t[a]-65+r)/26);t[a]=(t[a]-65+r)%26+65,o(t,e,a+1)}}exports.byInitials=g;exports.cellsDynamically=u;exports.parseTime=f;