eservices-core 1.0.527 → 1.0.528
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/classes/new/List.d.ts +3 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -20
- package/dist/new/new-import.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import EventEmitter from "jenesius-event-emitter";
|
|
2
2
|
import { Ref } from "vue";
|
|
3
3
|
import { IFilters } from "../../utils/Filter";
|
|
4
|
+
import { IListSettings } from "../../services/configuration-service";
|
|
4
5
|
declare const LIST_ROW_KEY = "_______LIST_______ROW_______INDEX________NAME_______";
|
|
5
6
|
export declare class List<T = {}> extends EventEmitter {
|
|
6
7
|
#private;
|
|
@@ -127,15 +128,12 @@ export declare function useListState(list: List<any>): {
|
|
|
127
128
|
};
|
|
128
129
|
interface IFlexConfig {
|
|
129
130
|
list: List;
|
|
130
|
-
|
|
131
|
-
revertConfig: () => void;
|
|
132
|
-
defaultConfig: Partial<IListCell>[];
|
|
133
|
-
config: Partial<IListCell>[];
|
|
131
|
+
defaultSettings: IListSettings;
|
|
134
132
|
}
|
|
135
133
|
/**
|
|
136
134
|
* Использование гибкого механизма для работы с конфигурацию.
|
|
137
135
|
* */
|
|
138
|
-
export declare function
|
|
136
|
+
export declare function useListProvide(list?: List, defaultSettings?: IListSettings): IFlexConfig;
|
|
139
137
|
/**
|
|
140
138
|
* @description Возвращает реактивный экземпляр конфигурации списка.
|
|
141
139
|
* */
|
package/dist/index.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ import useFormRequest from "./hooks/use-form-request";
|
|
|
66
66
|
import documentsService from "./services/documents-service";
|
|
67
67
|
import billingService from "./services/billing-service";
|
|
68
68
|
import configurationService, { IListSettings } from "./services/configuration-service";
|
|
69
|
-
import { List, useListRead, useListState, useListOrder, useListFilter, useListConfig,
|
|
69
|
+
import { List, useListRead, useListState, useListOrder, useListFilter, useListConfig, useListProvide, useListSelect, IListCell, IListOrder, IListFilter, useListSearch } from "./classes/new/List";
|
|
70
70
|
import { useWizard } from "./hooks/use-wizard";
|
|
71
71
|
import equipmentService from "./services/equipment-service";
|
|
72
72
|
import { SYMBOL_ROW } from "./classes/table/Table";
|
|
@@ -84,7 +84,7 @@ export { fileService, processWizardService, viewService, authService, dataServic
|
|
|
84
84
|
/**
|
|
85
85
|
* HOOKS
|
|
86
86
|
* */
|
|
87
|
-
export { useFormMetadata, useFormAction, useFormLabel, useFormRequestData, useListFilter, useListOrder, useListState, useCustomerState, useTableState, useTableRequest, useCommunication, useFormRequest, useManagerState,
|
|
87
|
+
export { useFormMetadata, useFormAction, useFormLabel, useFormRequestData, useListFilter, useListOrder, useListState, useCustomerState, useTableState, useTableRequest, useCommunication, useFormRequest, useManagerState, useListProvide, useListConfig, useWizard };
|
|
88
88
|
/**
|
|
89
89
|
* All components binding with VueComponents must have name started with Widget.
|
|
90
90
|
* */
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* eservices-core v1.0.
|
|
2
|
+
* eservices-core v1.0.528
|
|
3
3
|
* (c) 2023 ESERVICES
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -3235,31 +3235,19 @@ function useListState(list) {
|
|
|
3235
3235
|
/**
|
|
3236
3236
|
* Использование гибкого механизма для работы с конфигурацию.
|
|
3237
3237
|
* */
|
|
3238
|
-
function
|
|
3238
|
+
function useListProvide(list, defaultSettings) {
|
|
3239
3239
|
const PROVIDE_NAME = 'list-flex-config';
|
|
3240
3240
|
const data = vue.inject(PROVIDE_NAME, undefined);
|
|
3241
3241
|
if (data)
|
|
3242
3242
|
return data;
|
|
3243
|
-
if (!list || !
|
|
3244
|
-
throw new Error(`Hook useProvideList has two required params: list and
|
|
3245
|
-
const config = useListConfig(list);
|
|
3246
|
-
const order = useListOrder(list);
|
|
3243
|
+
if (!list || !defaultSettings)
|
|
3244
|
+
throw new Error(`Hook useProvideList has two required params: list and defaultSettings`);
|
|
3247
3245
|
list.on(List.EVENT_CONFIG_UPDATE, () => {
|
|
3248
3246
|
list.read();
|
|
3249
3247
|
});
|
|
3250
|
-
function revertConfig() {
|
|
3251
|
-
if (!defaultConfig)
|
|
3252
|
-
throw new Error('DefaultConfig was not provided.');
|
|
3253
|
-
if (!list)
|
|
3254
|
-
throw new Error(`List was not provided.`);
|
|
3255
|
-
list.config = (defaultConfig);
|
|
3256
|
-
}
|
|
3257
3248
|
const returnedValues = {
|
|
3258
3249
|
list,
|
|
3259
|
-
|
|
3260
|
-
config,
|
|
3261
|
-
order,
|
|
3262
|
-
defaultConfig
|
|
3250
|
+
defaultSettings
|
|
3263
3251
|
};
|
|
3264
3252
|
vue.provide(PROVIDE_NAME, returnedValues);
|
|
3265
3253
|
return returnedValues;
|
|
@@ -3734,7 +3722,8 @@ var newImport = /*#__PURE__*/Object.freeze({
|
|
|
3734
3722
|
useListRead: useListRead,
|
|
3735
3723
|
Table: Table,
|
|
3736
3724
|
useTableActiveRow: useTableActiveRow,
|
|
3737
|
-
useListOrder: useListOrder
|
|
3725
|
+
useListOrder: useListOrder,
|
|
3726
|
+
useListProvide: useListProvide
|
|
3738
3727
|
});
|
|
3739
3728
|
|
|
3740
3729
|
function useSocket(namespace = 'default') {
|
|
@@ -3852,7 +3841,9 @@ var script$e = /*#__PURE__*/ vue.defineComponent({
|
|
|
3852
3841
|
* @description Данный компонент должен быть приспособлен к изменению размера и для useProvidedList, но и для случая,
|
|
3853
3842
|
* когда конфигурация не предоставляется, через механизм provide/inject
|
|
3854
3843
|
* */
|
|
3855
|
-
const {
|
|
3844
|
+
const { list } = useListProvide();
|
|
3845
|
+
const order = useListOrder(list);
|
|
3846
|
+
const config = useListConfig(list);
|
|
3856
3847
|
const refHeadCells = vue.ref([]);
|
|
3857
3848
|
/**
|
|
3858
3849
|
* Обработчик для изменения сортировки
|
|
@@ -5835,12 +5826,12 @@ exports.useFormRequestData = useFormRequestData;
|
|
|
5835
5826
|
exports.useListConfig = useListConfig;
|
|
5836
5827
|
exports.useListFilter = useListFilter;
|
|
5837
5828
|
exports.useListOrder = useListOrder;
|
|
5829
|
+
exports.useListProvide = useListProvide;
|
|
5838
5830
|
exports.useListRead = useListRead;
|
|
5839
5831
|
exports.useListSearch = useListSearch;
|
|
5840
5832
|
exports.useListSelect = useListSelect;
|
|
5841
5833
|
exports.useListState = useListState;
|
|
5842
5834
|
exports.useManagerState = useManagerState;
|
|
5843
|
-
exports.useProvideList = useProvideList;
|
|
5844
5835
|
exports.useSocket = useSocket;
|
|
5845
5836
|
exports.useTableRequest = useTableRequest;
|
|
5846
5837
|
exports.useTableState = useTableState;
|
package/dist/new/new-import.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { List, useListRead, useListState, useListOrder } from "../classes/new/List";
|
|
1
|
+
import { List, useListRead, useListState, useListOrder, useListProvide } from "../classes/new/List";
|
|
2
2
|
import { Table, useTableActiveRow } from "../classes/new/Table";
|
|
3
3
|
import WidgetTable from "../widgets/new/widget-table.vue";
|
|
4
|
-
export { WidgetTable, List, useListState, useListRead, Table, useTableActiveRow, useListOrder };
|
|
4
|
+
export { WidgetTable, List, useListState, useListRead, Table, useTableActiveRow, useListOrder, useListProvide };
|