awing-library 2.1.69-beta → 2.1.71-beta

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.
@@ -179,6 +179,7 @@ var ViewInfo = function (_a) {
179
179
  options: templateOptions.map(function (template) { return ({
180
180
  value: template.id,
181
181
  text: template.description,
182
+ disabled: template === null || template === void 0 ? void 0 : template.isDeprecated,
182
183
  }); }),
183
184
  },
184
185
  ], oldValue: __assign(__assign({}, viewInfoData), { templateTypeId: 0 }), onUpdate: handleChangeForm }) }));
@@ -85,6 +85,7 @@ export interface Template {
85
85
  templateTypeId: number;
86
86
  validation: string;
87
87
  autoField: string;
88
+ isDeprecated?: boolean;
88
89
  }
89
90
  export interface TemplateParameter {
90
91
  id: string;
@@ -7,6 +7,7 @@ interface IChartJsContainer extends ChartProps {
7
7
  optionCustom?: any;
8
8
  chart: any;
9
9
  dataChart: any;
10
+ optionsDefault?: boolean;
10
11
  }
11
12
  declare const BarLineComponent: (props: IChartJsContainer) => import("react/jsx-runtime").JSX.Element;
12
13
  export default BarLineComponent;
@@ -24,6 +24,7 @@ var Enums_1 = require("./Enums");
24
24
  var i18n_1 = __importDefault(require("../../i18n"));
25
25
  var BarLineComponent = function (props) {
26
26
  var t = (0, react_i18next_1.useTranslation)(undefined, { i18n: i18n_1.default }).t;
27
+ var optionsDefault = props.optionsDefault;
27
28
  var chart = props.chart, _a = props.width, width = _a === void 0 ? 'auto' : _a, _b = props.height, height = _b === void 0 ? 350 : _b, _c = props.timeline, timeline = _c === void 0 ? Enums_1.TYPE_TIMELINE.DAY : _c, _d = props.optionCustom, optionCustom = _d === void 0 ? {} : _d, dataChart = props.dataChart, type = props.type, _e = props.options, options = _e === void 0 ? {
28
29
  responsive: true,
29
30
  maintainAspectRatio: false,
@@ -91,33 +92,46 @@ var BarLineComponent = function (props) {
91
92
  },
92
93
  },
93
94
  scales: {
94
- x: {
95
- type: 'time',
96
- display: true,
97
- grid: { display: false },
98
- time: {
99
- parser: timeline === Enums_1.TYPE_TIMELINE.DAY
100
- ? 'YYYYMMDD'
101
- : 'YYYYMMDDHH',
102
- unit: timeline === Enums_1.TYPE_TIMELINE.DAY ? 'day' : 'hour',
95
+ x: optionsDefault
96
+ ? {
97
+ type: 'timeseries',
98
+ time: {
99
+ parser: 'YYYYMMDD',
100
+ },
101
+ unit: 'month',
103
102
  displayFormats: {
104
- day: 'DD/MM',
105
- hour: 'HH:mm',
103
+ month: 'DD/MM'
106
104
  },
107
- },
108
- offset: true,
109
- ticks: {
110
- maxTicksLimit: 10,
111
- autoSkipPadding: 16,
112
- maxRotation: 0,
113
- },
114
- title: {
115
- font: {
116
- size: 14,
117
- family: 'Roboto',
105
+ }
106
+ : {
107
+ type: 'time',
108
+ display: true,
109
+ grid: { display: false },
110
+ time: {
111
+ parser: timeline === Enums_1.TYPE_TIMELINE.DAY
112
+ ? 'YYYYMMDD'
113
+ : 'YYYYMMDDHH',
114
+ unit: timeline === Enums_1.TYPE_TIMELINE.DAY
115
+ ? 'day'
116
+ : 'hour',
117
+ displayFormats: {
118
+ day: 'DD/MM',
119
+ hour: 'HH:mm',
120
+ },
121
+ },
122
+ offset: true,
123
+ ticks: {
124
+ maxTicksLimit: 10,
125
+ autoSkipPadding: 16,
126
+ maxRotation: 0,
127
+ },
128
+ title: {
129
+ font: {
130
+ size: 14,
131
+ family: 'Roboto',
132
+ },
118
133
  },
119
134
  },
120
- },
121
135
  y: {
122
136
  type: 'linear',
123
137
  display: true,
@@ -110,7 +110,7 @@ function DataInput(props) {
110
110
  case 'autocomplete': {
111
111
  return ((0, jsx_runtime_1.jsx)(material_1.Autocomplete, { multiple: fieldDefinition.multiple, options: fieldDefinition.options, getOptionLabel: function (option) { var _a, _b; return (_b = (_a = option.label) !== null && _a !== void 0 ? _a : option.text) !== null && _b !== void 0 ? _b : ''; }, isOptionEqualToValue: function (option, value) {
112
112
  return (option === null || option === void 0 ? void 0 : option.value) === (value === null || value === void 0 ? void 0 : value.value);
113
- }, disableclearable: fieldDefinition.disableClearable, onChange: function (e, value) {
113
+ }, disableclearable: fieldDefinition.disableClearable, getOptionDisabled: function (option) { return option === null || option === void 0 ? void 0 : option.disabled; }, onChange: function (e, value) {
114
114
  var newValue = fieldDefinition.multiple
115
115
  ? value.map(function (x) { return x === null || x === void 0 ? void 0 : x.value; })
116
116
  : value === null || value === void 0 ? void 0 : value.value;
@@ -80,7 +80,7 @@ var Drawer = function (props) {
80
80
  snackbar('success');
81
81
  console.log('success');
82
82
  }, 700);
83
- closeDrawer(state || CloseAction.Reload);
83
+ closeDrawer(typeof state === 'string' ? state : CloseAction.Reload);
84
84
  })
85
85
  .catch(function () {
86
86
  snackbar('error');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awing-library",
3
- "version": "2.1.69-beta",
3
+ "version": "2.1.71-beta",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",