@ldmjs/ui 1.0.20 → 1.0.22

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/README.md CHANGED
@@ -106,16 +106,36 @@ const vuetify = createVuetify({
106
106
  - ld-text-markup
107
107
  - ld-switch
108
108
  - ld-dialog
109
+ - ld-data-iterator
110
+ - ld-pager
109
111
 
110
112
  # Utilities
111
113
 
112
114
  - awaiting
113
- - isDefined
114
- - uidGen
115
+ - base64
116
+ .encode
117
+ .decode
118
+ .isValid
119
+ - cookie
120
+ .get
121
+ .set
122
+ .delete
115
123
  - delay
116
124
  - deepValueGetter
125
+ - isDefined
117
126
  - isObjectEmpty
118
- - datetime
127
+ - pluralizeNoun
128
+ - strings
129
+ .camelCase
130
+ .capitalize
131
+ - uidGen
132
+ - fileToArrayBuffer
133
+ - fileToBase64
134
+ - base64ToUint8Array
135
+ - Uint8ArrayToHex
136
+ - hexToArrayBuffer
137
+ - Uint8ArrayToBase64
138
+ - arrayBufferToUint8Array
119
139
 
120
140
  # Directives
121
141
  - v-active
package/dist/index.d.ts CHANGED
@@ -18,7 +18,7 @@ import { Dialog } from './types/dialogs';
18
18
  */
19
19
  export declare function awaiting(callback: () => unknown): Promise<any>;
20
20
  /**
21
- * a = null (undefined, '', NaN) => isDefined(a) // false
21
+ * a = null (undefined, NaN) => isDefined(a) // false
22
22
  */
23
23
  export declare function isDefined(value: unknown): boolean;
24
24
  /**
@@ -44,15 +44,84 @@ export declare function deepValueGetter(obj: Record<string, unknown>, path: stri
44
44
  */
45
45
  export declare function isObjectEmpty(obj: Record<string, unknown>): boolean;
46
46
 
47
+ /**
48
+ * @param num кол-во элементов
49
+ * @param one название в единичном варианте (1 элемент, 21 элемент и тд)
50
+ * @param two название в двоичном варианте (2 элемента, 3 элемента и тд)
51
+ * @param five название во множественном варианте (5 элементов, много элементов)
52
+ * @param printNum выводить ли кол-во
53
+ */
54
+ export declare function pluralizeNoun(
55
+ num: string | number,
56
+ one: string,
57
+ two: string,
58
+ five: string,
59
+ printNum?: boolean
60
+ ): string;
61
+
62
+ /* convert File or Blob to ArrayBuffer */
63
+ export declare function fileToArrayBuffer(value: File | Blob): Promise<ArrayBuffer>;
64
+ /* convert File or Blob to Base64 */
65
+ export declare function fileToBase64(value: File | Blob): Promise<string>;
66
+ /* convert Base64 string to Uint8Array */
67
+ export declare function base64ToUint8Array(base64: string): Uint8Array;
68
+ /* convert Uint8Array to Hexadecimal system */
69
+ export declare function Uint8ArrayToHex(bytes: Uint8Array): string;
70
+ /* convert a hex string to an ArrayBuffer */
71
+ export declare function hexToArrayBuffer(hex: string): Array<number>;
72
+ /* convert Uint8Array to Base64 */
73
+ export declare function Uint8ArrayToBase64(value: Uint8Array): string
74
+ /* convert ArrayBuffer to Uint8Array */
75
+ export declare function arrayBufferToUint8Array(value: ArrayBuffer): Uint8Array;
76
+
77
+ export declare const cookie: {
78
+ get: (key: string) => string;
79
+ set: (key: string, value: string, expires?: string) => void;
80
+ delete: (key: string) => void;
81
+ }
82
+
83
+ export declare const base64: {
84
+ encode: (input: string) => string;
85
+ decode: (input: string) => string;
86
+ isValid: (input: string) => boolean;
87
+ }
88
+
89
+ export declare const strings: {
90
+ camelCase: (str: string) => string;
91
+ capitalize: (str: string) => string;
92
+ }
93
+
47
94
  declare module '@vue/runtime-core' {
48
95
  export interface ComponentCustomProperties {
49
96
  $utils: {
50
- awaiting: typeof awaiting;
51
- isDefined: typeof isDefined;
52
- uidGen: typeof uidGen;
53
- delay: typeof delay;
54
- deepValueGetter: typeof deepValueGetter;
55
- isObjectEmpty: typeof isObjectEmpty;
97
+ awaiting: (callback: () => unknown) => Promise<any>;
98
+ base64: {
99
+ encode: (input: string) => string;
100
+ decode: (input: string) => string;
101
+ isValid: (input: string) => boolean;
102
+ }
103
+ cookie: {
104
+ get: (key: string) => string;
105
+ set: (key: string, value: string, expires?: string) => void;
106
+ delete: (key: string) => void;
107
+ }
108
+ isDefined: (value: unknown) => boolean;
109
+ delay: (timeout: number) => Promise<void>;
110
+ deepValueGetter: (obj: Record<string, unknown>, path: string) => unknown;
111
+ isObjectEmpty: (obj: Record<string, unknown>) => boolean;
112
+ pluralizeNoun: (num: string | number,one: string,two: string, five: string, printNum?: boolean) => string;
113
+ strings: {
114
+ camelCase: (str: string) => string;
115
+ capitalize: (str: string) => string;
116
+ }
117
+ uidGen: (len?: number, format?: string) => string | number;
118
+ fileToArrayBuffer: (value: File | Blob) => Promise<ArrayBuffer>;
119
+ fileToBase64: (value: File | Blob) => Promise<string>;
120
+ base64ToUint8Array: (base64: string) => Uint8Array;
121
+ Uint8ArrayToHex: (bytes: Uint8Array) => string;
122
+ hexToArrayBuffer: (hex: string) => Array<number>;
123
+ Uint8ArrayToBase64: (value: Uint8Array) => string;
124
+ arrayBufferToUint8Array: (value: ArrayBuffer) => Uint8Array;
56
125
  };
57
126
  $ldmui: {
58
127
  options: ldmuiOptions;
@@ -102,3 +171,6 @@ export {
102
171
  IIteratorRemovedItem,
103
172
  IIteratorSortField
104
173
  } from './types/iterator';
174
+ export {
175
+ IPagerOptions
176
+ } from './types/pager';