awing-library 2.1.73-beta → 2.1.75-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.
@@ -215,6 +215,8 @@ function updateStateByPageModel(pageModel) {
215
215
  }));
216
216
  }
217
217
  exports.updateStateByPageModel = updateStateByPageModel;
218
+ var getFieldsValue = function (template) {
219
+ };
218
220
  /**
219
221
  * Retrieves the template data based on the provided template parameters, view information data, page ID, and view number.
220
222
  *
@@ -230,6 +232,15 @@ var getTemplateDatas = function (templateParameters, viewInfoData, pageId, viewN
230
232
  ? viewInfoData.viewDatas.find(function (el) { return el.fieldName === parameter.fieldName; })
231
233
  : null;
232
234
  var valData = tempData ? tempData.fieldValue : null;
235
+ var child = {};
236
+ getChilds(parameter, function (item) {
237
+ var keys = item.fieldName.split('.');
238
+ if (keys.length > 1) {
239
+ console.log("item.fieldValue", item.fieldValue);
240
+ child[keys.at(-1)] = item.fieldValue;
241
+ }
242
+ });
243
+ console.log("child", child);
233
244
  var fieldValue = valData !== null && valData !== void 0 ? valData : (parameter.defaultValue ? parameter.defaultValue : '');
234
245
  fieldValue = (0, exports.convertValueByType)(parameter.fieldType, fieldValue);
235
246
  return {
@@ -151,9 +151,7 @@ var CreateOrEdit = function () {
151
151
  onChange: function (_k, name) {
152
152
  handleJobActionChange(jobActions.filter(function (x) { return x.name === name; })[0]);
153
153
  handleChange('jobAction', name);
154
- }, value: jobModel.jobAction, children: jobActions.map(function (item) { return ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: item.name, children: item.name }, item.name)); }) }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 8, style: { marginTop: '16px' }, children: (jobModel === null || jobModel === void 0 ? void 0 : jobModel.inputParameters) && ((0, jsx_runtime_1.jsx)(InputParameters_1.default, { inputParameters: jobModel === null || jobModel === void 0 ? void 0 : jobModel.inputParameters, jobActionSelected: jobActionSelected, handleInputParamChange: handleInputParamChange })) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, children: (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, style: { paddingRight: '10px' }, children: (0, jsx_runtime_1.jsx)(BasicInput_1.default, { fullWidth: true, name: "authUsername", required: false, label: t('User.Username'), checkValid: function (value) {
155
- return (0, validation_1.textValidation)(value, 150, false, /^[a-zA-Z0-9\/\-_.@()\[\] ]+$/g, false);
156
- }, onChange: handleChange, value: jobModel.authUsername }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 5, style: { paddingRight: '10px' }, children: (0, jsx_runtime_1.jsx)(BasicInput_1.default, { fullWidth: true, autoComplete: "current-password", name: "authPassword", type: "password", required: false, label: t('User.Password'), onChange: handleChange, value: jobModel.authPassword }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 1, children: (0, jsx_runtime_1.jsx)(material_1.Tooltip, { placement: "top", title: t('TaskScheduler.Help.Authen'), arrow: true, children: (0, jsx_runtime_1.jsx)(icons_material_1.HelpOutline, { fontSize: "small", color: "action", style: {
154
+ }, value: jobModel.jobAction, children: jobActions.map(function (item) { return ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: item.name, children: item.name }, item.name)); }) }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 8, style: { marginTop: '16px' }, children: (jobModel === null || jobModel === void 0 ? void 0 : jobModel.inputParameters) && ((0, jsx_runtime_1.jsx)(InputParameters_1.default, { inputParameters: jobModel === null || jobModel === void 0 ? void 0 : jobModel.inputParameters, jobActionSelected: jobActionSelected, handleInputParamChange: handleInputParamChange })) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, children: (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, style: { paddingRight: '10px' }, children: (0, jsx_runtime_1.jsx)(BasicInput_1.default, { fullWidth: true, name: "authUsername", required: false, label: t('User.Username'), checkValid: function (value) { return (0, validation_1.textValidation)(value, 150, false, /^[a-zA-Z0-9\/\-_.@()\[\] ]+$/g, false); }, onChange: handleChange, value: jobModel.authUsername }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 5, style: { paddingRight: '10px' }, children: (0, jsx_runtime_1.jsx)(BasicInput_1.default, { fullWidth: true, autoComplete: "current-password", name: "authPassword", type: "password", required: false, label: t('User.Password'), onChange: handleChange, value: jobModel.authPassword }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 1, children: (0, jsx_runtime_1.jsx)(material_1.Tooltip, { placement: "top", title: t('TaskScheduler.Help.Authen'), arrow: true, children: (0, jsx_runtime_1.jsx)(icons_material_1.HelpOutline, { fontSize: "small", color: "action", style: {
157
155
  marginTop: '20px',
158
156
  marginLeft: '-10px',
159
157
  } }) }) })] }) })] }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, children: (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { name: "status", checked: jobModel.status, onChange: function (event) {
@@ -29,7 +29,10 @@ var getFormValidation = function (job, jobValid) {
29
29
  (jobValid['cronTime'] !== undefined &&
30
30
  jobValid['cronTime'])) && job.inputParameters.length > 0;
31
31
  }
32
- return isValid && jobValid['name'] !== undefined && jobValid['name'] && (jobValid['authUsername'] === undefined || jobValid['authUsername']);
32
+ if (jobValid['name'] !== undefined) {
33
+ isValid = isValid && jobValid['name'];
34
+ }
35
+ return isValid && (jobValid['authUsername'] === undefined || jobValid['authUsername']);
33
36
  };
34
37
  exports.getFormValidation = getFormValidation;
35
38
  var cloneValue = function (item) {
@@ -25,7 +25,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.formatChartNumber = exports.updateObjectFields = exports.validateNumber = exports.getToday = exports.convertDataSetPattern = exports.convertAnalyticModelToChartDataAdvance = exports.getStartOfDay = exports.timestampToStringDDMMYYYY = exports.dateToStringDDMMYYYY = exports.convertTimelineToDateTime = exports.dateTimeToString = exports.convertTimestampToDateTime = exports.convertDateTimeToTimestamp = exports.checkValidUrl = exports.validateAnalyticTypes = exports.stringToListAccessPoint = exports.checkValidMacAddress = exports.checkValidStringListAP = exports.convertTimeLine = exports.WMAPEcalculator = exports.roundDecimalNumber = exports.convertArrayToObject = exports.offlinePaginate = exports.changeToAlias = exports.calculatorDirectoryIdRoot = exports.getRoutePath = exports.timestampToStringDDMMYYYYHHmm = exports.dateToStringddddDDMMYYYYHHmm = exports.downloadZipFile = exports.downloadFilePattern = exports.generateUUID = exports.displayLongString = exports.getQueryVariable = exports.formatNumber = exports.dateToString = exports.getCookie = exports.TIMELINE_TYPE = void 0;
27
27
  var moment_1 = __importDefault(require("moment"));
28
- var i18next_1 = __importDefault(require("i18next"));
28
+ var i18n_1 = __importDefault(require("../i18n"));
29
29
  var helper_1 = require("../AWING/helper");
30
30
  var TIMELINE_TYPE;
31
31
  (function (TIMELINE_TYPE) {
@@ -55,7 +55,7 @@ function dateToString(date) {
55
55
  exports.dateToString = dateToString;
56
56
  function formatNumber(num) {
57
57
  if (num || num === 0) {
58
- return new Intl.NumberFormat(i18next_1.default.language === 'vi' ? 'vi-VN' : 'en-US').format(num);
58
+ return new Intl.NumberFormat(i18n_1.default.language === 'vi' ? 'vi-VN' : 'en-US').format(num);
59
59
  }
60
60
  else
61
61
  return '';
@@ -137,7 +137,7 @@ function dateToStringddddDDMMYYYYHHmm(date) {
137
137
  if (!date)
138
138
  return null;
139
139
  var _date = new Date(date);
140
- var _language = i18next_1.default.language || 'vi';
140
+ var _language = i18n_1.default.language || 'vi';
141
141
  var options = {
142
142
  weekday: 'long',
143
143
  year: 'numeric',
@@ -423,7 +423,7 @@ function convertAnalyticModelToChartDataAdvance(analyticModel) {
423
423
  var totalCTR = totalView > 0 ? ((totalClick * 100) / totalView).toFixed(2) : 0;
424
424
  return [
425
425
  {
426
- label: "".concat(i18next_1.default.t('Common.Impression'), " ").concat(roundDecimalNumber(totalView)),
426
+ label: "".concat(i18n_1.default.t('Common.Impression'), " ").concat(roundDecimalNumber(totalView)),
427
427
  type: 'line',
428
428
  data: ViewData,
429
429
  fill: false,
@@ -432,7 +432,7 @@ function convertAnalyticModelToChartDataAdvance(analyticModel) {
432
432
  variant: 'primary',
433
433
  },
434
434
  {
435
- label: "".concat(i18next_1.default.t('Common.FinalClick'), " ").concat(roundDecimalNumber(totalClick)),
435
+ label: "".concat(i18n_1.default.t('Common.FinalClick'), " ").concat(roundDecimalNumber(totalClick)),
436
436
  type: 'line',
437
437
  data: ClickData,
438
438
  fill: false,
@@ -459,19 +459,19 @@ var convertDataSetPattern = function (data) {
459
459
  return [
460
460
  {
461
461
  data: ctr,
462
- label: i18next_1.default.t('Statistics.CTR'),
462
+ label: i18n_1.default.t('Statistics.CTR'),
463
463
  type: 'bar',
464
464
  color: 'rgb(128, 176, 255)',
465
465
  },
466
466
  {
467
467
  data: numberOfConnections,
468
- label: i18next_1.default.t('Statistics.NumberOfConnections'),
468
+ label: i18n_1.default.t('Statistics.NumberOfConnections'),
469
469
  type: 'line',
470
470
  color: 'rgb(0, 85, 184)',
471
471
  },
472
472
  {
473
473
  data: impressions,
474
- label: i18next_1.default.t('Statistics.Impressions'),
474
+ label: i18n_1.default.t('Statistics.Impressions'),
475
475
  type: 'line',
476
476
  color: 'rgb(221, 4, 12)',
477
477
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awing-library",
3
- "version": "2.1.73-beta",
3
+ "version": "2.1.75-beta",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",