awing-library 2.1.203-dev → 2.1.205-dev

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.
@@ -292,7 +292,9 @@ var CreateOrEdit = function (props) {
292
292
  };
293
293
  var handleSaveProfessionalEditing = function () {
294
294
  return new Promise(function (resolve, reject) {
295
- confirm(function () { var _a; return (_a = handleSubmit()) === null || _a === void 0 ? void 0 : _a.then(resolve); }, function () { return reject(); }, t("Campaign.SwitchToProfessionalEditMode"));
295
+ confirm(function () { var _a; return (_a = handleSubmit()) === null || _a === void 0 ? void 0 : _a.then(resolve); }, function () { return reject(); }, (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: {
296
+ whiteSpace: "break-spaces",
297
+ }, children: t("Campaign.SwitchToProfessionalEditMode") }));
296
298
  });
297
299
  };
298
300
  return ((0, jsx_runtime_1.jsx)(ClassicDrawer_1.default, { title: "".concat(t(['Campaign', campaignId ? 'TitleDetail' : 'Create'].join('.'))).concat(campaignId ? ": ".concat((_a = campaignData === null || campaignData === void 0 ? void 0 : campaignData.campaign) === null || _a === void 0 ? void 0 : _a.name) : '', "\n "), onSubmit: function () { return editModeWizard ? handleSaveProfessionalEditing() : handleSubmit(); }, disableButtonSubmit: handleDisableButtonSubmit(), confirmExit: confirmExit, childrenWrapperStyle: { padding: 0 }, onClose: handleClose, children: (0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, sx: {
@@ -1,11 +1,10 @@
1
- import { ChartData, ChartOptions, ChartType } from 'chart.js';
1
+ import { ChartOptions, ChartType } from 'chart.js';
2
2
  import { ChartProps, TypedChartComponent } from 'react-chartjs-2/dist/types';
3
3
  export interface IPieComponent extends ChartProps {
4
- dataConvert?: ChartData<ChartType>;
5
4
  widthChart?: number;
6
5
  heightChart?: number;
7
6
  optionCustom?: ChartOptions<ChartType>;
8
- chart: TypedChartComponent<"pie">;
7
+ chart: TypedChartComponent<'pie'>;
9
8
  }
10
- declare const PieComponent: ({ chart, data, dataConvert, widthChart, heightChart, optionCustom, options, }: IPieComponent) => import("react/jsx-runtime").JSX.Element;
9
+ declare const PieComponent: ({ chart, data, widthChart, heightChart, optionCustom, options, }: IPieComponent) => import("react/jsx-runtime").JSX.Element;
11
10
  export default PieComponent;
@@ -11,17 +11,7 @@ var chartColorDefaults = [
11
11
  '#4a536b',
12
12
  ];
13
13
  var PieComponent = function (_a) {
14
- var chart = _a.chart, data = _a.data, _b = _a.dataConvert, dataConvert = _b === void 0 ? {
15
- labels: [],
16
- datasets: [
17
- {
18
- data: [],
19
- backgroundColor: chartColorDefaults,
20
- borderColor: 'white',
21
- borderWidth: 2,
22
- },
23
- ],
24
- } : _b, _c = _a.widthChart, widthChart = _c === void 0 ? 300 : _c, _d = _a.heightChart, heightChart = _d === void 0 ? 300 : _d, _e = _a.optionCustom, optionCustom = _e === void 0 ? {} : _e, _f = _a.options, options = _f === void 0 ? {
14
+ var chart = _a.chart, data = _a.data, _b = _a.widthChart, widthChart = _b === void 0 ? 300 : _b, _c = _a.heightChart, heightChart = _c === void 0 ? 300 : _c, _d = _a.optionCustom, optionCustom = _d === void 0 ? {} : _d, _e = _a.options, options = _e === void 0 ? {
25
15
  responsive: true,
26
16
  elements: {
27
17
  arc: {
@@ -70,8 +60,19 @@ var PieComponent = function (_a) {
70
60
  },
71
61
  },
72
62
  },
73
- } : _f;
63
+ } : _e;
74
64
  var Pie = chart;
75
- return ((0, jsx_runtime_1.jsx)(Pie, { data: (0, Helpers_1.updateObjectFields)(data, dataConvert), width: widthChart, height: heightChart, options: (0, Helpers_1.updateObjectFields)(options, optionCustom) }));
65
+ var dataConvert = {
66
+ labels: [],
67
+ datasets: [
68
+ {
69
+ data: [],
70
+ backgroundColor: chartColorDefaults.slice(0, data.datasets[0].data.length),
71
+ borderColor: 'white',
72
+ borderWidth: 2,
73
+ },
74
+ ],
75
+ };
76
+ return ((0, jsx_runtime_1.jsx)(Pie, { data: (0, Helpers_1.updateObjectFields)(dataConvert, data), width: widthChart, height: heightChart, options: (0, Helpers_1.updateObjectFields)(options, optionCustom) }));
76
77
  };
77
78
  exports.default = PieComponent;
@@ -514,7 +514,7 @@
514
514
  "Click": "Click"
515
515
  },
516
516
  "Wizard": "Wizard",
517
- "SwitchToProfessionalEditMode": "You have switched to Professional Edit Mode. If you agree, the data will be permanently changed, and you will no longer be able to revert to Wizard Edit Mode. Are you sure you want to proceed?"
517
+ "SwitchToProfessionalEditMode": "You are switching to the Advanced Settings interface to keep editing your campaign.\nImportant: Selecting \"Agree\" will prevent you from returning to the Quick Campaign interface. Would you like to continue?"
518
518
  },
519
519
  "DirectoryManagement": {
520
520
  "DirectoryName": "Directory Name",
@@ -498,7 +498,7 @@
498
498
  "Click": "Click"
499
499
  },
500
500
  "Wizard": "Wizard",
501
- "SwitchToProfessionalEditMode": "Bạn đã chuyển sang chế độ Chỉnh sửa chuyên nghiệp. Nếu bạn đồng ý, dữ liệu sẽ bị thay đổi bạn sẽ không thể quay lại chế độ chỉnh sửa bằng Wizard. Bạn có chắc chắn muốn tiếp tục?"
501
+ "SwitchToProfessionalEditMode": "Bạn đang chuyển sang Giao diện Nâng cao để tiếp tục Chỉnh sửa Chiến dịch. \nLưu ý: Nếu chọn \"Đồng ý\", bạn sẽ không thể quay lại Giao diện \"Tạo nhanh chiến dịch\" hiện tại."
502
502
  },
503
503
  "TemplateManagement": {
504
504
  "Create": "Tạo mới template",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awing-library",
3
- "version": "2.1.203-dev",
3
+ "version": "2.1.205-dev",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",