hrenpack_js 3.1.5 → 3.3.0

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/datework.d.ts ADDED
@@ -0,0 +1,27 @@
1
+ declare class datetime {
2
+ private _year;
3
+ private _month;
4
+ private _days;
5
+ private _hours;
6
+ private _minutes;
7
+ private _seconds;
8
+ private date;
9
+ constructor(_year: number, _month: number, _days: number, _hours: number, _minutes: number, _seconds: number);
10
+ private static newObject;
11
+ static now(): datetime;
12
+ static fromTimestamp(timestamp: number): datetime;
13
+ get year(): number;
14
+ get month(): number;
15
+ get days(): number;
16
+ get hours(): number;
17
+ get minutes(): number;
18
+ get seconds(): number;
19
+ set year(year: number);
20
+ set month(month: number);
21
+ set days(days: number);
22
+ set hours(hours: number);
23
+ set minutes(minutes: number);
24
+ set seconds(seconds: number);
25
+ timestamp(): number;
26
+ }
27
+ //# sourceMappingURL=datework.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datework.d.ts","sourceRoot":"","sources":["datework.ts"],"names":[],"mappings":"AAAA,cAAM,QAAQ;IAGE,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,QAAQ;IAP5B,OAAO,CAAC,IAAI,CAAO;gBAEC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM;IAIpC,OAAO,CAAC,MAAM,CAAC,SAAS;IAWxB,MAAM,CAAC,GAAG;IAIV,MAAM,CAAC,aAAa,CAAC,SAAS,EAAE,MAAM;IAItC,IAAI,IAAI,IAOO,MAAM,CAPS;IAC9B,IAAI,KAAK,IAOQ,MAAM,CAPS;IAChC,IAAI,IAAI,IAOO,MAAM,CAPS;IAC9B,IAAI,KAAK,IAOQ,MAAM,CAPS;IAChC,IAAI,OAAO,IAOU,MAAM,CAPS;IACpC,IAAI,OAAO,IAOU,MAAM,CAPS;IAEpC,IAAI,IAAI,CAAC,IAAI,EAAE,MAAM,EAAqB;IAC1C,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,EAAuB;IAC9C,IAAI,IAAI,CAAC,IAAI,EAAE,MAAM,EAAqB;IAC1C,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,EAAuB;IAC9C,IAAI,OAAO,CAAC,OAAO,EAAE,MAAM,EAA2B;IACtD,IAAI,OAAO,CAAC,OAAO,EAAE,MAAM,EAA2B;IAEtD,SAAS,IAAI,MAAM;CAGtB"}
package/datework.js ADDED
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ class datetime {
3
+ constructor(_year, _month, _days, _hours, _minutes, _seconds) {
4
+ Object.defineProperty(this, "_year", {
5
+ enumerable: true,
6
+ configurable: true,
7
+ writable: true,
8
+ value: _year
9
+ });
10
+ Object.defineProperty(this, "_month", {
11
+ enumerable: true,
12
+ configurable: true,
13
+ writable: true,
14
+ value: _month
15
+ });
16
+ Object.defineProperty(this, "_days", {
17
+ enumerable: true,
18
+ configurable: true,
19
+ writable: true,
20
+ value: _days
21
+ });
22
+ Object.defineProperty(this, "_hours", {
23
+ enumerable: true,
24
+ configurable: true,
25
+ writable: true,
26
+ value: _hours
27
+ });
28
+ Object.defineProperty(this, "_minutes", {
29
+ enumerable: true,
30
+ configurable: true,
31
+ writable: true,
32
+ value: _minutes
33
+ });
34
+ Object.defineProperty(this, "_seconds", {
35
+ enumerable: true,
36
+ configurable: true,
37
+ writable: true,
38
+ value: _seconds
39
+ });
40
+ Object.defineProperty(this, "date", {
41
+ enumerable: true,
42
+ configurable: true,
43
+ writable: true,
44
+ value: void 0
45
+ });
46
+ this.date = new Date(this._year, this._month, this._days, this._hours, this._minutes, this._seconds);
47
+ }
48
+ static newObject(dateObject) {
49
+ return new datetime(dateObject.getFullYear(), dateObject.getMonth(), dateObject.getDate(), dateObject.getHours(), dateObject.getMinutes(), dateObject.getSeconds());
50
+ }
51
+ static now() {
52
+ return datetime.newObject(new Date());
53
+ }
54
+ static fromTimestamp(timestamp) {
55
+ return datetime.newObject(new Date(timestamp));
56
+ }
57
+ get year() { return this._year; }
58
+ get month() { return this._month; }
59
+ get days() { return this._days; }
60
+ get hours() { return this._hours; }
61
+ get minutes() { return this._minutes; }
62
+ get seconds() { return this._seconds; }
63
+ set year(year) { this._year = year; }
64
+ set month(month) { this._month = month; }
65
+ set days(days) { this._days = days; }
66
+ set hours(hours) { this._hours = hours; }
67
+ set minutes(minutes) { this._minutes = minutes; }
68
+ set seconds(seconds) { this._seconds = seconds; }
69
+ timestamp() {
70
+ return this.date.getTime();
71
+ }
72
+ }
73
+ //# sourceMappingURL=datework.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datework.js","sourceRoot":"","sources":["datework.ts"],"names":[],"mappings":";AAAA,MAAM,QAAQ;IAGV,YAAoB,KAAa,EACb,MAAc,EACd,KAAa,EACb,MAAc,EACd,QAAgB,EAChB,QAAgB;QALxB;;;;mBAAQ,KAAK;WAAQ;QACrB;;;;mBAAQ,MAAM;WAAQ;QACtB;;;;mBAAQ,KAAK;WAAQ;QACrB;;;;mBAAQ,MAAM;WAAQ;QACtB;;;;mBAAQ,QAAQ;WAAQ;QACxB;;;;mBAAQ,QAAQ;WAAQ;QAP5B;;;;;WAAW;QAQf,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IACzG,CAAC;IAEO,MAAM,CAAC,SAAS,CAAC,UAAgB;QACrC,OAAO,IAAI,QAAQ,CACf,UAAU,CAAC,WAAW,EAAE,EACxB,UAAU,CAAC,QAAQ,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,OAAe,IAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA,CAAA,CAAC;IAEtD,SAAS;QACL,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAA;IAC9B,CAAC;CACJ"}
package/index.d.ts CHANGED
@@ -1,3 +1,98 @@
1
+ // ===== File: arraywork.d.ts =====
2
+ declare function arrayIsEmpty(arr: any[]): boolean;
3
+ declare function arraysIsEqual(array1: any[], array2: any[], strict?: boolean): boolean;
4
+ //# sourceMappingURL=arraywork.d.ts.map
5
+
6
+ // ===== File: auto.d.ts =====
7
+ declare const stylesRoot: CSSStyleDeclaration;
8
+ //# sourceMappingURL=auto.d.ts.map
9
+
10
+ // ===== File: classes.d.ts =====
11
+ declare class ClickableLinksFactory {
12
+ private readonly urlRegex;
13
+ private walk;
14
+ private get_anchor;
15
+ private get_clickToCopy;
16
+ clickableLinks(element: HTMLElement): void;
17
+ clickToCopyLinks(element: HTMLElement): void;
18
+ get generatedElements(): NodeListOf<HTMLElement>;
19
+ }
20
+ declare class GETParamsManager {
21
+ private params;
22
+ constructor();
23
+ get<T = string>(key: string, defaultValue?: T): T | string | null;
24
+ set(key: string, value: string | number | boolean): void;
25
+ delete(key: string): void;
26
+ all(): Record<string, string>;
27
+ clear(): void;
28
+ private updateURL;
29
+ }
30
+ //# sourceMappingURL=classes.d.ts.map
31
+
32
+ // ===== File: compiler.d.ts =====
33
+ declare function downloadTextAsFile(filename: string, text: string): void;
34
+ //# sourceMappingURL=compiler.d.ts.map
35
+
36
+ // ===== File: cookie.d.ts =====
37
+ declare function getCookie(name: string): NullStr;
38
+ declare function setCookie(name: string, value: string, days?: NullNum, path?: string): void;
39
+ declare function hasCookie(name: string): boolean;
40
+ //# sourceMappingURL=cookie.d.ts.map
41
+
42
+ // ===== File: datework.d.ts =====
43
+ declare class datetime {
44
+ private _year;
45
+ private _month;
46
+ private _days;
47
+ private _hours;
48
+ private _minutes;
49
+ private _seconds;
50
+ private date;
51
+ constructor(_year: number, _month: number, _days: number, _hours: number, _minutes: number, _seconds: number);
52
+ private static newObject;
53
+ static now(): datetime;
54
+ static fromTimestamp(timestamp: number): datetime;
55
+ get year(): number;
56
+ get month(): number;
57
+ get days(): number;
58
+ get hours(): number;
59
+ get minutes(): number;
60
+ get seconds(): number;
61
+ set year(year: number);
62
+ set month(month: number);
63
+ set days(days: number);
64
+ set hours(hours: number);
65
+ set minutes(minutes: number);
66
+ set seconds(seconds: number);
67
+ timestamp(): number;
68
+ }
69
+ //# sourceMappingURL=datework.d.ts.map
70
+
71
+ // ===== File: exceptions.d.ts =====
72
+ declare class NotAuthorizedError extends Error {
73
+ constructor();
74
+ }
75
+ //# sourceMappingURL=exceptions.d.ts.map
76
+
77
+ // ===== File: get_element_types.d.ts =====
78
+ declare function button_submit(parent: HTMLElement): HTMLButtonElement | null;
79
+ //# sourceMappingURL=get_element_types.d.ts.map
80
+
81
+ // ===== File: html.d.ts =====
82
+ declare const escapeChars: StringDict;
83
+ declare function togglePassword(passwordInput: HTMLInputElement): void;
84
+ declare function isTextWrapped(element: HTMLElement): boolean;
85
+ declare function notArrayEmpty(array: any[]): boolean;
86
+ declare function get_tagName(element: HTMLElement): string;
87
+ declare function element_toHTMLText(element: HTMLElement): string;
88
+ declare function element_to_div(element: HTMLElement): HTMLDivElement;
89
+ declare function password_format(shownPasswordHTML: string, hiddenPasswordHTML: string): void;
90
+ declare function escapeHTML(html: string): string;
91
+ declare function strFormat(template: string, ...args: any[]): string;
92
+ declare function elementToHyperlink(element: HTMLElement, href: string, cursorPointer?: boolean, preventDefault?: boolean): HTMLElement;
93
+ //# sourceMappingURL=html.d.ts.map
94
+
95
+ // ===== File: index.d.ts =====
1
96
  /*
2
97
  * hrenpack_js 3.1.2
3
98
  * Copyright (c) 2024-2025, Маг Ильяс DOMA (MagIlyasDOMA)
@@ -208,3 +303,152 @@ declare function getScriptSite(script: HTMLScriptElement): string;
208
303
  declare function generateUUIDv4(): string;
209
304
  //# sourceMappingURL=uuid.d.ts.map
210
305
 
306
+
307
+ // ===== File: input.d.ts =====
308
+ declare function getInputCursorPosition(input: HTMLInputElement): number;
309
+ declare function copyInputToClipboard(input: HTMLInputElement): void;
310
+ declare function clearInput_and_addLastSymbol(input: HTMLInputElement): void;
311
+ declare function getInputLabel(input: HTMLInputElement): HTMLLabelElement;
312
+ //# sourceMappingURL=input.d.ts.map
313
+
314
+ // ===== File: link.d.ts =====
315
+ declare function loadCSS(href: string): void;
316
+ //# sourceMappingURL=link.d.ts.map
317
+
318
+ // ===== File: notifications.d.ts =====
319
+ declare function pushNotification(title?: string, body?: string, icon?: NullStr): void;
320
+ declare class HyperTextNotification {
321
+ bottom: string;
322
+ right: string;
323
+ backgroundColor: string;
324
+ color: string;
325
+ padding: string;
326
+ borderRadius: string;
327
+ timeout: number;
328
+ constructor({ bottom, right, backgroundColor, color, padding, borderRadius, timeout }?: {
329
+ bottom?: string | undefined;
330
+ right?: string | undefined;
331
+ backgroundColor?: string | undefined;
332
+ color?: string | undefined;
333
+ padding?: string | undefined;
334
+ borderRadius?: string | undefined;
335
+ timeout?: number | undefined;
336
+ });
337
+ show(message: string, timeout?: number): void;
338
+ }
339
+ //# sourceMappingURL=notifications.d.ts.map
340
+
341
+ // ===== File: string.d.ts =====
342
+ declare function stringToBoolean(input: string): NullBool;
343
+ //# sourceMappingURL=string.d.ts.map
344
+
345
+ // ===== File: styles.d.ts =====
346
+ declare function input_type_fc(input: HTMLInputElement): boolean;
347
+ declare function input_form_control(form: HTMLFormElement): void;
348
+ declare function input_form_control_unline(form: HTMLFormElement): void;
349
+ declare function intToPixel(number?: NumStr): string;
350
+ //# sourceMappingURL=styles.d.ts.map
351
+
352
+ // ===== File: system.d.ts =====
353
+ declare function getSystemTheme(): NullStr;
354
+ declare function copyTextToClipboard(text: string): void;
355
+ declare function redirectBackOrClose(default_url?: string): void;
356
+ declare function getHost(): string;
357
+ //# sourceMappingURL=system.d.ts.map
358
+
359
+ // ===== File: tags.d.ts =====
360
+ type StepElementStatus = 'uncomplete' | 'active' | 'complete';
361
+ interface StepbarElement extends HTMLElement {
362
+ currentStep: number;
363
+ }
364
+ declare class AbbreviatedNumber extends HTMLElement {
365
+ isShortened: boolean;
366
+ originalNumber: number;
367
+ constructor();
368
+ static get observedAttributes(): string[];
369
+ private toggle;
370
+ private getCurrentLang;
371
+ private formatNumber;
372
+ private render;
373
+ }
374
+ declare class StepElement extends HTMLElement {
375
+ constructor();
376
+ static get observedAttributes(): string[];
377
+ get index(): number;
378
+ private get active();
379
+ private set active(value);
380
+ private get completed();
381
+ private set completed(value);
382
+ get label(): string;
383
+ set label(value: string);
384
+ private reset;
385
+ get status(): StepElementStatus;
386
+ set status(value: StepElementStatus);
387
+ connectedCallback(): void;
388
+ }
389
+ declare class Stepbar extends HTMLElement {
390
+ private _observer;
391
+ constructor();
392
+ static get observedAttributes(): string[];
393
+ attributeChangedCallback(name: string, oldValue: any, newValue: any): void;
394
+ connectedCallback(): void;
395
+ disconnectedCallback(): void;
396
+ private updateSteps;
397
+ get currentStep(): number;
398
+ set currentStep(step: number);
399
+ }
400
+ declare class HTMLFile extends HTMLElement {
401
+ constructor();
402
+ get src(): string;
403
+ set src(value: string);
404
+ static get observedAttributes(): string[];
405
+ connectedCallback(): void;
406
+ attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
407
+ private loadContent;
408
+ private executeScripts;
409
+ private loadExternalScript;
410
+ private executeInlineScript;
411
+ private get loaded();
412
+ reload(): Promise<void>;
413
+ get content(): string;
414
+ }
415
+ declare class ClickToCopy extends HTMLElement {
416
+ private notification;
417
+ constructor();
418
+ get notificationText(): string;
419
+ set notificationText(value: string);
420
+ get isNotified(): boolean;
421
+ set isNotified(value: boolean);
422
+ connectedCallback(): void;
423
+ }
424
+ //# sourceMappingURL=tags.d.ts.map
425
+
426
+ // ===== File: types.d.ts =====
427
+ /*
428
+ * hrenpack_js 3.1.2
429
+ * Copyright (c) 2024-2025, Маг Ильяс DOMA (MagIlyasDOMA)
430
+ * Licensed under MIT (https://github.com/MagIlyasDOMA/hrenpack_js/blob/main/LICENSE)
431
+ */
432
+
433
+ type NullStr = string | null;
434
+ type NullNum = number | null;
435
+ type Dict = {
436
+ [key: string]: any;
437
+ };
438
+ type StringDict = {
439
+ [key: string]: string;
440
+ };
441
+ type NumStr = number | string;
442
+ type NullBool = boolean | null;
443
+ //# sourceMappingURL=types.d.ts.map
444
+
445
+ // ===== File: url.d.ts =====
446
+ declare function isAbsoluteUrl(url: string): boolean;
447
+ declare function combineUrls(baseUrl: string, relativeUrl: string): string;
448
+ declare function getScriptSite(script: HTMLScriptElement): string;
449
+ //# sourceMappingURL=url.d.ts.map
450
+
451
+ // ===== File: uuid.d.ts =====
452
+ declare function generateUUIDv4(): string;
453
+ //# sourceMappingURL=uuid.d.ts.map
454
+