ngx-register-base 1.3.3 → 2.0.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/README.md +10 -0
- package/esm2022/lib/components/checkbox-selector/checkbox-selector.component.mjs +3 -3
- package/esm2022/lib/components/column-settings/column-settings.component.mjs +30 -25
- package/esm2022/lib/components/column-settings/components/column-settings-template/column-settings-template.component.mjs +4 -12
- package/esm2022/lib/components/column-settings/components/reset-settings-form/reset-settings-form.component.mjs +13 -0
- package/esm2022/lib/components/column-settings/consts/column-settings.consts.mjs +9 -9
- package/esm2022/lib/components/filter-button/filter-button.component.mjs +4 -5
- package/esm2022/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.mjs +22 -22
- package/esm2022/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.mjs +9 -6
- package/esm2022/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.mjs +13 -8
- package/esm2022/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.mjs +4 -4
- package/esm2022/lib/components/filters/components/filter-list/filter-list.service.mjs +16 -13
- package/esm2022/lib/components/filters/components/filter-list/filters-section/filters-section.component.mjs +4 -4
- package/esm2022/lib/components/filters/components/filter-list.module.mjs +33 -7
- package/esm2022/lib/components/filters/register-table-filter.component.mjs +5 -4
- package/esm2022/lib/components/filters/register-table-filter.module.mjs +5 -5
- package/esm2022/lib/components/index.mjs +2 -2
- package/esm2022/lib/components/inputs/index.mjs +4 -4
- package/esm2022/lib/components/inputs/param-calendar-year/param-calendar-year.component.mjs +37 -30
- package/esm2022/lib/components/inputs/param-custom/param-custom.component.mjs +3 -3
- package/esm2022/lib/components/inputs/param-date/param-date.component.mjs +27 -15
- package/esm2022/lib/components/inputs/param-date-range/index.mjs +2 -0
- package/esm2022/lib/components/inputs/param-date-range/param-date-range.component.mjs +80 -18
- package/esm2022/lib/components/inputs/param-date-time/param-date-time.component.mjs +65 -30
- package/esm2022/lib/components/inputs/param-date-time-range/date-time-range/date-time-range.component.mjs +406 -0
- package/esm2022/lib/components/inputs/param-date-time-range/date-time-range/date-time-range.consts.mjs +13 -0
- package/esm2022/lib/components/inputs/param-date-time-range/param-date-time-range.component.mjs +31 -34
- package/esm2022/lib/components/inputs/param-dropbox/param-dropbox.component.mjs +126 -0
- package/esm2022/lib/components/inputs/param-month/param-month.component.mjs +40 -9
- package/esm2022/lib/components/inputs/param-month-range/param-month-range.component.mjs +29 -8
- package/esm2022/lib/components/inputs/param-multi-select/param-multi-select.component.mjs +97 -113
- package/esm2022/lib/components/inputs/param-select/param-select.component.mjs +41 -45
- package/esm2022/lib/components/inputs/param-switcher/index.mjs +2 -0
- package/esm2022/lib/components/inputs/param-switcher/param-switcher.component.mjs +61 -11
- package/esm2022/lib/components/inputs/param-switcher/param-switcher.types.mjs +2 -0
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/consts/param-switcher-date-time-range.consts.mjs +7 -25
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.mjs +21 -20
- package/esm2022/lib/components/inputs/param-text/param-text.component.mjs +11 -6
- package/esm2022/lib/components/inputs/param-textarea/param-textarea.component.mjs +5 -3
- package/esm2022/lib/components/inputs/param-toggle/param-toggle.component.mjs +24 -7
- package/esm2022/lib/components/inputs/param-tree/param-tree.component.mjs +3 -3
- package/esm2022/lib/components/inputs/param-tree/services/param-tree.service.mjs +9 -2
- package/esm2022/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.mjs +13 -6
- package/esm2022/lib/components/inputs/param-tree-select/param-tree-select.component.mjs +9 -4
- package/esm2022/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.mjs +9 -5
- package/esm2022/lib/components/inputs/sub-components/param-label-hint-icon/param-label-hint-icon.component.mjs +12 -0
- package/esm2022/lib/components/paginator/paginator.component.mjs +10 -12
- package/esm2022/lib/components/register-table/register-table.component.mjs +31 -12
- package/esm2022/lib/components/search-input/search-input.component.mjs +5 -7
- package/esm2022/lib/components/sliding-panel/sliding-panel.component.mjs +23 -35
- package/esm2022/lib/components/template-modal/index.mjs +3 -0
- package/esm2022/lib/components/template-modal/template-modal.base.mjs +16 -0
- package/esm2022/lib/components/template-modal/template-modal.component.mjs +16 -0
- package/esm2022/lib/core/param/index.mjs +1 -1
- package/esm2022/lib/core/param/param-base.mjs +28 -3
- package/esm2022/lib/core/param/param-date-base.mjs +20 -11
- package/esm2022/lib/core/param/param-select-base.mjs +14 -6
- package/esm2022/lib/core/register-base/register-base.store.mjs +1 -1
- package/esm2022/lib/directives/date/date-time.types.mjs +1 -1
- package/esm2022/lib/providers/index.mjs +2 -0
- package/esm2022/lib/providers/provide-icons.mjs +23 -0
- package/esm2022/lib/services/date-time.service.mjs +1 -38
- package/esm2022/lib/services/dialog/dialog.service.mjs +1 -13
- package/esm2022/lib/services/dialog/dialog.types.mjs +2 -2
- package/esm2022/lib/services/message.service.mjs +48 -0
- package/esm2022/lib/services/validation-message.service.mjs +52 -0
- package/esm2022/lib/store/fast-query-store.service.mjs +16 -1
- package/esm2022/lib/utils/index.mjs +2 -1
- package/esm2022/lib/utils/utils.mjs +17 -0
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/ngx-register-base.mjs +1464 -1026
- package/fesm2022/ngx-register-base.mjs.map +1 -1
- package/icons/arrow-turn-up-left.svg +3 -0
- package/icons/check.svg +3 -0
- package/icons/floppy.svg +3 -0
- package/icons/star-empty.svg +10 -0
- package/icons/star-fill.svg +3 -0
- package/icons/trash.svg +3 -0
- package/icons/xmark.svg +3 -0
- package/lib/components/column-settings/column-settings.component.d.ts +9 -9
- package/lib/components/column-settings/components/column-settings-template/column-settings-template.component.d.ts +5 -5
- package/lib/components/{reset-settings-form → column-settings/components/reset-settings-form}/reset-settings-form.component.d.ts +2 -5
- package/lib/components/column-settings/consts/column-settings.consts.d.ts +8 -8
- package/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.d.ts +5 -8
- package/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.d.ts +2 -1
- package/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.d.ts +2 -1
- package/lib/components/filters/components/filter-list/filter-list.service.d.ts +2 -3
- package/lib/components/filters/components/filter-list.module.d.ts +7 -7
- package/lib/components/filters/register-table-filter.component.d.ts +2 -1
- package/lib/components/filters/register-table-filter.module.d.ts +2 -2
- package/lib/components/index.d.ts +1 -1
- package/lib/components/inputs/index.d.ts +3 -4
- package/lib/components/inputs/param-calendar-year/param-calendar-year.component.d.ts +2 -8
- package/lib/components/inputs/param-custom/param-custom.component.d.ts +1 -1
- package/lib/components/inputs/param-date/param-date.component.d.ts +7 -10
- package/lib/components/inputs/param-date-range/index.d.ts +1 -0
- package/lib/components/inputs/param-date-range/param-date-range.component.d.ts +13 -16
- package/lib/components/inputs/param-date-time/param-date-time.component.d.ts +8 -13
- package/lib/components/inputs/param-date-time-range/date-time-range/date-time-range.component.d.ts +96 -0
- package/lib/components/inputs/param-date-time-range/date-time-range/date-time-range.consts.d.ts +12 -0
- package/lib/components/inputs/param-date-time-range/param-date-time-range.component.d.ts +17 -16
- package/lib/components/inputs/param-dropbox/param-dropbox.component.d.ts +31 -0
- package/lib/components/inputs/param-month/param-month.component.d.ts +10 -8
- package/lib/components/inputs/param-month-range/param-month-range.component.d.ts +10 -8
- package/lib/components/inputs/param-multi-select/param-multi-select.component.d.ts +9 -11
- package/lib/components/inputs/param-select/param-select.component.d.ts +9 -12
- package/lib/components/inputs/param-switcher/index.d.ts +2 -0
- package/lib/components/inputs/param-switcher/param-switcher.component.d.ts +21 -5
- package/lib/components/inputs/param-switcher/param-switcher.types.d.ts +7 -0
- package/lib/components/inputs/param-switcher-date-time-range/consts/param-switcher-date-time-range.consts.d.ts +3 -2
- package/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.d.ts +5 -4
- package/lib/components/inputs/param-text/param-text.component.d.ts +6 -4
- package/lib/components/inputs/param-textarea/param-textarea.component.d.ts +2 -1
- package/lib/components/inputs/param-toggle/param-toggle.component.d.ts +3 -2
- package/lib/components/inputs/param-tree/services/param-tree.service.d.ts +1 -1
- package/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.d.ts +2 -1
- package/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.d.ts +2 -1
- package/lib/components/inputs/sub-components/param-label-hint-icon/param-label-hint-icon.component.d.ts +5 -0
- package/lib/components/paginator/paginator.component.d.ts +3 -4
- package/lib/components/register-table/register-table.component.d.ts +5 -3
- package/lib/components/sliding-panel/sliding-panel.component.d.ts +8 -8
- package/lib/components/template-modal/index.d.ts +2 -0
- package/lib/components/template-modal/template-modal.base.d.ts +9 -0
- package/lib/components/template-modal/template-modal.component.d.ts +6 -0
- package/lib/core/param/index.d.ts +1 -0
- package/lib/core/param/param-base.d.ts +18 -2
- package/lib/core/param/param-date-base.d.ts +15 -9
- package/lib/core/param/param-select-base.d.ts +12 -7
- package/lib/core/register-base/register-base.store.d.ts +2 -3
- package/lib/directives/date/date-time.types.d.ts +0 -2
- package/lib/providers/index.d.ts +1 -0
- package/lib/providers/provide-icons.d.ts +3 -0
- package/lib/services/date-time.service.d.ts +0 -13
- package/lib/services/dialog/dialog.service.d.ts +1 -3
- package/lib/services/dialog/dialog.types.d.ts +0 -3
- package/lib/services/message.service.d.ts +20 -0
- package/lib/services/validation-message.service.d.ts +14 -0
- package/lib/store/fast-query-store.service.d.ts +1 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/utils.d.ts +3 -0
- package/package.json +5 -12
- package/public-api.d.ts +1 -0
- package/styles/common-param.less +15 -0
- package/styles/flex.less +5 -1
- package/styles/icons.less +8 -0
- package/styles/modals.less +54 -0
- package/styles/overrides/tui/tui-input.less +94 -121
- package/styles/styles.less +2 -0
- package/esm2022/lib/components/inputs/inputs.module.mjs +0 -166
- package/esm2022/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.mjs +0 -15
- package/esm2022/lib/components/reset-settings-form/reset-settings-form.component.mjs +0 -18
- package/esm2022/lib/components/sliding-panel/sliding-panel.module.mjs +0 -19
- package/esm2022/lib/utils/prizm.shared.module.mjs +0 -284
- package/icons/calendar-blank.svg +0 -10
- package/lib/components/inputs/inputs.module.d.ts +0 -31
- package/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.d.ts +0 -6
- package/lib/components/sliding-panel/sliding-panel.module.d.ts +0 -9
- package/lib/utils/prizm.shared.module.d.ts +0 -14
- /package/icons/{calendar-icon.svg → calendar-date-time.svg} +0 -0
- /package/icons/{calendar-custom.svg → calendar-date.svg} +0 -0
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
import { AfterContentInit, AfterViewInit, ChangeDetectorRef, DestroyRef, Injector, OnInit } from '@angular/core';
|
|
1
|
+
import { AfterContentInit, AfterViewInit, ChangeDetectorRef, DestroyRef, Injector, OnInit, TemplateRef } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
import { IInputControl, InputControlGqlValue, InputControlSaveValue } from '../../types';
|
|
4
4
|
import { FormatterGqlValueType, FormatterSavedValueType, ParserSavedValueType } from '../../types/params.types';
|
|
5
|
+
import { ValidationMessageService } from '../../services/validation-message.service';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare abstract class ParamBase<ValueType extends any | null, SavedValueType extends InputControlSaveValue> implements ControlValueAccessor, OnInit, AfterViewInit, AfterContentInit {
|
|
7
8
|
private _injector;
|
|
9
|
+
protected readonly validationMessageService: ValidationMessageService | null;
|
|
8
10
|
/** Название */
|
|
9
11
|
label: string;
|
|
10
12
|
/** Текст при пустом значении control (null) */
|
|
11
13
|
placeholder: import("@angular/core").InputSignal<string>;
|
|
14
|
+
/** Отображаемый при наведении на значок рядом с лейблом текст в режиме просмотра */
|
|
15
|
+
tooltip: import("@angular/core").InputSignal<string>;
|
|
16
|
+
/** Отображаемый при наведении на значок рядом с лейблом текст в режиме редактирования */
|
|
17
|
+
editTooltip: import("@angular/core").InputSignal<string>;
|
|
18
|
+
/** Размер поля */
|
|
19
|
+
size: import("@angular/core").InputSignal<"m" | "l" | "s">;
|
|
12
20
|
/** Режим просмотра, по умолчанию выключен */
|
|
13
21
|
readmode: boolean;
|
|
14
22
|
/** Кнопка быстрой очистки поля, по умолчанию включена */
|
|
@@ -25,10 +33,16 @@ export declare abstract class ParamBase<ValueType extends any | null, SavedValue
|
|
|
25
33
|
set formatGqlValue(formatter: FormatterGqlValueType<ValueType> | undefined);
|
|
26
34
|
/** Метод для отображения значения в режиме просмотра */
|
|
27
35
|
buildShowedValue: import("@angular/core").InputSignal<(_: ValueType) => string>;
|
|
36
|
+
/** Шаблон для отображения значения в режиме просмотра */
|
|
37
|
+
templateReadValue: import("@angular/core").InputSignal<TemplateRef<{
|
|
38
|
+
$implicit: ValueType;
|
|
39
|
+
}> | null>;
|
|
28
40
|
set required(required: boolean);
|
|
29
41
|
get required(): boolean;
|
|
30
42
|
set disabled(disabled: boolean);
|
|
31
43
|
get disabled(): boolean;
|
|
44
|
+
private _errorMessage;
|
|
45
|
+
protected validationErrorHint: import("@angular/core").Signal<string>;
|
|
32
46
|
private readonly _ngControl;
|
|
33
47
|
protected readonly cdr: ChangeDetectorRef;
|
|
34
48
|
protected readonly dr: DestroyRef;
|
|
@@ -57,12 +71,14 @@ export declare abstract class ParamBase<ValueType extends any | null, SavedValue
|
|
|
57
71
|
protected isNotEmpty(): boolean;
|
|
58
72
|
ngAfterContentInit(): void;
|
|
59
73
|
private _subscribeOnValue;
|
|
74
|
+
protected onControlValueChange(): void;
|
|
60
75
|
private _updateShowedValue;
|
|
61
76
|
private _updateSavedValue;
|
|
62
77
|
private _subscribeOnSavedValue;
|
|
78
|
+
private _subscribeOnValidationMessage;
|
|
63
79
|
protected afterContentInit(): void;
|
|
64
80
|
private _setControlRequired;
|
|
65
81
|
private _setControlDisabled;
|
|
66
82
|
static ɵfac: i0.ɵɵFactoryDeclaration<ParamBase<any, any>, never>;
|
|
67
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ParamBase<any, any>, never, never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "readmode": { "alias": "readmode"; "required": false; }; "forceClear": { "alias": "forceClear"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "paramStyle": { "alias": "paramStyle"; "required": false; }; "formatSavedValue": { "alias": "formatSavedValue"; "required": false; }; "parseSavedValue": { "alias": "parseSavedValue"; "required": false; }; "formatGqlValue": { "alias": "formatGqlValue"; "required": false; }; "buildShowedValue": { "alias": "buildShowedValue"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, false, never>;
|
|
83
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ParamBase<any, any>, never, never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "editTooltip": { "alias": "editTooltip"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "readmode": { "alias": "readmode"; "required": false; }; "forceClear": { "alias": "forceClear"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "paramStyle": { "alias": "paramStyle"; "required": false; }; "formatSavedValue": { "alias": "formatSavedValue"; "required": false; }; "parseSavedValue": { "alias": "parseSavedValue"; "required": false; }; "formatGqlValue": { "alias": "formatGqlValue"; "required": false; }; "buildShowedValue": { "alias": "buildShowedValue"; "required": false; "isSignal": true; }; "templateReadValue": { "alias": "templateReadValue"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, false, never>;
|
|
68
84
|
}
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
import { Injector } from '@angular/core';
|
|
2
1
|
import { DateTimeService } from '../../services/date-time.service';
|
|
3
2
|
import { ParamBase } from './param-base';
|
|
4
|
-
import { PrizmDateTypes } from '../../utils/prizm.shared.module';
|
|
5
3
|
import { InputControlSaveValue } from '../../types';
|
|
6
|
-
import { EDatePattern
|
|
4
|
+
import { EDatePattern } from '../../directives/date/date-time.types';
|
|
5
|
+
import { TuiDay, TuiMonth, TuiMonthRange } from '@taiga-ui/cdk';
|
|
7
6
|
import * as i0 from "@angular/core";
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
export type DateRangeType = {
|
|
8
|
+
from: Date;
|
|
9
|
+
to: Date;
|
|
10
|
+
};
|
|
11
|
+
type ParamDateType = TuiDay | TuiMonth | TuiMonthRange | DateRangeType | Date;
|
|
12
|
+
export declare abstract class ParamDateBase<ValueType extends ParamDateType | null, SavedValueType extends InputControlSaveValue> extends ParamBase<ValueType, SavedValueType> {
|
|
12
13
|
protected readonly _dts: DateTimeService;
|
|
14
|
+
min: import("@angular/core").InputSignal<Date | null | undefined>;
|
|
15
|
+
max: import("@angular/core").InputSignal<Date | null | undefined>;
|
|
16
|
+
protected minDay: import("@angular/core").Signal<TuiDay | null>;
|
|
17
|
+
protected maxDay: import("@angular/core").Signal<TuiDay | null>;
|
|
18
|
+
protected readonly EDatePattern: typeof EDatePattern;
|
|
13
19
|
protected readonly timezoneChange: import("rxjs").Observable<import("../../services/date-time.service").ITimeZone>;
|
|
14
|
-
constructor(_dateInjector: Injector);
|
|
15
20
|
protected rebuildDateInNewTimezone(date: Date, prevDiff: string, currDiff: string): Date;
|
|
16
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<ParamDateBase<any, any>, never>;
|
|
17
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ParamDateBase<any, any>, never, never, {}, {}, never, never, false, never>;
|
|
22
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ParamDateBase<any, any>, never, never, { "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
|
|
18
23
|
}
|
|
24
|
+
export {};
|
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
import { Injector } from '@angular/core';
|
|
1
|
+
import { Injector, TemplateRef } from '@angular/core';
|
|
2
2
|
import { ParamBase } from './param-base';
|
|
3
|
-
import { PolymorphContent } from '@prizm-ui/components';
|
|
4
3
|
import { InputControlSaveValue } from '../../types';
|
|
5
4
|
import { InferArrayType } from '../../types/sub-types';
|
|
6
5
|
import { MetaQuery } from '../../types/params.types';
|
|
7
6
|
import { FastQueryStore } from '../../store/fast-query-store.service';
|
|
7
|
+
import { TuiDropdownWidth } from '@taiga-ui/core';
|
|
8
|
+
import { PolymorpheusContent } from '@taiga-ui/polymorpheus';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
export declare abstract class ParamSelectBase<ValueType, SavedValueType extends InputControlSaveValue> extends ParamBase<ValueType, SavedValueType> {
|
|
10
11
|
private _selectInjector;
|
|
11
12
|
items: NonNullable<InferArrayType<ValueType>>[];
|
|
12
13
|
searchable: boolean;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
minDropdownHeight: import("@angular/core").InputSignal<number>;
|
|
15
|
+
maxDropdownHeight: import("@angular/core").InputSignal<number>;
|
|
16
|
+
dropdownLimitWidth: import("@angular/core").InputSignal<TuiDropdownWidth>;
|
|
17
|
+
valueTemplate?: PolymorpheusContent;
|
|
18
|
+
listItemTemplate?: TemplateRef<any>;
|
|
19
|
+
nullContent: PolymorpheusContent | null;
|
|
17
20
|
/** Массив полей по которым будет производиться фильтрация _or */
|
|
18
21
|
searchSubfields: string[];
|
|
19
22
|
/** Флаг строгого поиска: строгий - _eq, не строгий - _ilike */
|
|
20
23
|
strictSearch: boolean;
|
|
21
24
|
selectClasses?: string;
|
|
22
25
|
limit: number;
|
|
26
|
+
/** Автозаполнение при автозапросе получения значений в поле */
|
|
27
|
+
autoFill: boolean;
|
|
23
28
|
/** форматтер для задания кастомного отображения значения в поле */
|
|
24
29
|
formatShowedValue: (value: any, field: string) => string;
|
|
25
30
|
/** мета для автоматической подргузки значений из таблицы */
|
|
@@ -38,5 +43,5 @@ export declare abstract class ParamSelectBase<ValueType, SavedValueType extends
|
|
|
38
43
|
valueField: string | null;
|
|
39
44
|
};
|
|
40
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<ParamSelectBase<any, any>, never>;
|
|
41
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ParamSelectBase<any, any>, never, never, { "items": { "alias": "items"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "maxDropdownHeight": { "alias": "maxDropdownHeight"; "required": false; }; "valueTemplate": { "alias": "valueTemplate"; "required": false; }; "listItemTemplate": { "alias": "listItemTemplate"; "required": false; }; "nullContent": { "alias": "nullContent"; "required": false; }; "searchSubfields": { "alias": "searchSubfields"; "required": false; }; "strictSearch": { "alias": "strictSearch"; "required": false; }; "selectClasses": { "alias": "selectClasses"; "required": false; }; "limit": { "alias": "limit"; "required": false; }; "formatShowedValue": { "alias": "formatShowedValue"; "required": false; }; "meta": { "alias": "meta"; "required": false; }; }, { "itemsChange": "itemsChange"; }, never, never, false, never>;
|
|
46
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ParamSelectBase<any, any>, never, never, { "items": { "alias": "items"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "minDropdownHeight": { "alias": "minDropdownHeight"; "required": false; "isSignal": true; }; "maxDropdownHeight": { "alias": "maxDropdownHeight"; "required": false; "isSignal": true; }; "dropdownLimitWidth": { "alias": "dropdownLimitWidth"; "required": false; "isSignal": true; }; "valueTemplate": { "alias": "valueTemplate"; "required": false; }; "listItemTemplate": { "alias": "listItemTemplate"; "required": false; }; "nullContent": { "alias": "nullContent"; "required": false; }; "searchSubfields": { "alias": "searchSubfields"; "required": false; }; "strictSearch": { "alias": "strictSearch"; "required": false; }; "selectClasses": { "alias": "selectClasses"; "required": false; }; "limit": { "alias": "limit"; "required": false; }; "autoFill": { "alias": "autoFill"; "required": false; }; "formatShowedValue": { "alias": "formatShowedValue"; "required": false; }; "meta": { "alias": "meta"; "required": false; }; }, { "itemsChange": "itemsChange"; }, never, never, false, never>;
|
|
42
47
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ComponentStore } from '@ngrx/component-store';
|
|
2
|
-
import { PrizmTableCellSorter } from '@prizm-ui/components';
|
|
3
2
|
import { Apollo, MutationResult } from 'apollo-angular';
|
|
4
3
|
import { Observable, ReplaySubject, Subscription } from 'rxjs';
|
|
5
|
-
import { IHasuraQueryFilter } from '../../components/register-table/model/schema';
|
|
4
|
+
import { IHasuraQueryFilter, RegisterTableCellSorter } from '../../components/register-table/model/schema';
|
|
6
5
|
import { GqlFields } from '../../types/inputs.types';
|
|
7
6
|
import { IBaseRegisterStore, IBaseRegisterStoreState } from '../../types/register-base.types';
|
|
8
7
|
import { HasuraError } from '../../types/hasura.types';
|
|
@@ -29,7 +28,7 @@ export declare abstract class RegisterBaseStore<Type extends Record<string, any>
|
|
|
29
28
|
filter: IHasuraQueryFilter<Type>;
|
|
30
29
|
callback?: (data: Type[]) => void;
|
|
31
30
|
}>) => Subscription;
|
|
32
|
-
abstract buildFilter(limit: number | undefined, offset: number | undefined, gqlFilter: GqlFields | undefined, sorter?:
|
|
31
|
+
abstract buildFilter(limit: number | undefined, offset: number | undefined, gqlFilter: GqlFields | undefined, sorter?: RegisterTableCellSorter<Type>[]): IHasuraQueryFilter<Type>;
|
|
33
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<RegisterBaseStore<any, any>, never>;
|
|
34
33
|
static ɵprov: i0.ɵɵInjectableDeclaration<RegisterBaseStore<any, any>>;
|
|
35
34
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { PrizmDay, PrizmTime } from '@prizm-ui/components';
|
|
2
1
|
export declare enum EDatePattern {
|
|
3
2
|
MONTH_YEAR = "MM.yyyy",
|
|
4
3
|
DATE = "dd.MM.yyyy",
|
|
@@ -29,4 +28,3 @@ export declare enum ETimezone {
|
|
|
29
28
|
IRK = "+08:00",
|
|
30
29
|
YAK = "+09:00"
|
|
31
30
|
}
|
|
32
|
-
export type SmaPrizmDateTime = [PrizmDay, PrizmTime | undefined];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { provideSprocIcons } from './provide-icons';
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { Moment } from 'moment-timezone';
|
|
2
|
-
import { EDatePattern, SmaPrizmDateTime } from '../directives/date/date-time.types';
|
|
3
|
-
import { PrizmDateTimeRange } from '@prizm-ui/components';
|
|
4
|
-
import { TuiDay } from '@taiga-ui/cdk';
|
|
5
2
|
import * as i0 from "@angular/core";
|
|
6
3
|
export interface ITimeZone {
|
|
7
4
|
time_diff: string;
|
|
@@ -65,16 +62,6 @@ export declare class DateTimeService {
|
|
|
65
62
|
getCurrentDateWithoutTime(): Date;
|
|
66
63
|
getDateWithoutTime(date: Date): Date;
|
|
67
64
|
getXMonthBackDate(monthBackNumber: number): Date;
|
|
68
|
-
prizmDateTimeRangeToNativeDates(range: PrizmDateTimeRange): {
|
|
69
|
-
from: Date;
|
|
70
|
-
to: Date;
|
|
71
|
-
};
|
|
72
|
-
prizmDateTimeRangeFromNativeDates(from: Date, to: Date): PrizmDateTimeRange;
|
|
73
|
-
prizmDateTimeToNativeDate(prizmDateTime: SmaPrizmDateTime): Date;
|
|
74
|
-
getTuiDayFromString(date: string): TuiDay;
|
|
75
|
-
getTuiDayFromDate(date: Date): TuiDay;
|
|
76
|
-
transferTuiDayToString(date: TuiDay | null, pattern?: EDatePattern): string | null;
|
|
77
|
-
toSmaPrizmDateTime(dateString: string): SmaPrizmDateTime;
|
|
78
65
|
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeService, never>;
|
|
79
66
|
static ɵprov: i0.ɵɵInjectableDeclaration<DateTimeService>;
|
|
80
67
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { DialogContext
|
|
3
|
+
import { DialogContext } from './dialog.types';
|
|
4
4
|
import { TuiDialogOptions } from '@taiga-ui/core';
|
|
5
5
|
import { PolymorpheusContent } from '@taiga-ui/polymorpheus';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class DialogService {
|
|
8
|
-
private readonly _dialogService;
|
|
9
8
|
private readonly _tuiDialogService;
|
|
10
|
-
openModal(template: unknown, config: Partial<DialogOptions<unknown, unknown>>): Observable<any>;
|
|
11
9
|
openModalTaiga<Context extends DialogContext, Result = any>(component: new (...args: any[]) => unknown, context: Context, injector?: Injector): Observable<Result>;
|
|
12
10
|
/**
|
|
13
11
|
* Универсальная функция открытия диалога
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { PrizmDialogOptions } from '@prizm-ui/components';
|
|
2
1
|
import { TuiDialogSize } from '@taiga-ui/core';
|
|
3
|
-
export { PrizmOverlayInsidePlacement as DialogOverlayInsidePlacement } from '@prizm-ui/components';
|
|
4
|
-
export type DialogOptions<O, DATA> = PrizmDialogOptions<O, DATA>;
|
|
5
2
|
export type DialogSize = TuiDialogSize;
|
|
6
3
|
export interface DialogContext {
|
|
7
4
|
closeable?: boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TuiAlertOptions } from '@taiga-ui/core';
|
|
2
|
+
import type { PolymorpheusContent } from '@taiga-ui/polymorpheus';
|
|
3
|
+
import { TuiPopoverContext } from '@taiga-ui/cdk';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare const AlertType: {
|
|
6
|
+
readonly INFO: "info";
|
|
7
|
+
readonly POSITIVE: "positive";
|
|
8
|
+
readonly NEGATIVE: "negative";
|
|
9
|
+
readonly WARNING: "warning";
|
|
10
|
+
readonly NEUTRAL: "neutral";
|
|
11
|
+
};
|
|
12
|
+
export declare class MessageService {
|
|
13
|
+
private readonly _alerts;
|
|
14
|
+
alertsCount: import("@angular/core").WritableSignal<number>;
|
|
15
|
+
private refs;
|
|
16
|
+
showAlert<Option extends TuiAlertOptions<any> = TuiAlertOptions<any>, Result = void>(content: PolymorpheusContent<Option & TuiPopoverContext<Result>>, options?: Partial<Option>): void;
|
|
17
|
+
closeAll(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MessageService, never>;
|
|
19
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MessageService>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { AbstractControl } from '@angular/forms';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare const VALIDATION_MESSAGES_TOKEN: InjectionToken<Map<string, string>>;
|
|
6
|
+
export declare class ValidationMessageService {
|
|
7
|
+
private readonly _messagesMap;
|
|
8
|
+
private defaultValidationMessages;
|
|
9
|
+
/** Возвращает Observable с текстом ошибки для контрола */
|
|
10
|
+
observeControlErrors(control: AbstractControl): Observable<string | null>;
|
|
11
|
+
private _getErrorMessage;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ValidationMessageService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ValidationMessageService>;
|
|
14
|
+
}
|
|
@@ -12,6 +12,7 @@ export declare class FastQueryStore {
|
|
|
12
12
|
totalElements: number;
|
|
13
13
|
selectedIdsQuery?: any[];
|
|
14
14
|
}>;
|
|
15
|
+
fetchAllCount(meta: MetaQuery, limit: number): Observable<number>;
|
|
15
16
|
generateGqlQuery(meta: MetaQuery, withoutAggregate?: boolean, withPickedSearch?: boolean): DocumentNode;
|
|
16
17
|
private _buildDeepDataFromValue;
|
|
17
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<FastQueryStore, never>;
|
package/lib/utils/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-register-base",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"schematics": "./schematics/collection.json",
|
|
5
5
|
"ng-update": {
|
|
6
6
|
"migrations": "./schematics/migration-collection.json"
|
|
@@ -24,17 +24,10 @@
|
|
|
24
24
|
"@angular/core": "^18.2.0",
|
|
25
25
|
"@apollo/client": "^3.13.5",
|
|
26
26
|
"@ngrx/component-store": "^18.1.1",
|
|
27
|
-
"@
|
|
28
|
-
"@
|
|
29
|
-
"@
|
|
30
|
-
"@
|
|
31
|
-
"@prizm-ui/i18n": "^5.9",
|
|
32
|
-
"@prizm-ui/icons": "^5.9",
|
|
33
|
-
"@prizm-ui/theme": "^5.9",
|
|
34
|
-
"@taiga-ui/addon-table": "4.44.0",
|
|
35
|
-
"@taiga-ui/core": "4.44.0",
|
|
36
|
-
"@taiga-ui/kit": "4.44.0",
|
|
37
|
-
"@taiga-ui/legacy": "4.44.0",
|
|
27
|
+
"@taiga-ui/addon-table": "4.48.0",
|
|
28
|
+
"@taiga-ui/core": "4.48.0",
|
|
29
|
+
"@taiga-ui/kit": "4.48.0",
|
|
30
|
+
"@taiga-ui/legacy": "4.48.0",
|
|
38
31
|
"apollo-angular": "^10.0.3",
|
|
39
32
|
"date-fns": "^4.1.0",
|
|
40
33
|
"graphql": "^16.10.0",
|
package/public-api.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './lib/components/index';
|
|
|
2
2
|
export * from './lib/consts/index';
|
|
3
3
|
export * from './lib/core/index';
|
|
4
4
|
export * from './lib/directives/index';
|
|
5
|
+
export * from './lib/providers/index';
|
|
5
6
|
export * from './lib/services/index';
|
|
6
7
|
export * from './lib/store/index';
|
|
7
8
|
export * from './lib/types/index';
|
package/styles/common-param.less
CHANGED
|
@@ -79,6 +79,15 @@
|
|
|
79
79
|
.label {
|
|
80
80
|
.default-label;
|
|
81
81
|
}
|
|
82
|
+
|
|
83
|
+
input,
|
|
84
|
+
textarea,
|
|
85
|
+
sproc-custom-date-time-range,
|
|
86
|
+
tui-multi-select {
|
|
87
|
+
.input-text-14px;
|
|
88
|
+
|
|
89
|
+
border: 1px solid var(--stroke1);
|
|
90
|
+
}
|
|
82
91
|
}
|
|
83
92
|
}
|
|
84
93
|
|
|
@@ -87,6 +96,7 @@
|
|
|
87
96
|
width: 100%;
|
|
88
97
|
display: flex;
|
|
89
98
|
flex-direction: column;
|
|
99
|
+
border-bottom: 1px solid var(--stroke1);
|
|
90
100
|
|
|
91
101
|
.label-wrapper {
|
|
92
102
|
.default-label-wrapper;
|
|
@@ -97,6 +107,11 @@
|
|
|
97
107
|
.label {
|
|
98
108
|
.default-label;
|
|
99
109
|
}
|
|
110
|
+
|
|
111
|
+
input,
|
|
112
|
+
textarea {
|
|
113
|
+
.input-text-12px;
|
|
114
|
+
}
|
|
100
115
|
}
|
|
101
116
|
}
|
|
102
117
|
|
package/styles/flex.less
CHANGED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
@import 'fonts';
|
|
2
|
+
// Общие миксины для стилизации модалок
|
|
3
|
+
|
|
4
|
+
// Форма модального окна фиксированной ширины с блоками контента и футера с кнопками
|
|
5
|
+
.modal-form(@width: auto) {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
width: @width;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Контейнер модального окна
|
|
12
|
+
.modal-form__content(@padding: 24px, @gap: 16px) {
|
|
13
|
+
display: flex;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
align-items: center;
|
|
16
|
+
padding: @padding;
|
|
17
|
+
gap: @gap;
|
|
18
|
+
align-self: stretch;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Футер модального окна (контейнер кнопок с бордером)
|
|
22
|
+
.modal-form__footer(@padding: 8px 16px, @gap: 8px) {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: flex-start;
|
|
25
|
+
gap: @gap;
|
|
26
|
+
flex: 1 0 0;
|
|
27
|
+
align-self: stretch;
|
|
28
|
+
border-top: 1px solid var(--table-stroke);
|
|
29
|
+
padding: @padding;
|
|
30
|
+
height: 56px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.modal-form__title {
|
|
34
|
+
color: var(--text-main);
|
|
35
|
+
text-align: center;
|
|
36
|
+
font-variant-numeric: lining-nums tabular-nums;
|
|
37
|
+
|
|
38
|
+
.static-title-h4;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.icon-title-wrapper {
|
|
42
|
+
display: flex;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
align-items: center;
|
|
45
|
+
align-self: stretch;
|
|
46
|
+
gap: 8px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.exclamation-icon {
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
align-items: center;
|
|
53
|
+
content: url('/assets/ngx-register-base/icons/circle-exclamation-fill.svg');
|
|
54
|
+
}
|