tabexseriescomponents 0.2.1071 → 0.2.1072

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/dist/index.cjs.js CHANGED
@@ -68076,6 +68076,7 @@ var DynamicForm = function DynamicForm(props) {
68076
68076
  _useState12[0];
68077
68077
  _useState12[1];
68078
68078
  var authdetailsContext = props.actions.authdetailsContext;
68079
+ var routingcountext = props.actions.routingcountext;
68079
68080
 
68080
68081
  // const [numberoffields, setnumberoffields] = useState('');
68081
68082
  // const [numberofslides, setnumberofslides] = useState(0);
@@ -68143,6 +68144,23 @@ var DynamicForm = function DynamicForm(props) {
68143
68144
  var baseUrl = fullUrl ? new URL(fullUrl).origin : null;
68144
68145
  fields === null || fields === void 0 || fields.forEach(function (item) {
68145
68146
  if (item.isrequired == 1) {
68147
+ if (authdetailsContext.instinfo.instid == '68527dfef348b') {
68148
+ if (item.title_en == 'Email') {
68149
+ var _item$value;
68150
+ var email = ((_item$value = item.value) === null || _item$value === void 0 ? void 0 : _item$value.trim()) || '';
68151
+ var isValidEmail = email.includes('@') && email.endsWith('.com');
68152
+ if (!isValidEmail) {
68153
+ validationpassed = false;
68154
+ reason = 'Please enter a valid email.';
68155
+ }
68156
+ // validationpassed = false;
68157
+ } else if (item.title_en == 'Mobile Number') {
68158
+ if (item.value.length < 11) {
68159
+ validationpassed = false;
68160
+ reason = 'Please enter a valid mobile number';
68161
+ }
68162
+ }
68163
+ }
68146
68164
  if (item.value != undefined && item.value != null) {
68147
68165
  if (item.value.length == 0) {
68148
68166
  validationpassed = false;
@@ -68176,7 +68194,11 @@ var DynamicForm = function DynamicForm(props) {
68176
68194
  // if you want to handle status checks
68177
68195
  if (data.status) {
68178
68196
  clearform();
68179
- setshowpopup(true);
68197
+ if (authdetailsContext.instinfo.instid == '68527dfef348b') {
68198
+ routingcountext('submission-form', false, '');
68199
+ } else {
68200
+ setshowpopup(true);
68201
+ }
68180
68202
  setconfirmationtext(langdetect == 'en' ? 'We have received your message' : 'تم استقبال رسالتك');
68181
68203
  } else {
68182
68204
  NotificationManager.warning('', data.reason || 'Something went wrong');
package/dist/index.esm.js CHANGED
@@ -68025,6 +68025,7 @@ var DynamicForm = function DynamicForm(props) {
68025
68025
  _useState12[0];
68026
68026
  _useState12[1];
68027
68027
  var authdetailsContext = props.actions.authdetailsContext;
68028
+ var routingcountext = props.actions.routingcountext;
68028
68029
 
68029
68030
  // const [numberoffields, setnumberoffields] = useState('');
68030
68031
  // const [numberofslides, setnumberofslides] = useState(0);
@@ -68092,6 +68093,23 @@ var DynamicForm = function DynamicForm(props) {
68092
68093
  var baseUrl = fullUrl ? new URL(fullUrl).origin : null;
68093
68094
  fields === null || fields === void 0 || fields.forEach(function (item) {
68094
68095
  if (item.isrequired == 1) {
68096
+ if (authdetailsContext.instinfo.instid == '68527dfef348b') {
68097
+ if (item.title_en == 'Email') {
68098
+ var _item$value;
68099
+ var email = ((_item$value = item.value) === null || _item$value === void 0 ? void 0 : _item$value.trim()) || '';
68100
+ var isValidEmail = email.includes('@') && email.endsWith('.com');
68101
+ if (!isValidEmail) {
68102
+ validationpassed = false;
68103
+ reason = 'Please enter a valid email.';
68104
+ }
68105
+ // validationpassed = false;
68106
+ } else if (item.title_en == 'Mobile Number') {
68107
+ if (item.value.length < 11) {
68108
+ validationpassed = false;
68109
+ reason = 'Please enter a valid mobile number';
68110
+ }
68111
+ }
68112
+ }
68095
68113
  if (item.value != undefined && item.value != null) {
68096
68114
  if (item.value.length == 0) {
68097
68115
  validationpassed = false;
@@ -68125,7 +68143,11 @@ var DynamicForm = function DynamicForm(props) {
68125
68143
  // if you want to handle status checks
68126
68144
  if (data.status) {
68127
68145
  clearform();
68128
- setshowpopup(true);
68146
+ if (authdetailsContext.instinfo.instid == '68527dfef348b') {
68147
+ routingcountext('submission-form', false, '');
68148
+ } else {
68149
+ setshowpopup(true);
68150
+ }
68129
68151
  setconfirmationtext(langdetect == 'en' ? 'We have received your message' : 'تم استقبال رسالتك');
68130
68152
  } else {
68131
68153
  NotificationManager.warning('', data.reason || 'Something went wrong');
package/dist/index.umd.js CHANGED
@@ -67884,6 +67884,7 @@
67884
67884
  _useState12[0];
67885
67885
  _useState12[1];
67886
67886
  var authdetailsContext = props.actions.authdetailsContext;
67887
+ var routingcountext = props.actions.routingcountext;
67887
67888
 
67888
67889
  // const [numberoffields, setnumberoffields] = useState('');
67889
67890
  // const [numberofslides, setnumberofslides] = useState(0);
@@ -67951,6 +67952,23 @@
67951
67952
  var baseUrl = fullUrl ? new URL(fullUrl).origin : null;
67952
67953
  fields === null || fields === void 0 || fields.forEach(function (item) {
67953
67954
  if (item.isrequired == 1) {
67955
+ if (authdetailsContext.instinfo.instid == '68527dfef348b') {
67956
+ if (item.title_en == 'Email') {
67957
+ var _item$value;
67958
+ var email = ((_item$value = item.value) === null || _item$value === void 0 ? void 0 : _item$value.trim()) || '';
67959
+ var isValidEmail = email.includes('@') && email.endsWith('.com');
67960
+ if (!isValidEmail) {
67961
+ validationpassed = false;
67962
+ reason = 'Please enter a valid email.';
67963
+ }
67964
+ // validationpassed = false;
67965
+ } else if (item.title_en == 'Mobile Number') {
67966
+ if (item.value.length < 11) {
67967
+ validationpassed = false;
67968
+ reason = 'Please enter a valid mobile number';
67969
+ }
67970
+ }
67971
+ }
67954
67972
  if (item.value != undefined && item.value != null) {
67955
67973
  if (item.value.length == 0) {
67956
67974
  validationpassed = false;
@@ -67984,7 +68002,11 @@
67984
68002
  // if you want to handle status checks
67985
68003
  if (data.status) {
67986
68004
  clearform();
67987
- setshowpopup(true);
68005
+ if (authdetailsContext.instinfo.instid == '68527dfef348b') {
68006
+ routingcountext('submission-form', false, '');
68007
+ } else {
68008
+ setshowpopup(true);
68009
+ }
67988
68010
  setconfirmationtext(langdetect == 'en' ? 'We have received your message' : 'تم استقبال رسالتك');
67989
68011
  } else {
67990
68012
  NotificationManager.warning('', data.reason || 'Something went wrong');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabexseriescomponents",
3
- "version": "0.2.1071",
3
+ "version": "0.2.1072",
4
4
  "type": "module",
5
5
  "description": "your description",
6
6
  "main": "dist/index.cjs.js",