awing-library 2.1.168-dev → 2.1.169-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.
- package/lib/ACM-AXN/Campaign/CreateOrEdit/TabSubCampaign/Advanced.js +1 -1
- package/lib/ACM-AXN/Campaign/Utils.d.ts +1 -1
- package/lib/ACM-AXN/Campaign/Utils.js +1 -1
- package/lib/ACM-AXN/ViewTemplate/TemplateField/Fields/BasicField/index.js +30 -35
- package/lib/ACM-AXN/ViewTemplate/container.js +2 -2
- package/package.json +1 -1
|
@@ -180,6 +180,7 @@ var Advanced = function (props) {
|
|
|
180
180
|
type: {
|
|
181
181
|
LimitView: t('Campaign.RuleType.LimitView'),
|
|
182
182
|
LimitClick: t('Campaign.RuleType.LimitClick'),
|
|
183
|
+
Authentication: t('Campaign.RuleType.Engagement'),
|
|
183
184
|
LimitEvent: t('Campaign.RuleType.LimitEvent'),
|
|
184
185
|
TargetGender: t('Campaign.RuleType.TargetGender'),
|
|
185
186
|
TargetAge: t('Campaign.RuleType.TargetAge'),
|
|
@@ -189,7 +190,6 @@ var Advanced = function (props) {
|
|
|
189
190
|
RetargetPlace: t('Campaign.RuleType.RetargetPlace'),
|
|
190
191
|
RetargetDomain: t('Campaign.RuleType.RetargetDomain'),
|
|
191
192
|
RetargetMacAddress: t('Campaign.RuleType.RetargetMacAddress'),
|
|
192
|
-
Authentication: t('Campaign.RuleType.Engagement'),
|
|
193
193
|
},
|
|
194
194
|
};
|
|
195
195
|
var handleSubmit = function () {
|
|
@@ -77,13 +77,13 @@ export declare const nextChar: (c: string) => string;
|
|
|
77
77
|
export declare const RuleType: {
|
|
78
78
|
LimitView: number;
|
|
79
79
|
LimitClick: number;
|
|
80
|
+
Authentication: number;
|
|
80
81
|
LimitEvent: number;
|
|
81
82
|
TargetGender: number;
|
|
82
83
|
TargetAge: number;
|
|
83
84
|
TargetOS: number;
|
|
84
85
|
TargetDevice: number;
|
|
85
86
|
RetargetMacAddress: number;
|
|
86
|
-
Authentication: number;
|
|
87
87
|
};
|
|
88
88
|
export declare const RuleTypeOfCalculator: {
|
|
89
89
|
TargetGender: number;
|
|
@@ -368,13 +368,13 @@ exports.nextChar = nextChar;
|
|
|
368
368
|
exports.RuleType = {
|
|
369
369
|
LimitView: 0,
|
|
370
370
|
LimitClick: 1,
|
|
371
|
+
Authentication: 8,
|
|
371
372
|
LimitEvent: 2,
|
|
372
373
|
TargetGender: 3,
|
|
373
374
|
TargetAge: 4,
|
|
374
375
|
TargetOS: 5,
|
|
375
376
|
TargetDevice: 6,
|
|
376
377
|
RetargetMacAddress: 7,
|
|
377
|
-
Authentication: 8,
|
|
378
378
|
};
|
|
379
379
|
exports.RuleTypeOfCalculator = {
|
|
380
380
|
TargetGender: 3,
|
|
@@ -10,29 +10,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
15
|
};
|
|
@@ -40,9 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
40
17
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
18
|
var material_1 = require("@mui/material");
|
|
42
19
|
var styles_1 = require("@mui/styles");
|
|
43
|
-
var AWING_1 = require("../../../../../AWING");
|
|
44
20
|
var validation_1 = require("../../../../../AWING/ultis/validation");
|
|
45
|
-
var react_1 =
|
|
21
|
+
var react_1 = require("react");
|
|
46
22
|
var react_i18next_1 = require("react-i18next");
|
|
47
23
|
var Enum_1 = require("../../../Enum");
|
|
48
24
|
var ImageField_1 = __importDefault(require("./ImageField"));
|
|
@@ -136,8 +112,8 @@ function BasicField(props) {
|
|
|
136
112
|
}));
|
|
137
113
|
// onChangeViewValid(isError)
|
|
138
114
|
switch (fieldType) {
|
|
115
|
+
// return renderNumberField(field, isError)
|
|
139
116
|
case Enum_1.TYPE_FIELD_TEMPLATE.TEXT_FIELD_NUMBER:
|
|
140
|
-
return renderNumberField(field, isError);
|
|
141
117
|
case Enum_1.TYPE_FIELD_TEMPLATE.TEXT_FIELD:
|
|
142
118
|
case Enum_1.TYPE_FIELD_TEMPLATE.URL:
|
|
143
119
|
return renderTextField(field, isError);
|
|
@@ -159,16 +135,35 @@ function BasicField(props) {
|
|
|
159
135
|
return null;
|
|
160
136
|
}
|
|
161
137
|
};
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
138
|
+
// const renderNumberField = React.useCallback((field: any, isError: boolean) => {
|
|
139
|
+
// return (
|
|
140
|
+
// <NumberFormat
|
|
141
|
+
// {...field}
|
|
142
|
+
// inputProps={{ min: 0 }}
|
|
143
|
+
// className={classes.text}
|
|
144
|
+
// required={isRequired}
|
|
145
|
+
// min={0}
|
|
146
|
+
// fullWidth
|
|
147
|
+
// variant="standard"
|
|
148
|
+
// label={labelName || fieldName}
|
|
149
|
+
// onChange={(e) => {
|
|
150
|
+
// let newValue = Number(e.target.value)
|
|
151
|
+
// console.log('newValue', newValue)
|
|
152
|
+
// handleChange(newValue)
|
|
153
|
+
// }}
|
|
154
|
+
// error={isError}
|
|
155
|
+
// helperText={isError ? t('Common.Required') : ''}
|
|
156
|
+
// />
|
|
157
|
+
// )
|
|
158
|
+
// // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
159
|
+
// }, [classes, fieldName, isRequired, labelName, t])
|
|
170
160
|
var renderTextField = function (field, isError) {
|
|
171
|
-
return ((0, jsx_runtime_1.jsx)(material_1.TextField, __assign({}, field, { className: classes.text, required: isRequired, fullWidth: true }, (fieldType === Enum_1.TYPE_FIELD_TEMPLATE.
|
|
161
|
+
return ((0, jsx_runtime_1.jsx)(material_1.TextField, __assign({}, field, { className: classes.text, required: isRequired, fullWidth: true }, (fieldType === Enum_1.TYPE_FIELD_TEMPLATE.TEXT_FIELD_NUMBER
|
|
162
|
+
? { inputProps: {
|
|
163
|
+
min: 0,
|
|
164
|
+
type: 'number',
|
|
165
|
+
} }
|
|
166
|
+
: {}), (fieldType === Enum_1.TYPE_FIELD_TEMPLATE.TEXTAREA
|
|
172
167
|
? { multiline: true, rows: 4 }
|
|
173
168
|
: {}), { variant: "standard", label: labelName || fieldName, onChange: function (e) {
|
|
174
169
|
handleChange(e.target.value);
|
|
@@ -85,7 +85,7 @@ function ViewTemplate(_a) {
|
|
|
85
85
|
return ((0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, spacing: 4, children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, { item: true, xs: enablePreview ? 8 : 12, children: [templateLabelName && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", style: {
|
|
86
86
|
fontWeight: "bold",
|
|
87
87
|
textTransform: "uppercase",
|
|
88
|
-
}, children: templateLabelName })), fields && renderFields(fields, false), (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { id: "advance-option", style: {
|
|
88
|
+
}, children: templateLabelName })), fields && renderFields(fields, false), enablePreview && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { id: "advance-option", style: {
|
|
89
89
|
display: "flex",
|
|
90
90
|
flexDirection: "row",
|
|
91
91
|
justifyContent: "space-between",
|
|
@@ -99,7 +99,7 @@ function ViewTemplate(_a) {
|
|
|
99
99
|
display: "block",
|
|
100
100
|
} : {
|
|
101
101
|
display: "none",
|
|
102
|
-
}, children: [fields && advanceFields.length > 0 && renderFields(fields, true), (0, jsx_runtime_1.jsx)(Event_1.default, __assign({}, props))] })] })] }), enablePreview && ((0, jsx_runtime_1.jsxs)(material_1.Grid, { item: true, xs: 4, children: [(0, jsx_runtime_1.jsx)(Preview_1.default, { domainId: domainId || "", validStatus: validStatus, configs: CONFIGS, pagePath: pagePath, templateDatas: templateDatas }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", children: t("ViewTemplate.PreviewLoadingNote") })] }))] }));
|
|
102
|
+
}, children: [fields && advanceFields.length > 0 && renderFields(fields, true), (0, jsx_runtime_1.jsx)(Event_1.default, __assign({}, props))] })] }))] }), enablePreview && ((0, jsx_runtime_1.jsxs)(material_1.Grid, { item: true, xs: 4, children: [(0, jsx_runtime_1.jsx)(Preview_1.default, { domainId: domainId || "", validStatus: validStatus, configs: CONFIGS, pagePath: pagePath, templateDatas: templateDatas }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", children: t("ViewTemplate.PreviewLoadingNote") })] }))] }));
|
|
103
103
|
}
|
|
104
104
|
exports.default = ViewTemplate;
|
|
105
105
|
var getChilds = function (fields, fieldInfo) {
|