eservices-core 2.0.0-beta.4 → 2.0.0-beta.40

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.
@@ -0,0 +1,8 @@
1
+ import { default as LanguageResolver } from './LanguageResolver.ts';
2
+ export default class CustomLanguageResolver extends LanguageResolver {
3
+ private getHandler;
4
+ private setHandler;
5
+ constructor(getHandler: () => string | null, setHandler: (str: string) => void);
6
+ get(): string;
7
+ set(lang: string): void;
8
+ }
@@ -0,0 +1,4 @@
1
+ export default class LanguageResolver {
2
+ get(): string;
3
+ set(lang: string): void;
4
+ }
@@ -5,6 +5,7 @@ export declare class ApplicationManager extends EventEmitter {
5
5
  static DEFAULT_LANGUAGE: string;
6
6
  static EVENT_CONTEXT_UPDATE: string;
7
7
  static EVENT_READY_UPDATE: string;
8
+ languageResolver: any;
8
9
  set language(lang: string);
9
10
  get language(): string;
10
11
  /**
@@ -1,5 +1,5 @@
1
1
  import { IExtendedMetadata } from './metadata/types/metadata.types.ts';
2
- import { IListCell, IRowContext, IExtendListCell } from './metadata/types/metadata.list.types.ts';
2
+ import { IExtendListCell, IListCell, IRowContext, ListPaginationType } from './metadata/types/metadata.list.types.ts';
3
3
  import { VNode } from 'vue';
4
4
  import { IFieldUsageContext } from './metadata/types/usage-context.types.ts';
5
5
  import { Form } from 'jenesius-vue-form';
@@ -23,6 +23,7 @@ interface ConfigurationInterface {
23
23
  * @deprecated Please use coreUtils.addListCellHandler
24
24
  */
25
25
  listCellHandler?: IListCellHandler<any>;
26
+ listPaginationType: ListPaginationType;
26
27
  /**
27
28
  * @description Функция обработчик для ячейки конфигурации. При помощи неё можно изменить(добавить новые
28
29
  * свойства) для определённой ячейки в конфигурации списка(таблицы). Используется при convert-list-config
@@ -33,4 +33,10 @@ export default class DataService {
33
33
  * @param {IDataEntityDeleteOptions} options Параметры удаления сущности.
34
34
  * */
35
35
  static deleteOne(entityName: IEntityName, options: IDataEntityDeleteOptions): any;
36
+ /**
37
+ * @description Функция для получения идентификатора по catalogId
38
+ * @param entityName Название сущности
39
+ * @param catalogId Строковый CatalogId
40
+ */
41
+ static getEntityIdByCatalogId(entityName: IEntityName, catalogId: string): any;
36
42
  }
@@ -1,3 +1,5 @@
1
1
  import { default as EngineUtils } from './utils/engine.utils.ts';
2
2
  import { default as EngineError } from './exceptions/engine.error.ts';
3
+ import { IDownloadFileOptions, IOptionRow } from './types/engine.utils.types.ts';
3
4
  export { EngineUtils, EngineError };
5
+ export type { IDownloadFileOptions, IOptionRow };
@@ -0,0 +1,8 @@
1
+ export interface IDownloadFileOptions {
2
+ blank?: boolean;
3
+ filename?: string;
4
+ }
5
+ export interface IOptionRow {
6
+ label: string;
7
+ value: string | number;
8
+ }
@@ -1,5 +1,6 @@
1
1
  import { NotificationType } from '../../types/notification-type.ts';
2
2
  import { IDecimalFilterValue } from '../../shared/filter/types/filter.types.ts';
3
+ import { IDownloadFileOptions } from '../types/engine.utils.types.ts';
3
4
  export default class EngineUtils {
4
5
  static searchWordInElement(element: unknown, search: string): boolean;
5
6
  static asyncWhile(condition: () => boolean, fn: () => Promise<any>): Promise<void>;
@@ -18,4 +19,7 @@ export default class EngineUtils {
18
19
  static isMinOrMoreObject(value: unknown): value is IDecimalFilterValue;
19
20
  static processListFormatter(formatter: string, values: unknown): string;
20
21
  static getCellNamesFromListFormatter(formatter: string): string[];
22
+ static valuesToUpperCase(values: unknown): Record<string, unknown>;
23
+ static downloadFile(href: string, options?: IDownloadFileOptions): void;
24
+ static clickOutside(el: HTMLElement, callback: any): () => void;
21
25
  }
@@ -1,8 +1,9 @@
1
+ import { IListSettings } from '../index';
1
2
  export default function useListConfiguration(activate: any, handlerChangeConfig?: () => any): {
2
3
  state: {
3
4
  entity: string | null;
4
5
  mark: string | null | undefined | string[];
5
- settings: any;
6
+ settings: IListSettings | null;
6
7
  };
7
8
  readonly customFilters: any;
8
9
  set: (entity: IListConfigurationState["entity"], mark: undefined | string | string[]) => void;
@@ -25,6 +26,6 @@ export default function useListConfiguration(activate: any, handlerChangeConfig?
25
26
  interface IListConfigurationState {
26
27
  entity: string | null;
27
28
  mark: string | null | undefined | string[];
28
- settings: any;
29
+ settings: IListSettings | null;
29
30
  }
30
31
  export {};
@@ -1,8 +1,5 @@
1
+ import { IListCell } from '../index';
1
2
  type IFileDownloadFormat = "csv" | "json";
2
- type ICellConfiguration = {
3
- label: string;
4
- name: string;
5
- };
6
3
  /**
7
4
  * @description Хук для загрузки данных списка. Предоставляет и процесс загрузки и процесс скачивания файла на устройство.
8
5
  * @param fileFormat Формат данных необходимый для загрузки
@@ -14,7 +11,7 @@ type ICellConfiguration = {
14
11
  * @param customFilters
15
12
  * @param options Дополнительные опции(данные для customFilter, или предустановленный limit)
16
13
  */
17
- export default function useListDownload(fileFormat: IFileDownloadFormat, entityName: string, cellConfig: ICellConfiguration[], filter?: string, order?: unknown, limit?: number, customFilters?: any, options?: Partial<IUseListDownloadOptions>): {
14
+ export default function useListDownload(fileFormat: IFileDownloadFormat, entityName: string, cellConfig: IListCell[], filter?: string, order?: unknown, limit?: number, customFilters?: any, options?: Partial<IUseListDownloadOptions>): {
18
15
  downloadFile: () => void;
19
16
  reject: () => void;
20
17
  state: {
@@ -32,6 +29,7 @@ interface IUseListDownloadOptions {
32
29
  customFilters?: string[];
33
30
  extend: boolean;
34
31
  overrideEntity: string;
32
+ overrideListMark?: string;
35
33
  overridePrefix: string;
36
34
  useSelectedRows: boolean;
37
35
  selectedRows?: any[];
@@ -16,6 +16,9 @@ import { default as WidgetAction } from './widgets/action/widget-action.vue';
16
16
  import { default as WidgetResolverEntity } from './widgets/widget-resolver-entity/WidgetResolverEntity.vue';
17
17
  import { default as WidgetInputLookupCode } from './widgets/input-lookup-code/input-lookup-code.vue';
18
18
  import { default as WidgetCalendar } from './widgets/calendar/widget-calendar.vue';
19
+ import { default as ModalSelect } from './widgets/modal-select/modal-select.vue';
20
+ import { WidgetSelect, WidgetSelectTrigger, WidgetSelectContent, WidgetSelectItem, injectSelectContext } from './widgets/widget-select/index';
21
+ import { PopperContent, PopperTrigger, Popper, injectPopperContext } from './widgets/popper';
19
22
  import { default as ModalListDownload } from './widgets/modal-list-download/modal-list-download.vue';
20
23
  import { default as ModalVersionHistory } from './widgets/modal-version-history/modal-version-history.vue';
21
24
  import { default as ModalEntitySelection } from './widgets/modal-entity-selection/modal-entity-selection.vue';
@@ -28,6 +31,7 @@ import { ICoordinate } from './types/app-server-types';
28
31
  import { IWizardStepConfig, useWizard } from './hooks/use-wizard';
29
32
  import { IInputButtonSelection } from './shared/button-selection/types/button-selection.types.ts';
30
33
  import { IMasterEntity, MetadataService, UsageContextService, IListCell, IListOrder, IListSettings } from './metadata';
34
+ import { IOptionRow } from './engine/index.ts';
31
35
  import { config, configuration } from './config';
32
36
  import { constants } from './constants';
33
37
  import { default as socketProcess } from './methods/socket-process';
@@ -98,6 +102,8 @@ import { default as SocketSystem } from './socket/entities/socket.system.ts';
98
102
  import { EngineUtils } from './engine';
99
103
  import { Filter } from './shared';
100
104
  import { Socket } from './socket';
105
+ import { default as CustomLanguageResolver } from './classes/CustomLanguageResolver.ts';
106
+ import { default as LanguageResolver } from './classes/LanguageResolver.ts';
101
107
  import { DataService, BatchService } from './data';
102
108
  import { default as authService } from './services/auth-service';
103
109
  import { default as HistoryService } from './history/services/history.service.ts';
@@ -107,9 +113,9 @@ import { default as fileService } from './services/file-service';
107
113
  import { default as billingService } from './billing/services/billing-service.ts';
108
114
  import { ApplicationStatus, RecordOperation } from './enums';
109
115
  export { documentsService, invitationService, EngineError, };
110
- export { WidgetAction, WidgetButton, WidgetCalendar, WidgetMultiButton, WidgetIcon, WidgetSpinner, WidgetTable, WidgetLoader, WidgetImage, WidgetField, WidgetFastTable, WidgetFastTableHeadCell, WidgetTablePanelFilterItem, WidgetResolverEntity, WidgetInputLookupCode };
116
+ export { ModalSelect, WidgetAction, WidgetButton, WidgetCalendar, WidgetMultiButton, WidgetIcon, WidgetSpinner, WidgetTable, WidgetLoader, WidgetImage, WidgetField, WidgetFastTable, WidgetFastTableHeadCell, WidgetTablePanelFilterItem, WidgetResolverEntity, WidgetInputLookupCode, WidgetSelect, WidgetSelectTrigger, WidgetSelectContent, WidgetSelectItem, PopperContent, PopperTrigger, Popper, injectPopperContext, injectSelectContext };
111
117
  export { ModalListDownload, ModalVersionHistory, ModalEntitySelection };
112
- export type { IInputButtonSelection, IPrimitiveListData, ICoordinate, IListCell, IListOrder, IMultiButtonItem, ILoginValues, IActionOptions, IActionReadOptions, ITool, IToolResult, IAffectedEntity, IValidationEffectItem, IListSettings, IAffectedEntityEvent, IWizardStepConfig, IWrappedTool, IToolParamDialog, IMasterEntity };
118
+ export type { IOptionRow, IInputButtonSelection, IPrimitiveListData, ICoordinate, IListCell, IListOrder, IMultiButtonItem, ILoginValues, IActionOptions, IActionReadOptions, ITool, IToolResult, IAffectedEntity, IValidationEffectItem, IListSettings, IAffectedEntityEvent, IWizardStepConfig, IWrappedTool, IToolParamDialog, IMasterEntity };
113
119
  export { config, configuration };
114
120
  export { constants };
115
121
  export { getEntityLabelByPrimaryKey, loadEntityDataLikeOptions, socketProcess, loadPrintForm, openBlobFile, downloadDocumentBuilderFile, getPrimaryFieldNameForEntity, getPathForResolveRouter, universalEntityResolve, modifyDataWithMockField, getTableMockField, parseCellName, parseCellOrder, convertListConfig, getEntityLink, getEntityResolveLink, convertDMSToDD, convertDDToDMS, staticLink, throttle, debounce, request, groupArrayByField, prettyMoney, prettyDate, prettyDateWithTime, asyncProcess, parseError, getNamesFromListConfig, getCellValue, uuidv4, prettyValueFieldByEntity, universalListSettingRead, universalHistoryRead, universalEntityCount, getCellName, universalToolRead, injectAction, getUnitValue, formatter, wrapToolResponse, t, parseTextByMarkdown, setupListRow };
@@ -118,6 +124,6 @@ export { DisplayListRow, AsyncProcessStatus, NotificationType };
118
124
  export { usePrintForm, useListActiveRow, useListEntity, useManagerState, useCommunication, useFormEntity, useMetadata, useUsageContext, useActions, useEnter, useListSelect, useListSearch, useVisibleItem, useWizard, useListDownload, useLocalStorage, useMetadataField };
119
125
  declare const Manager: any;
120
126
  declare const EventBus: any;
121
- export { SocketHandler, SocketProgressHandler, SocketMessage, SocketSystem, NotificationSystem, MetadataStore, Manager, Communication, EventBus, EngineUtils, Filter, Socket, MetadataService, UsageContextService };
127
+ export { SocketHandler, SocketProgressHandler, SocketMessage, SocketSystem, NotificationSystem, MetadataStore, Manager, Communication, EventBus, EngineUtils, Filter, Socket, MetadataService, UsageContextService, CustomLanguageResolver, LanguageResolver };
122
128
  export { billingService, authService, HistoryService, openService, internationalizationService, fileService, DataService, BatchService };
123
129
  export { ApplicationStatus, RecordOperation };
@@ -1,10 +1,10 @@
1
1
  export interface IEnumData {
2
2
  values: {
3
- "name": string;
4
- "value": string | number;
5
- "description": null;
3
+ name: string;
4
+ value: string | number;
5
+ description: null;
6
6
  }[];
7
7
  name: string;
8
- "description: null| string,: any;
8
+ description: null | string;
9
9
  isFlags: boolean;
10
10
  }
@@ -248,7 +248,7 @@ export interface IListSettingsTool {
248
248
  * asc - возростание
249
249
  */
250
250
  export type IListOrder = [] | [string] | [string, 'desc' | 'asc'];
251
- export interface IListSettings<T = unknown> {
251
+ export interface IListSettings<T = IPrimitiveListData> {
252
252
  /**
253
253
  * @description Метка списка, которая будет отображаться на списках
254
254
  */
@@ -270,6 +270,7 @@ export interface IListSettings<T = unknown> {
270
270
  */
271
271
  prefilters: Record<string, any>;
272
272
  customFilters: any[];
273
+ displayModeForNew?: any;
273
274
  /**
274
275
  * @description Как нужно отображать элемент при открытии его
275
276
  */
@@ -291,5 +292,11 @@ export interface IListSettings<T = unknown> {
291
292
  * @description Список модификаций, которые будут применены к списку
292
293
  */
293
294
  modifications: [modificationName: string, modificationOptions: Record<string, any>][];
295
+ useContextFilter?: boolean;
296
+ pagination?: ListPaginationType;
297
+ }
298
+ export declare enum ListPaginationType {
299
+ Scroll = "scroll",
300
+ Pages = "pages"
294
301
  }
295
302
  export {};
@@ -1,2 +1,2 @@
1
- import { IDownloadFileOptions } from './download-file';
1
+ import { IDownloadFileOptions } from '../engine';
2
2
  export default function openBlobFile(blob: Blob, name: string, options?: Partial<IDownloadFileOptions>): void;
@@ -1,4 +1,4 @@
1
- import { IFilterEnum, IFilterString, IFilterNumber } from '../types/filter.types.ts';
1
+ import { IFilterEnum, IFilterString, IFilterNumber, ITextSearchObject, IDecimalFilterValue } from '../types/filter.types.ts';
2
2
  /**
3
3
  * @description Класс предназначенный для работы с фильтрами. Предоставляет одиночные static методы
4
4
  * при помощи, которых можно самостоятельно создать фильтр или полноценный механизм задачи фильтра
@@ -124,6 +124,11 @@ export default class Filter {
124
124
  static notIn(operandName: string, operandValue: unknown): string;
125
125
  static is(operandName: string, operandValue: unknown): string;
126
126
  static notNull(operandName: string): string;
127
+ static ge(name: string, value: number | string): string;
128
+ static le(name: string, value: number | string): string;
129
+ static includes(name: string, value: string): string;
130
+ static beginWith(name: string, value: string): string;
131
+ static endWith(name: string, value: string): string;
127
132
  static simple(data: Record<string, unknown>): string;
128
133
  /**
129
134
  * @description Универсальная функция для обёртки элемента.
@@ -138,4 +143,6 @@ export default class Filter {
138
143
  static wrap(value: string, wrapSymbolStart?: string, wrapSymbolEnd?: string): string;
139
144
  }
140
145
  type IArgumentsData = Record<string, any>;
146
+ export declare function isMinOrMoreObject(value: unknown): value is IDecimalFilterValue;
147
+ export declare function isTextSearchObject(value: unknown): value is ITextSearchObject;
141
148
  export {};
@@ -5,3 +5,11 @@ export type IDecimalFilterValue = {
5
5
  min?: number;
6
6
  max?: number;
7
7
  };
8
+ export type ITextSearchObject = {
9
+ text: string;
10
+ option: "begin" | "end" | "include";
11
+ };
12
+ export type IFilterDate = {
13
+ start?: string;
14
+ end?: string;
15
+ };
@@ -1,4 +1,4 @@
1
- export default function useFastTableData(entityName: string, pagination: 'scroll' | 'bar'): {
1
+ export default function useFastTableData(entityName: string): {
2
2
  init: (data: any) => void;
3
3
  countPerPage: import('vue').Ref<number, number>;
4
4
  totalCount: import('vue').Ref<number, number>;
@@ -10,4 +10,5 @@ export default function useFastTableData(entityName: string, pagination: 'scroll
10
10
  process: any;
11
11
  next: () => Promise<void>;
12
12
  reload: () => Promise<void>;
13
+ modePagination: any;
13
14
  };
@@ -1,3 +1,4 @@
1
- import { default as Popper } from './popper.vue';
1
+ import { default as Popper, injectPopperContext } from './popper.vue';
2
2
  import { default as PopperContent } from './popper-content.vue';
3
- export { PopperContent, Popper };
3
+ import { default as PopperTrigger } from './popper-trigger.vue';
4
+ export { PopperContent, PopperTrigger, Popper, injectPopperContext };
@@ -0,0 +1,17 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ rootEl: any;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
11
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
12
+ export default _default;
13
+ type __VLS_WithTemplateSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -1,5 +1,5 @@
1
- import { default as WidgetSelect } from './widget-select.vue';
1
+ import { default as WidgetSelect, injectSelectContext } from './widget-select.vue';
2
2
  import { default as WidgetSelectContent } from './widget-select-content.vue';
3
3
  import { default as WidgetSelectItem } from './widget-select-item.vue';
4
4
  import { default as WidgetSelectTrigger } from './widget-select-trigger.vue';
5
- export { WidgetSelect, WidgetSelectTrigger, WidgetSelectContent, WidgetSelectItem };
5
+ export { WidgetSelect, WidgetSelectTrigger, WidgetSelectContent, WidgetSelectItem, injectSelectContext };
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "eservices-core",
3
- "version": "2.0.0-beta.4",
3
+ "version": "2.0.0-beta.40",
4
4
  "description": "Core library",
5
5
  "type": "module",
6
6
  "author": "",
7
7
  "scripts": {
8
8
  "serve": "vite",
9
9
  "build": "vite build --config vite.build.config.mjs",
10
- "full": "npm run build && npm run build-svg && npm publish",
10
+ "full": "npm run build && npm run build-svg && npm publish --tag publish",
11
11
  "rollup": "rollup -c ./rollup.config.js --environment BABEL_ENV:production",
12
12
  "test": "jest",
13
13
  "docs:dev": "vite press dev docs",
@@ -1,4 +0,0 @@
1
- export default function downloadFile(href: string, options?: Partial<IDownloadFileOptions>): void;
2
- export interface IDownloadFileOptions {
3
- blank: boolean;
4
- }