awing-library 2.1.2-dev.554 → 2.1.2-dev.556

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.
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/AWING/Chart/BarLine/component.tsx"],"names":[],"mappings":"AAuBA,OAAO,wBAAwB,CAAC;AAOhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAmB7C,QAAA,MAAM,gBAAgB,UAAW,iBAAiB,4CAmUjD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/AWING/Chart/BarLine/component.tsx"],"names":[],"mappings":"AAwBA,OAAO,wBAAwB,CAAC;AAOhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAmB7C,QAAA,MAAM,gBAAgB,UAAW,iBAAiB,4CAqUjD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -32,6 +32,7 @@ const BarLineComponent = (props)=>{
32
32
  const handleClose = ()=>{
33
33
  setAnchorEl(null);
34
34
  };
35
+ const titleCallbackBound = (tooltipItems)=>titleCallback(tooltipItems, t);
35
36
  const { width = 'auto', height = 350, timeline = TimelineType.Day, optionCustom = {}, dataChart, type, enableExport = {
36
37
  png: true,
37
38
  pdf: true,
@@ -54,7 +55,7 @@ const BarLineComponent = (props)=>{
54
55
  bodyColor: '#263238',
55
56
  bodySpacing: 8,
56
57
  callbacks: {
57
- title: titleCallback,
58
+ title: titleCallbackBound,
58
59
  label: labelCallback
59
60
  },
60
61
  titleColor: '#212121',
@@ -1,7 +1,7 @@
1
1
  import { Chart as ChartJS, ChartTypeRegistry, TooltipItem } from 'chart.js';
2
2
  import { DataSet } from '../../../Utils/exportFile';
3
3
  export declare const getOrCreateLegendList: (id: string) => HTMLUListElement;
4
- export declare const titleCallback: (tooltipItems: TooltipItem<keyof ChartTypeRegistry>[]) => string;
4
+ export declare const titleCallback: (tooltipItems: TooltipItem<keyof ChartTypeRegistry>[], t: any) => string;
5
5
  export declare const labelCallback: (tooltipItem: TooltipItem<keyof ChartTypeRegistry>) => string;
6
6
  export declare const exportToPNG: (element: HTMLElement, nameFile?: string) => void;
7
7
  export declare const exportToJPG: (chartRef: ChartJS<keyof ChartTypeRegistry>, nameFile?: string) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/AWING/Chart/BarLine/utils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAuB,MAAM,kBAAkB,CAAC;AAEhE,eAAO,MAAM,qBAAqB,OAAQ,MAAM,qBAe/C,CAAC;AAEF,eAAO,MAAM,aAAa,iBAAkB,WAAW,CAAC,MAAM,iBAAiB,CAAC,EAAE,WAUjF,CAAC;AAEF,eAAO,MAAM,aAAa,gBAAiB,WAAW,CAAC,MAAM,iBAAiB,CAAC,WAO9E,CAAC;AAGF,eAAO,MAAM,WAAW,YAAa,WAAW,aAAa,MAAM,SAQlE,CAAC;AAGF,eAAO,MAAM,WAAW,aAAc,OAAO,CAAC,MAAM,iBAAiB,CAAC,aAAa,MAAM,SAUxF,CAAC;AAGF,eAAO,MAAM,WAAW,YAAa,WAAW,aAAa,MAAM,SAuClE,CAAC;AAGF,eAAO,MAAM,YAAY,aAAoB,OAAO,CAAC,MAAM,iBAAiB,CAAC,kBA8D5E,CAAC;AAGF,eAAO,MAAM,aAAa,eAAgB,OAAO,EAAE,aAAa,MAAM,SAOrE,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/AWING/Chart/BarLine/utils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAuB,MAAM,kBAAkB,CAAC;AAEhE,eAAO,MAAM,qBAAqB,OAAQ,MAAM,qBAe/C,CAAC;AAEF,eAAO,MAAM,aAAa,iBAAkB,WAAW,CAAC,MAAM,iBAAiB,CAAC,EAAE,KAAK,GAAG,WAUzF,CAAC;AAEF,eAAO,MAAM,aAAa,gBAAiB,WAAW,CAAC,MAAM,iBAAiB,CAAC,WAO9E,CAAC;AAGF,eAAO,MAAM,WAAW,YAAa,WAAW,aAAa,MAAM,SAQlE,CAAC;AAGF,eAAO,MAAM,WAAW,aAAc,OAAO,CAAC,MAAM,iBAAiB,CAAC,aAAa,MAAM,SAUxF,CAAC;AAGF,eAAO,MAAM,WAAW,YAAa,WAAW,aAAa,MAAM,SAuClE,CAAC;AAGF,eAAO,MAAM,YAAY,aAAoB,OAAO,CAAC,MAAM,iBAAiB,CAAC,kBA8D5E,CAAC;AAGF,eAAO,MAAM,aAAa,eAAgB,OAAO,EAAE,aAAa,MAAM,SAOrE,CAAC"}
@@ -17,16 +17,16 @@ const getOrCreateLegendList = (id)=>{
17
17
  }
18
18
  return listContainer;
19
19
  };
20
- const titleCallback = (tooltipItems)=>{
20
+ const titleCallback = (tooltipItems, t)=>{
21
21
  const timeFormat = tooltipItems[0].raw?.x;
22
22
  const isTimelineHour = timeFormat?.length > 8;
23
23
  if (isTimelineHour) {
24
24
  const timeText = moment(timeFormat, 'YYYYMMDDHH').format('HH[h] DD-MM-YYYY');
25
- return 'Hour: ' + timeText;
25
+ return t('Common.Hour') + ': ' + timeText;
26
26
  }
27
27
  {
28
28
  const timeText = moment(timeFormat, 'YYYYMMDD').format('DD-MM-YYYY');
29
- return 'Day: ' + timeText;
29
+ return t('Common.Day') + ': ' + timeText;
30
30
  }
31
31
  };
32
32
  const labelCallback = (tooltipItem)=>{
@@ -9,7 +9,7 @@ var __webpack_modules__ = {
9
9
  "AWING/DataInput": function(module) {
10
10
  module.exports = __WEBPACK_EXTERNAL_MODULE__DataInput_index_js_c7933a4f__;
11
11
  },
12
- "AWING/helper": function(module) {
12
+ "../helper": function(module) {
13
13
  module.exports = __WEBPACK_EXTERNAL_MODULE__helper_js_663c9e82__;
14
14
  }
15
15
  };
@@ -92,9 +92,9 @@ jest.mock('@mui/material', ()=>({
92
92
  })
93
93
  }));
94
94
  const mockInputFactory = __webpack_require__("AWING/DataInput")["default"];
95
- const mockCalculateValue = __webpack_require__("AWING/helper").calculateValue;
96
- const mockConvertFormulaToBinaryTree = __webpack_require__("AWING/helper").convertFormulaToBinaryTree;
97
- const mockReplaceFieldsValue = __webpack_require__("AWING/helper").replaceFieldsValue;
95
+ const mockCalculateValue = __webpack_require__("../helper").calculateValue;
96
+ const mockConvertFormulaToBinaryTree = __webpack_require__("../helper").convertFormulaToBinaryTree;
97
+ const mockReplaceFieldsValue = __webpack_require__("../helper").replaceFieldsValue;
98
98
  describe('DataForm Component', ()=>{
99
99
  const mockFields = [
100
100
  {
@@ -1 +1 @@
1
- {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/Helpers/query.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,mBAAmB;IAC3B,EAAE,OAAO,CAAE,QAAQ;IACnB,QAAQ,aAAa,CAAE,qBAAqB;IAC5C,UAAU,eAAe,CAAE,cAAc;IACzC,QAAQ,aAAa,CAAE,YAAY;IACnC,EAAE,OAAO,CAAE,eAAe;IAC1B,GAAG,QAAQ,CAAE,wBAAwB;IACrC,EAAE,OAAO,CAAE,YAAY;IACvB,GAAG,QAAQ,CAAE,qBAAqB;IAClC,EAAE,OAAO,CAAE,WAAW;IACtB,OAAO,YAAY,CAAE,qBAAqB;IAC1C,EAAE,OAAO,CAAE,YAAY;IACvB,WAAW,gBAAgB,CAAE,6BAA6B;IAC1D,KAAK,UAAU,CAAE,eAAe;IAChC,OAAO,YAAY,CAAE,gEAAgE;IACrF,MAAM,WAAW,CAAE,6BAA6B;IAChD,MAAM,WAAW;CACpB;AAED;;G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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoIG"}
@@ -104,6 +104,9 @@ function createSingleCondition(key, value, typeStr) {
104
104
  case "notin":
105
105
  condition = Array.isArray(value) ? `${key} NOT IN (${value.map((v)=>'string' == typeof v ? `"${v}"` : v).join(', ')})` : `${key} NOT IN ("${value}")`;
106
106
  break;
107
+ case "custom":
108
+ condition = value;
109
+ break;
107
110
  default:
108
111
  const operatorName = 'string' == typeof typeStr ? typeStr : 'custom';
109
112
  condition = `${key}.${operatorName}("${value}")`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awing-library",
3
- "version": "2.1.2-dev.554",
3
+ "version": "2.1.2-dev.556",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": {