eservices-core 1.0.510 → 1.0.512

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.
@@ -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.510
2
+ * eservices-core v1.0.512
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)
@@ -5014,33 +5050,6 @@ function useCommunication(communication) {
5014
5050
  };
5015
5051
  }
5016
5052
 
5017
- /**
5018
- * @param {String} str
5019
- *
5020
- * @return {String} prettyDate
5021
- * */
5022
- function prettyDateWithTime(str) {
5023
- return prettyDate(str, 'YYYY/MM/DD HH:mm:ss');
5024
- }
5025
- /**
5026
- * @param {String} str
5027
- * @param {String} format
5028
- *
5029
- * @return {String} prettyDate
5030
- * */
5031
- function prettyDate(str, format = 'YYYY/MM/DD') {
5032
- if (!str)
5033
- return "";
5034
- try {
5035
- const date = new Date(str);
5036
- return dateAndTime__default["default"].format(date, format);
5037
- }
5038
- catch (e) {
5039
- console.log(e);
5040
- return 'Invalid date';
5041
- }
5042
- }
5043
-
5044
5053
  /**
5045
5054
  * @description Function check provided value for data filter format.
5046
5055
  * @example {start: '2022-10-10'}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eservices-core",
3
- "version": "1.0.510",
3
+ "version": "1.0.512",
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": "^3.0.0",
53
- "vue-router": "^4.0.12"
52
+ "vue": "3.2.45",
53
+ "vue-router": "4.0.16"
54
54
  },
55
55
  "license": "ISC",
56
56
  "repository": {