eservices-core 1.0.511 → 1.0.513
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 +1 -1
- package/dist/index.js +43 -31
- package/package.json +3 -3
|
@@ -147,7 +147,7 @@ export declare function useListOrder(list: List): IListOrder;
|
|
|
147
147
|
* @description Возвращает реактивный массив фильтров для списка
|
|
148
148
|
* */
|
|
149
149
|
export declare function useListFilter(list: List): IFilters;
|
|
150
|
-
export declare type ListCellType = 'date' | 'dateWithTime' | 'toggle' | 'select' | 'number';
|
|
150
|
+
export declare type ListCellType = 'date' | 'dateWithTime' | 'dateTime' | 'toggle' | 'select' | 'number';
|
|
151
151
|
export interface IDefaultListData {
|
|
152
152
|
[LIST_ROW_KEY]: number;
|
|
153
153
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* eservices-core v1.0.
|
|
2
|
+
* eservices-core v1.0.513
|
|
3
3
|
* (c) 2023 ESERVICES
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -10,8 +10,8 @@ var vue = require('vue');
|
|
|
10
10
|
var jenesiusVueModal = require('jenesius-vue-modal');
|
|
11
11
|
var jenesiusVueForm = require('jenesius-vue-form');
|
|
12
12
|
var vueRouter = require('vue-router');
|
|
13
|
-
var socket_ioClient = require('socket.io-client');
|
|
14
13
|
var dateAndTime = require('date-and-time');
|
|
14
|
+
var socket_ioClient = require('socket.io-client');
|
|
15
15
|
|
|
16
16
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
17
|
|
|
@@ -3199,6 +3199,33 @@ script$o.render = render$1;
|
|
|
3199
3199
|
script$o.__scopeId = "data-v-99f36e92";
|
|
3200
3200
|
script$o.__file = "core/widgets/new/widget-table-head.vue";
|
|
3201
3201
|
|
|
3202
|
+
/**
|
|
3203
|
+
* @param {String} str
|
|
3204
|
+
*
|
|
3205
|
+
* @return {String} prettyDate
|
|
3206
|
+
* */
|
|
3207
|
+
function prettyDateWithTime(str) {
|
|
3208
|
+
return prettyDate(str, 'YYYY/MM/DD HH:mm:ss');
|
|
3209
|
+
}
|
|
3210
|
+
/**
|
|
3211
|
+
* @param {String} str
|
|
3212
|
+
* @param {String} format
|
|
3213
|
+
*
|
|
3214
|
+
* @return {String} prettyDate
|
|
3215
|
+
* */
|
|
3216
|
+
function prettyDate(str, format = 'YYYY/MM/DD') {
|
|
3217
|
+
if (!str)
|
|
3218
|
+
return "";
|
|
3219
|
+
try {
|
|
3220
|
+
const date = new Date(str);
|
|
3221
|
+
return dateAndTime__default["default"].format(date, format);
|
|
3222
|
+
}
|
|
3223
|
+
catch (e) {
|
|
3224
|
+
console.log(e);
|
|
3225
|
+
return 'Invalid date';
|
|
3226
|
+
}
|
|
3227
|
+
}
|
|
3228
|
+
|
|
3202
3229
|
/**
|
|
3203
3230
|
* @description Получение ОДНОЙ строки таблицы или списка.
|
|
3204
3231
|
*/
|
|
@@ -3238,6 +3265,15 @@ function getTableCell$1(cell, rowValue) {
|
|
|
3238
3265
|
value = new Intl.NumberFormat().format(value);
|
|
3239
3266
|
break;
|
|
3240
3267
|
}
|
|
3268
|
+
case "date": {
|
|
3269
|
+
value = prettyDate(typeof value === "string" ? value : null);
|
|
3270
|
+
break;
|
|
3271
|
+
}
|
|
3272
|
+
case "dateTime":
|
|
3273
|
+
case "dateWithTime": {
|
|
3274
|
+
value = prettyDateWithTime(typeof value === "string" ? value : null);
|
|
3275
|
+
break;
|
|
3276
|
+
}
|
|
3241
3277
|
}
|
|
3242
3278
|
}
|
|
3243
3279
|
if (cell.onClick)
|
|
@@ -3557,7 +3593,6 @@ var script$h = {
|
|
|
3557
3593
|
let elem = null;
|
|
3558
3594
|
try {
|
|
3559
3595
|
elem = getTableRow$1(props.config, props.values);
|
|
3560
|
-
console.log(elem);
|
|
3561
3596
|
}
|
|
3562
3597
|
catch (e) {
|
|
3563
3598
|
console.warn('[widget-list-row]', e);
|
|
@@ -5015,33 +5050,6 @@ function useCommunication(communication) {
|
|
|
5015
5050
|
};
|
|
5016
5051
|
}
|
|
5017
5052
|
|
|
5018
|
-
/**
|
|
5019
|
-
* @param {String} str
|
|
5020
|
-
*
|
|
5021
|
-
* @return {String} prettyDate
|
|
5022
|
-
* */
|
|
5023
|
-
function prettyDateWithTime(str) {
|
|
5024
|
-
return prettyDate(str, 'YYYY/MM/DD HH:mm:ss');
|
|
5025
|
-
}
|
|
5026
|
-
/**
|
|
5027
|
-
* @param {String} str
|
|
5028
|
-
* @param {String} format
|
|
5029
|
-
*
|
|
5030
|
-
* @return {String} prettyDate
|
|
5031
|
-
* */
|
|
5032
|
-
function prettyDate(str, format = 'YYYY/MM/DD') {
|
|
5033
|
-
if (!str)
|
|
5034
|
-
return "";
|
|
5035
|
-
try {
|
|
5036
|
-
const date = new Date(str);
|
|
5037
|
-
return dateAndTime__default["default"].format(date, format);
|
|
5038
|
-
}
|
|
5039
|
-
catch (e) {
|
|
5040
|
-
console.log(e);
|
|
5041
|
-
return 'Invalid date';
|
|
5042
|
-
}
|
|
5043
|
-
}
|
|
5044
|
-
|
|
5045
5053
|
/**
|
|
5046
5054
|
* @description Function check provided value for data filter format.
|
|
5047
5055
|
* @example {start: '2022-10-10'}
|
|
@@ -5239,7 +5247,11 @@ function useFormAction(form, options) {
|
|
|
5239
5247
|
title: action.title,
|
|
5240
5248
|
callback: () => {
|
|
5241
5249
|
const fn = () => Promise.resolve()
|
|
5242
|
-
.then(() =>
|
|
5250
|
+
.then(() => {
|
|
5251
|
+
if (form.changed)
|
|
5252
|
+
form.save();
|
|
5253
|
+
return;
|
|
5254
|
+
})
|
|
5243
5255
|
.then(() => fetch(action.url, {
|
|
5244
5256
|
method: "POST",
|
|
5245
5257
|
body: JSON.stringify({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eservices-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.513",
|
|
4
4
|
"description": "Core library",
|
|
5
5
|
"author": "",
|
|
6
6
|
"scripts": {
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"jenesius-vue-form": "^2.2.5",
|
|
50
50
|
"jenesius-vue-modal": "^1.5.0",
|
|
51
51
|
"socket.io-client": "^4.5.2",
|
|
52
|
-
"vue": "
|
|
53
|
-
"vue-router": "
|
|
52
|
+
"vue": "3.2.45",
|
|
53
|
+
"vue-router": "4.0.16"
|
|
54
54
|
},
|
|
55
55
|
"license": "ISC",
|
|
56
56
|
"repository": {
|