@scbt-ecom/ui 0.124.2 → 0.126.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/dist/lib/exports/ui.js +1 -1
- package/dist/lib/exports/utils.js +1 -1
- package/dist/lib/shared/ui/calendar/model/utils.js +1 -1
- package/dist/lib/shared/ui/calendar/model/utils.js.map +1 -1
- package/dist/lib/shared/ui/index.js +1 -1
- package/dist/lib/shared/ui/table/index.js +1 -1
- package/dist/lib/shared/utils/index.js +1 -1
- package/dist/lib/shared/utils/variableHolder/index.js +2 -0
- package/dist/lib/shared/utils/variableHolder/index.js.map +1 -0
- package/dist/lib/shared/utils/variableHolder/variableContextHolder.js +2 -0
- package/dist/lib/shared/utils/variableHolder/variableContextHolder.js.map +1 -0
- package/dist/node_modules/prosemirror-view/dist/index.js +4 -4
- package/dist/node_modules/prosemirror-view/dist/index.js.map +1 -1
- package/dist/stats.html +1 -1
- package/dist/types/lib/shared/ui/calendar/model/utils.d.ts +4 -1
- package/dist/types/lib/shared/ui/table/index.d.ts +1 -0
- package/dist/types/lib/shared/utils/index.d.ts +1 -0
- package/dist/types/lib/shared/utils/variableHolder/index.d.ts +1 -0
- package/dist/types/lib/shared/utils/variableHolder/variableContextHolder.d.ts +49 -0
- package/package.json +1 -1
|
@@ -5,9 +5,12 @@ export declare const DATE_VISIBLE_PATTERN = "dd.MM.yyyy";
|
|
|
5
5
|
* new Date() -> '10.10.2024'
|
|
6
6
|
* @param {Date} date
|
|
7
7
|
* @param {string} locale
|
|
8
|
+
* @param options
|
|
8
9
|
* @returns Форматированная строка
|
|
9
10
|
*/
|
|
10
|
-
export declare const formatDateToLocaleString: (date: Date, locale?: string
|
|
11
|
+
export declare const formatDateToLocaleString: (date: Date, locale?: string, options?: {
|
|
12
|
+
time?: boolean;
|
|
13
|
+
}) => string;
|
|
11
14
|
/**
|
|
12
15
|
* Форматирование объекта даты в читаемую строку года
|
|
13
16
|
* @example
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VariableContextHolder, type VariableEntry, type IVariableContextHolder, type Variable } from './variableContextHolder';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface Variable<Key = string, Value = string> {
|
|
2
|
+
_id: string;
|
|
3
|
+
key: Key;
|
|
4
|
+
value: Value;
|
|
5
|
+
createdAt: string;
|
|
6
|
+
updatedAt: string;
|
|
7
|
+
description: string;
|
|
8
|
+
}
|
|
9
|
+
export type VariableEntry<Key = string, Value = string> = [Key, Value];
|
|
10
|
+
export interface IVariableContextHolder<Key, Value> {
|
|
11
|
+
variables: Variable<Key, Value>[];
|
|
12
|
+
append: (variable: Variable<Key, Value>) => void;
|
|
13
|
+
remove: (key: Key) => void;
|
|
14
|
+
has: (key: Key) => boolean;
|
|
15
|
+
replace: (variables: Variable<Key, Value>[]) => void;
|
|
16
|
+
clear: () => void;
|
|
17
|
+
update: (id: string, variable: Variable<Key, Value>) => void;
|
|
18
|
+
entriesOf: (...keys: Key[]) => VariableEntry<Key, Value>[];
|
|
19
|
+
observe: (listener: (variables: Variable<Key, Value>[]) => void) => () => void;
|
|
20
|
+
get: (key: Key) => Variable<Key, Value> | undefined;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Класс для управления переменными
|
|
24
|
+
*/
|
|
25
|
+
export declare class VariableContextHolder<Key extends string = string, Value = string> implements IVariableContextHolder<Key, Value> {
|
|
26
|
+
private _store;
|
|
27
|
+
private _variables;
|
|
28
|
+
private _listeners;
|
|
29
|
+
private _nextListenerId;
|
|
30
|
+
private static _VARIABLE_REGEX;
|
|
31
|
+
private static _VARIABLE_PATTERN;
|
|
32
|
+
private static _instance;
|
|
33
|
+
private constructor();
|
|
34
|
+
static unwrap(variable: string): string;
|
|
35
|
+
static wrap(variable: string): string;
|
|
36
|
+
static match(pattern: string): string[] | null;
|
|
37
|
+
static getInstance(store: string): VariableContextHolder;
|
|
38
|
+
get variables(): Variable<Key, Value>[];
|
|
39
|
+
private collect;
|
|
40
|
+
get: (id: string) => Variable<Key, Value> | undefined;
|
|
41
|
+
append: (variable: Variable<Key, Value>) => void;
|
|
42
|
+
clear: () => void;
|
|
43
|
+
entriesOf: (...keys: Key[]) => VariableEntry<Key, Value>[];
|
|
44
|
+
remove: (key: Key) => void;
|
|
45
|
+
replace: (variables: Variable<Key, Value>[]) => Variable<Key, Value>[];
|
|
46
|
+
update: (id: string, variable: Variable<Key, Value>) => Variable<Key, Value>[];
|
|
47
|
+
observe: (listener: (variables: Variable<Key, Value>[]) => void) => (() => void);
|
|
48
|
+
has(key: Key): boolean;
|
|
49
|
+
}
|