Your IP : 216.73.216.26


Current Path : /home2/wtmwscom/public_html/post/scripts/
Upload File :
Current File : /home2/wtmwscom/public_html/post/scripts/Portal_026.js

define("Portal.EP_Inputs.MobilePhoneISD.mvc$model", ["OutSystems/ClientRuntime/Main", "Portal.model", "OutSystemsUI.model", "MultiLingual.controller", "Portal.controller", "Portal.model$DropdownItemList", "OutSystemsUI.model$DropdownItemRec", "Portal.referencesHealth", "Portal.referencesHealth$OutSystemsUI", "MultiLingual.controller$GetTranslation", "Portal.referencesHealth$MultiLingual", "Portal.model$MasterDataListList", "Portal.controller$RestrictToNumberKeyUp", "Portal.controller$IsValidUAEPhoneNumber", "Portal.controller$IsValidPhoneNumber"], function (OutSystems, PortalModel, OutSystemsUIModel, MultiLingualController, PortalController) {
var OS = OutSystems.Internal;

var FetchISDCodesDataActRec = (function (_super) {
__extends(FetchISDCodesDataActRec, _super);
function FetchISDCodesDataActRec(defaults) {
_super.apply(this, arguments);
}
FetchISDCodesDataActRec.attributesToDeclare = function () {
return [
this.attr("OutISDCodes", "outISDCodesOut", "OutISDCodes", true, false, OS.Types.RecordList, function () {
return OS.DataTypes.ImmutableBase.getData(new PortalModel.MasterDataListList());
}, true, PortalModel.MasterDataListList)
].concat(_super.attributesToDeclare.call(this));
};
FetchISDCodesDataActRec.fromStructure = function (str) {
return new FetchISDCodesDataActRec(new FetchISDCodesDataActRec.RecordClass({
outISDCodesOut: OS.DataTypes.ImmutableBase.getData(str)
}));
};
FetchISDCodesDataActRec.init();
return FetchISDCodesDataActRec;
})(OS.Model.DataSourceRecord);

var VariablesRecord = (function (_super) {
__extends(VariablesRecord, _super);
function VariablesRecord(defaults) {
_super.apply(this, arguments);
}
VariablesRecord.attributesToDeclare = function () {
return [
this.attr("DefaultISD", "defaultISDVar", "DefaultISD", true, false, OS.Types.Record, function () {
return OS.DataTypes.ImmutableBase.getData(new OutSystemsUIModel.DropdownItemRec());
}, false, OutSystemsUIModel.DropdownItemRec), 
this.attr("IsUAESelected", "isUAESelectedVar", "IsUAESelected", true, false, OS.Types.Boolean, function () {
return false;
}, false), 
this.attr("Label", "labelIn", "Label", true, false, OS.Types.Text, function () {
return "Mobile Number";
}, false), 
this.attr("_labelInDataFetchStatus", "_labelInDataFetchStatus", "_labelInDataFetchStatus", true, false, OS.Types.Integer, function () {
return /*Fetched*/ 1;
}, false), 
this.attr("MobilePhone", "mobilePhoneIn", "MobilePhone", true, false, OS.Types.PhoneNumber, function () {
return "";
}, false), 
this.attr("_mobilePhoneInDataFetchStatus", "_mobilePhoneInDataFetchStatus", "_mobilePhoneInDataFetchStatus", true, false, OS.Types.Integer, function () {
return /*Fetched*/ 1;
}, false), 
this.attr("IsMandatory", "isMandatoryIn", "IsMandatory", true, false, OS.Types.Boolean, function () {
return true;
}, false), 
this.attr("_isMandatoryInDataFetchStatus", "_isMandatoryInDataFetchStatus", "_isMandatoryInDataFetchStatus", true, false, OS.Types.Integer, function () {
return /*Fetched*/ 1;
}, false), 
this.attr("IsEnabled", "isEnabledIn", "IsEnabled", true, false, OS.Types.Boolean, function () {
return true;
}, false), 
this.attr("_isEnabledInDataFetchStatus", "_isEnabledInDataFetchStatus", "_isEnabledInDataFetchStatus", true, false, OS.Types.Integer, function () {
return /*Fetched*/ 1;
}, false), 
this.attr("InitialISDId", "initialISDIdIn", "InitialISDId", true, false, OS.Types.Text, function () {
return "";
}, false), 
this.attr("_initialISDIdInDataFetchStatus", "_initialISDIdInDataFetchStatus", "_initialISDIdInDataFetchStatus", true, false, OS.Types.Integer, function () {
return /*Fetched*/ 1;
}, false), 
this.attr("InitialISDCode", "initialISDCodeIn", "InitialISDCode", true, false, OS.Types.Text, function () {
return "";
}, false), 
this.attr("_initialISDCodeInDataFetchStatus", "_initialISDCodeInDataFetchStatus", "_initialISDCodeInDataFetchStatus", true, false, OS.Types.Integer, function () {
return /*Fetched*/ 1;
}, false), 
this.attr("IsMobile", "isMobileIn", "IsMobile", true, false, OS.Types.Boolean, function () {
return false;
}, false), 
this.attr("_isMobileInDataFetchStatus", "_isMobileInDataFetchStatus", "_isMobileInDataFetchStatus", true, false, OS.Types.Integer, function () {
return /*Fetched*/ 1;
}, false), 
this.attr("IsUAEOnly", "isUAEOnlyIn", "IsUAEOnly", true, false, OS.Types.Boolean, function () {
return false;
}, false), 
this.attr("_isUAEOnlyInDataFetchStatus", "_isUAEOnlyInDataFetchStatus", "_isUAEOnlyInDataFetchStatus", true, false, OS.Types.Integer, function () {
return /*Fetched*/ 1;
}, false), 
this.attr("Language", "languageIn", "Language", true, false, OS.Types.Text, function () {
return "";
}, false), 
this.attr("_languageInDataFetchStatus", "_languageInDataFetchStatus", "_languageInDataFetchStatus", true, false, OS.Types.Integer, function () {
return /*Fetched*/ 1;
}, false), 
this.attr("FetchISDCodes", "fetchISDCodesDataAct", "fetchISDCodesDataAct", true, true, OS.Types.Record, function () {
return OS.DataTypes.ImmutableBase.getData(new FetchISDCodesDataActRec());
}, true, FetchISDCodesDataActRec)
].concat(_super.attributesToDeclare.call(this));
};
VariablesRecord.init();
return VariablesRecord;
})(OS.DataTypes.GenericRecord);
var WidgetsRecord = (function (_super) {
__extends(WidgetsRecord, _super);
function WidgetsRecord() {
_super.apply(this, arguments);
}
WidgetsRecord.getWidgetsType = function () {
return {
Input_MobilePhone: OS.Model.ValidationWidgetRecord
};
};

return WidgetsRecord;
})(OS.Model.BaseWidgetRecordMap);
var Model = (function (_super) {
__extends(Model, _super);
function Model() {
_super.apply(this, arguments);
}
Model.getVariablesRecordConstructor = function () {
return VariablesRecord;
};
Model.getWidgetsRecordConstructor = function () {
return WidgetsRecord;
};
Object.defineProperty(Model, "hasValidationWidgets", {
enumerable: true,
configurable: true,
get: function () {
return true;
}
});

Model.prototype.setInputs = function (inputs) {
if("Label" in inputs) {
this.variables.labelIn = inputs.Label;
if("_labelInDataFetchStatus" in inputs) {
this.variables._labelInDataFetchStatus = inputs._labelInDataFetchStatus;
}

}

if("MobilePhone" in inputs) {
this.variables.mobilePhoneIn = inputs.MobilePhone;
if("_mobilePhoneInDataFetchStatus" in inputs) {
this.variables._mobilePhoneInDataFetchStatus = inputs._mobilePhoneInDataFetchStatus;
}

}

if("IsMandatory" in inputs) {
this.variables.isMandatoryIn = inputs.IsMandatory;
if("_isMandatoryInDataFetchStatus" in inputs) {
this.variables._isMandatoryInDataFetchStatus = inputs._isMandatoryInDataFetchStatus;
}

}

if("IsEnabled" in inputs) {
this.variables.isEnabledIn = inputs.IsEnabled;
if("_isEnabledInDataFetchStatus" in inputs) {
this.variables._isEnabledInDataFetchStatus = inputs._isEnabledInDataFetchStatus;
}

}

if("InitialISDId" in inputs) {
this.variables.initialISDIdIn = inputs.InitialISDId;
if("_initialISDIdInDataFetchStatus" in inputs) {
this.variables._initialISDIdInDataFetchStatus = inputs._initialISDIdInDataFetchStatus;
}

}

if("InitialISDCode" in inputs) {
this.variables.initialISDCodeIn = inputs.InitialISDCode;
if("_initialISDCodeInDataFetchStatus" in inputs) {
this.variables._initialISDCodeInDataFetchStatus = inputs._initialISDCodeInDataFetchStatus;
}

}

if("IsMobile" in inputs) {
this.variables.isMobileIn = inputs.IsMobile;
if("_isMobileInDataFetchStatus" in inputs) {
this.variables._isMobileInDataFetchStatus = inputs._isMobileInDataFetchStatus;
}

}

if("IsUAEOnly" in inputs) {
this.variables.isUAEOnlyIn = inputs.IsUAEOnly;
if("_isUAEOnlyInDataFetchStatus" in inputs) {
this.variables._isUAEOnlyInDataFetchStatus = inputs._isUAEOnlyInDataFetchStatus;
}

}

if("Language" in inputs) {
this.variables.languageIn = inputs.Language;
if("_languageInDataFetchStatus" in inputs) {
this.variables._languageInDataFetchStatus = inputs._languageInDataFetchStatus;
}

}

};
return Model;
})(OS.Model.BaseViewModel);
return new OS.Model.ModelFactory(Model);
});
define("Portal.EP_Inputs.MobilePhoneISD.mvc$view", ["OutSystems/ClientRuntime/Main", "Portal.model", "Portal.controller", "OutSystemsUI.model", "MultiLingual.controller", "react", "OutSystems/ReactView/Main", "Portal.EP_Inputs.MobilePhoneISD.mvc$model", "Portal.EP_Inputs.MobilePhoneISD.mvc$controller", "Portal.clientVariables", "Portal.EP_Inputs.Input.mvc$view", "OutSystems/ReactWidgets/Main", "OutSystemsUI.Interaction.InputWithIcon.mvc$view", "OutSystemsUI.Interaction.DropdownSearch.mvc$view", "Portal.EP_Common.Loader.mvc$view", "Portal.model$DropdownItemList", "OutSystemsUI.model$DropdownItemRec", "Portal.referencesHealth", "Portal.referencesHealth$OutSystemsUI", "MultiLingual.controller$GetTranslation", "Portal.referencesHealth$MultiLingual", "Portal.model$MasterDataListList", "Portal.controller$RestrictToNumberKeyUp", "Portal.controller$IsValidUAEPhoneNumber", "Portal.controller$IsValidPhoneNumber"], function (OutSystems, PortalModel, PortalController, OutSystemsUIModel, MultiLingualController, React, OSView, Portal_EP_Inputs_MobilePhoneISD_mvc_model, Portal_EP_Inputs_MobilePhoneISD_mvc_controller, PortalClientVariables, Portal_EP_Inputs_Input_mvc_view, OSWidgets, OutSystemsUI_Interaction_InputWithIcon_mvc_view, OutSystemsUI_Interaction_DropdownSearch_mvc_view, Portal_EP_Common_Loader_mvc_view) {
    var OS = OutSystems.Internal;
var PlaceholderContent = OSView.Widget.PlaceholderContent;
var IteratorPlaceholderContent = OSView.Widget.IteratorPlaceholderContent;


    var View = (function (_super) {
        __extends(View,_super);
        function View() {
            try {
                this.initialize.apply(this, arguments);
            } catch (error) {
                View.handleError(error);
                throw error;
            }
        }
        View.prototype.initialize = function() {
            _super.apply(this, arguments);
        };
        View.displayName = "EP_Inputs.MobilePhoneISD";
        View.getCssDependencies = function() {
            return ["css/OutSystemsReactWidgets.css"];
        };
        View.getJsDependencies = function() {
            return [];
        };
        View.getBlocks = function() {
            return [Portal_EP_Inputs_Input_mvc_view, OutSystemsUI_Interaction_InputWithIcon_mvc_view, OutSystemsUI_Interaction_DropdownSearch_mvc_view, Portal_EP_Common_Loader_mvc_view];
        };
        Object.defineProperty(View.prototype, "modelFactory", {
            get: function () {
                return Portal_EP_Inputs_MobilePhoneISD_mvc_model;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(View.prototype, "controllerFactory", {
            get: function () {
                return Portal_EP_Inputs_MobilePhoneISD_mvc_controller;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(View.prototype, "title", {
            get: function () {
                return "";
            },
            enumerable: true,
            configurable: true
        });
        View.prototype.internalRender = function() {
            var model = this.model;
            var controller = this.controller;
            var idService = this.idService;
            var validationService = controller.validationService;
            var widgetsRecordProvider = this.widgetsRecordProvider;
            var callContext = controller.callContext();
            var $if = View.ifWidget;
            var asPrimitiveValue = View.asPrimitiveValue;
            var _this = this;

            return React.createElement("div", this.getRootNodeProperties(), React.createElement(Portal_EP_Inputs_Input_mvc_view, {
inputs: {},
events: {
_handleError: function (ex) {
controller.handleError(ex);
}
},
_validationProps: {
validationService: validationService
},
_idProps: {
service: idService,
uuid: "0",
alias: "1"
},
_widgetRecordProvider: widgetsRecordProvider,
placeholders: {
label: new PlaceholderContent(function () {
return [React.createElement(OSWidgets.Expression, {
value: model.variables.labelIn,
_idProps: {
service: idService,
uuid: "1"
},
_widgetRecordProvider: widgetsRecordProvider,
value_dataFetchStatus: OS.Model.calculateDataFetchStatus(model.variables._labelInDataFetchStatus)
})];
}),
input: new PlaceholderContent(function () {
return [React.createElement(OutSystemsUI_Interaction_InputWithIcon_mvc_view, {
inputs: {
AlignIconRight: (model.variables.languageIn === PortalModel.staticEntities.locale2.ar_sa),
_alignIconRightInDataFetchStatus: OS.Model.calculateDataFetchStatus(model.variables._languageInDataFetchStatus),
ExtendedClass: "PhoneISD"
},
events: {
_handleError: function (ex) {
controller.handleError(ex);
}
},
_validationProps: {
validationService: validationService
},
_idProps: {
service: idService,
uuid: "2",
alias: "2"
},
_widgetRecordProvider: widgetsRecordProvider,
placeholders: {
icon: new PlaceholderContent(function () {
return [$if(model.variables.fetchISDCodesDataAct.isDataFetchedAttr, false, this, function () {
return [React.createElement(OutSystemsUI_Interaction_DropdownSearch_mvc_view, {
inputs: {
IsDisabled: model.getCachedValue(idService.getId("BGWBs+95dU+mF2lwrj1j_A.IsDisabled"), function () {
return ((model.variables.isUAEOnlyIn) ? (true) : (!(model.variables.isEnabledIn)));
}, function () {
return model.variables.isUAEOnlyIn;
}, function () {
return model.variables.isEnabledIn;
}),
_isDisabledInDataFetchStatus: OS.Model.calculateDataFetchStatus(model.variables._isUAEOnlyInDataFetchStatus, model.variables._isEnabledInDataFetchStatus),
ItemList: model.getCachedValue(idService.getId("BGWBs+95dU+mF2lwrj1j_A.ItemList"), function () {
return OS.DataConversion.JSConversions.typeConvertRecordList(model.variables.fetchISDCodesDataAct.outISDCodesOut, new PortalModel.DropdownItemList(), function (source, target) {
target.valueAttr = source.iDAttr;
target.textAttr = source.nameAttr;
return target;
});
}, function () {
return model.variables.fetchISDCodesDataAct.outISDCodesOut;
}),
_itemListInDataFetchStatus: OS.Model.calculateDataFetchStatus(model.variables.fetchISDCodesDataAct.dataFetchStatusAttr),
SelectedItem: function () {
var rec = new OutSystemsUIModel.DropdownItemRec();
rec.valueAttr = model.variables.initialISDIdIn;
rec.textAttr = "";
return rec;
}(),
_selectedItemInDataFetchStatus: OS.Model.calculateDataFetchStatus(model.variables._initialISDIdInDataFetchStatus)
},
events: {
_handleError: function (ex) {
controller.handleError(ex);
},
onSelect$Action: function (selectedItemIn) {
return Promise.resolve().then(function () {
var eventHandlerContext = callContext.clone();
controller.dropdownSearchOnSelect$Action(selectedItemIn, controller.callContext(eventHandlerContext));
});
;
}
},
_validationProps: {
validationService: validationService
},
_idProps: {
service: idService,
uuid: "3",
alias: "3"
},
_widgetRecordProvider: widgetsRecordProvider,
_dependencies: []
})];
}, function () {
return [React.createElement(Portal_EP_Common_Loader_mvc_view, {
inputs: {
IsOnInput: true
},
events: {
_handleError: function (ex) {
controller.handleError(ex);
}
},
_validationProps: {
validationService: validationService
},
_idProps: {
service: idService,
uuid: "4",
alias: "4"
},
_widgetRecordProvider: widgetsRecordProvider,
_dependencies: []
})];
})];
}),
input: new PlaceholderContent(function () {
return [React.createElement(OSWidgets.Input, {
_validationProps: {
validationService: validationService
},
enabled: model.variables.isEnabledIn,
extendedEvents: {
onBlur: function () {
return Promise.resolve().then(function () {
var eventHandlerContext = callContext.clone();
controller.handleOnBlur$Action(controller.callContext(eventHandlerContext));
});
;
},
"onfocusout": function () {
return Promise.resolve().then(function () {
var eventHandlerContext = callContext.clone();
controller.handleOnBlur$Action(controller.callContext(eventHandlerContext));
});
;
},
onKeyUp: function () {
var eventHandlerContext = callContext.clone();
controller.input_MobilePhoneOnKeyup$Action(controller.callContext(eventHandlerContext));

;
}
},
extendedProperties: {
pattern: model.getCachedValue(idService.getId("Input_MobilePhone.pattern"), function () {
return ((model.variables.isUAEOnlyIn) ? (PortalClientVariables.getRegex_UAEPhone()) : (PortalClientVariables.getRegex_Phone()));
}, function () {
return model.variables.isUAEOnlyIn;
}, function () {
return PortalClientVariables.getRegex_UAEPhone();
}, function () {
return PortalClientVariables.getRegex_Phone();
})
},
gridProperties: {
classes: "OSFillParent"
},
inputType: /*Phone*/ 6,
mandatory: model.variables.isMandatoryIn,
maxLength: 15,
prompt: model.getCachedValue(idService.getId("Input_MobilePhone.Prompt"), function () {
return ((model.variables.isMobileIn) ? ("e.g. 50XXXXXXX") : ("e.g. 4XXXXXX"));
}, function () {
return model.variables.isMobileIn;
}),
style: "form-control",
variable: model.createVariable(OS.Types.PhoneNumber, model.variables.mobilePhoneIn, function (value) {
model.variables.mobilePhoneIn = value;
}),
_idProps: {
service: idService,
name: "Input_MobilePhone"
},
_widgetRecordProvider: widgetsRecordProvider,
enabled_dataFetchStatus: OS.Model.calculateDataFetchStatus(model.variables._isEnabledInDataFetchStatus),
mandatory_dataFetchStatus: OS.Model.calculateDataFetchStatus(model.variables._isMandatoryInDataFetchStatus),
prompt_dataFetchStatus: OS.Model.calculateDataFetchStatus(model.variables._isMobileInDataFetchStatus),
variable_dataFetchStatus: OS.Model.calculateDataFetchStatus(model.variables._mobilePhoneInDataFetchStatus)
})];
})
},
_dependencies: [asPrimitiveValue(PortalClientVariables.getRegex_Phone()), asPrimitiveValue(PortalClientVariables.getRegex_UAEPhone()), asPrimitiveValue(model.variables.isMandatoryIn), asPrimitiveValue(model.variables.isMobileIn), asPrimitiveValue(model.variables.mobilePhoneIn), asPrimitiveValue(model.variables.initialISDIdIn), asPrimitiveValue(model.variables._isMandatoryInDataFetchStatus), asPrimitiveValue(model.variables._isMobileInDataFetchStatus), asPrimitiveValue(model.variables._mobilePhoneInDataFetchStatus), asPrimitiveValue(model.variables._initialISDIdInDataFetchStatus), asPrimitiveValue(model.variables.fetchISDCodesDataAct.dataFetchStatusAttr), asPrimitiveValue(model.variables._isEnabledInDataFetchStatus), asPrimitiveValue(model.variables._isUAEOnlyInDataFetchStatus), asPrimitiveValue(model.variables.isEnabledIn), asPrimitiveValue(model.variables.isUAEOnlyIn), asPrimitiveValue(model.variables.fetchISDCodesDataAct.outISDCodesOut), asPrimitiveValue(model.variables.fetchISDCodesDataAct.isDataFetchedAttr)]
})];
})
},
_dependencies: [asPrimitiveValue(PortalClientVariables.getRegex_Phone()), asPrimitiveValue(PortalClientVariables.getRegex_UAEPhone()), asPrimitiveValue(model.variables.isMandatoryIn), asPrimitiveValue(model.variables.isMobileIn), asPrimitiveValue(model.variables.mobilePhoneIn), asPrimitiveValue(model.variables.initialISDIdIn), asPrimitiveValue(model.variables.isEnabledIn), asPrimitiveValue(model.variables.isUAEOnlyIn), asPrimitiveValue(model.variables.fetchISDCodesDataAct.outISDCodesOut), asPrimitiveValue(model.variables.fetchISDCodesDataAct.isDataFetchedAttr), asPrimitiveValue(model.variables.languageIn), asPrimitiveValue(model.variables._isMandatoryInDataFetchStatus), asPrimitiveValue(model.variables._isMobileInDataFetchStatus), asPrimitiveValue(model.variables._mobilePhoneInDataFetchStatus), asPrimitiveValue(model.variables._initialISDIdInDataFetchStatus), asPrimitiveValue(model.variables.fetchISDCodesDataAct.dataFetchStatusAttr), asPrimitiveValue(model.variables._isEnabledInDataFetchStatus), asPrimitiveValue(model.variables._isUAEOnlyInDataFetchStatus), asPrimitiveValue(model.variables._languageInDataFetchStatus), asPrimitiveValue(model.variables._labelInDataFetchStatus), asPrimitiveValue(model.variables.labelIn)]
}));
        };
        return View;
    })(OSView.BaseView.BaseWebBlock);
	
    return View;
});
define("Portal.EP_Inputs.MobilePhoneISD.mvc$controller", ["OutSystems/ClientRuntime/Main", "Portal.model", "Portal.controller", "OutSystemsUI.model", "MultiLingual.controller", "Portal.languageResources", "Portal.clientVariables", "Portal.model$DropdownItemList", "OutSystemsUI.model$DropdownItemRec", "Portal.referencesHealth", "Portal.referencesHealth$OutSystemsUI", "MultiLingual.controller$GetTranslation", "Portal.referencesHealth$MultiLingual", "Portal.model$MasterDataListList", "Portal.controller$RestrictToNumberKeyUp", "Portal.controller$IsValidUAEPhoneNumber", "Portal.controller$IsValidPhoneNumber"], function (OutSystems, PortalModel, PortalController, OutSystemsUIModel, MultiLingualController, PortalLanguageResources, PortalClientVariables) {
var OS = OutSystems.Internal;
var Controller = (function (_super) {
__extends(Controller, _super);
function Controller() {
_super.apply(this, arguments);
var controller = this.controller;
this.clientActionProxies = {};
this.dataFetchDependenciesOriginal = {
fetchISDCodes$DataActRefresh: 0
};
this.dataFetchDependentsGraph = {
fetchISDCodes$DataActRefresh: []
};
this.useImprovedDataFetch = false;
this.hasDependenciesBetweenSources = false;
this.shouldSendClientVarsToDataSources = false;
}
// Server Actions

// Aggregates and Data Actions
Controller.prototype.fetchISDCodes$DataActRefresh = function (callContext) {
var model = this.model;
var controller = this.controller;
var callContext = controller.callContext(callContext);
return controller.callDataAction("DataActionFetchISDCodes", "screenservices/Portal/EP_Inputs/MobilePhoneISD/DataActionFetchISDCodes", "hWERSuzoWtvh0mTW+ISagw", function (b) {
model.variables.fetchISDCodesDataAct.dataFetchStatusAttr = b;
}, function (json) {
model.variables.fetchISDCodesDataAct.replaceWith(OS.DataConversion.ServerDataConverter.from(json, model.variables.fetchISDCodesDataAct.constructor));
}, undefined, undefined, undefined, callContext).then(function () {
controller._recacheISD$Action(controller.callContext(callContext));
});
};

Controller.prototype.dataFetchActionNames = ["fetchISDCodes$DataActRefresh"];
// Client Actions
Controller.prototype._onInitialize$Action = function (callContext) {
var model = this.model;
var controller = this.controller;
var idService = this.idService;
controller.ensureControllerAlive("OnInitialize");
callContext = controller.callContext(callContext);
// DefaultISD.Value = 1
model.variables.defaultISDVar.valueAttr = "1";
// DefaultISD.Text = "971"
model.variables.defaultISDVar.textAttr = "971";
if(((model.variables.labelIn === ""))) {
// Label = GetTranslation("create-account-contact-lblmobilenumber", "Mobile Number")
model.variables.labelIn = MultiLingualController.default.getTranslation$Action("create-account-contact-lblmobilenumber", "Mobile Number", callContext).translationOut;
}

};
Controller.prototype._dropdownSearchOnSelect$Action = function (selectedItemIn, callContext) {
var model = this.model;
var controller = this.controller;
var idService = this.idService;
controller.ensureControllerAlive("DropdownSearchOnSelect");
callContext = controller.callContext(callContext);
var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("Portal.EP_Inputs.MobilePhoneISD.DropdownSearchOnSelect$vars"))());
vars.value.selectedItemInLocal = selectedItemIn.clone();
var listFilterVar = new OS.DataTypes.VariableHolder();
return OS.Flow.executeAsyncFlow(function () {
// Execute Action: ListFilter
listFilterVar.value = OS.SystemActions.listFilter(model.variables.fetchISDCodesDataAct.outISDCodesOut, function (p) {
return (p.iDAttr === vars.value.selectedItemInLocal.valueAttr);
}, callContext);

// InitialISDId = ListFilter.FilteredList.Current.ID
model.variables.initialISDIdIn = listFilterVar.value.filteredListOut.getCurrent(callContext.iterationContext).iDAttr;
// InitialISDCode = ListFilter.FilteredList.Current.Code
model.variables.initialISDCodeIn = listFilterVar.value.filteredListOut.getCurrent(callContext.iterationContext).codeAttr;
// IsUAESelected = False
model.variables.isUAESelectedVar = false;
if(((listFilterVar.value.filteredListOut.getCurrent(callContext.iterationContext).codeAttr === "971"))) {
// IsUAESelected = True
model.variables.isUAESelectedVar = true;
}

// Trigger Event: MobilePhoneChanged
return controller.mobilePhoneChanged$Action(model.variables.mobilePhoneIn, model.variables.initialISDIdIn, model.variables.initialISDCodeIn, callContext);
});
};
Controller.registerVariableGroupType("Portal.EP_Inputs.MobilePhoneISD.DropdownSearchOnSelect$vars", [{
name: "SelectedItem",
attrName: "selectedItemInLocal",
mandatory: true,
dataType: OS.Types.Record,
defaultValue: function () {
return new OutSystemsUIModel.DropdownItemRec();
},
complexType: OutSystemsUIModel.DropdownItemRec
}]);
Controller.prototype._onParametersChanged$Action = function (callContext) {
var model = this.model;
var controller = this.controller;
var idService = this.idService;
controller.ensureControllerAlive("OnParametersChanged");
callContext = controller.callContext(callContext);
// Execute Action: RecacheISD
controller._recacheISD$Action(callContext);
};
Controller.prototype._input_MobilePhoneOnKeyup$Action = function (callContext) {
var model = this.model;
var controller = this.controller;
var idService = this.idService;
controller.ensureControllerAlive("Input_MobilePhoneOnKeyup");
callContext = controller.callContext(callContext);
// Execute Action: RestrictToNumberKeyUp
PortalController.default.restrictToNumberKeyUp$Action(idService.getId("Input_MobilePhone"), callContext);
};
Controller.prototype._handleOnBlur$Action = function (callContext) {
var model = this.model;
var controller = this.controller;
var idService = this.idService;
controller.ensureControllerAlive("HandleOnBlur");
callContext = controller.callContext(callContext);
return OS.Flow.executeAsyncFlow(function () {
do {
if(((model.variables.isUAEOnlyIn || model.variables.isUAESelectedVar))) {
if((!(PortalController.default.isValidUAEPhoneNumber$Action(model.variables.mobilePhoneIn, callContext).isValidOut))) {
// Input_MobilePhone.Valid = False
model.widgets.get(idService.getId("Input_MobilePhone")).validAttr = false;
// Input_MobilePhone.ValidationMessage = "Phone Number needs to start with a 5 and have exactly 9 digits"
model.widgets.get(idService.getId("Input_MobilePhone")).validationMessageAttr = "Phone Number needs to start with a 5 and have exactly 9 digits";
break;
}

} else {
if((!(PortalController.default.isValidPhoneNumber$Action(model.variables.mobilePhoneIn, callContext).isValidOut))) {
// Input_MobilePhone.Valid = False
model.widgets.get(idService.getId("Input_MobilePhone")).validAttr = false;
// Input_MobilePhone.ValidationMessage = If
model.widgets.get(idService.getId("Input_MobilePhone")).validationMessageAttr = (((model.variables.languageIn === "en-us")) ? ("Phone Number needs to have between 5 and 10 digits") : ("ينبغي أن يتألف رقم الهاتف من 5 إلى 15 رقماً"));
break;
}

}

// Input_MobilePhone.Valid = True
model.widgets.get(idService.getId("Input_MobilePhone")).validAttr = true;
// Input_MobilePhone.ValidationMessage = ""
model.widgets.get(idService.getId("Input_MobilePhone")).validationMessageAttr = "";
} while(false)
;
// Trigger Event: MobilePhoneChanged
return controller.mobilePhoneChanged$Action(model.variables.mobilePhoneIn, model.variables.initialISDIdIn, model.variables.initialISDCodeIn, callContext);
});
};
Controller.prototype._recacheISD$Action = function (callContext) {
var model = this.model;
var controller = this.controller;
var idService = this.idService;
controller.ensureControllerAlive("RecacheISD");
callContext = controller.callContext(callContext);
var listFilterVar = new OS.DataTypes.VariableHolder();
if((!(((model.variables.initialISDIdIn === "") && (model.variables.initialISDCodeIn === ""))))) {
// Execute Action: ListFilter
listFilterVar.value = OS.SystemActions.listFilter(model.variables.fetchISDCodesDataAct.outISDCodesOut, function (p) {
return ((((model.variables.initialISDIdIn) !== (""))) ? ((p.iDAttr === model.variables.initialISDIdIn)) : ((p.codeAttr === model.variables.initialISDCodeIn)));
}, callContext);

if((!(listFilterVar.value.filteredListOut.isEmpty))) {
// InitialISDId = ListFilter.FilteredList.Current.ID
model.variables.initialISDIdIn = listFilterVar.value.filteredListOut.getCurrent(callContext.iterationContext).iDAttr;
// InitialISDCode = ListFilter.FilteredList.Current.Code
model.variables.initialISDCodeIn = listFilterVar.value.filteredListOut.getCurrent(callContext.iterationContext).codeAttr;
return ;

}

}

// InitialISDId = DefaultISD.Value
model.variables.initialISDIdIn = model.variables.defaultISDVar.valueAttr;
// InitialISDCode = DefaultISD.Text
model.variables.initialISDCodeIn = model.variables.defaultISDVar.textAttr;
};
Controller.prototype._onRender$Action = function (callContext) {
var model = this.model;
var controller = this.controller;
var idService = this.idService;
controller.ensureControllerAlive("OnRender");
callContext = controller.callContext(callContext);
if(((model.variables.labelIn === ""))) {
// Label = GetTranslation("create-account-contact-lblmobilenumber", "Mobile Number")
model.variables.labelIn = MultiLingualController.default.getTranslation$Action("create-account-contact-lblmobilenumber", "Mobile Number", callContext).translationOut;
}

};
Controller.prototype._onReady$Action = function (callContext) {
var model = this.model;
var controller = this.controller;
var idService = this.idService;
controller.ensureControllerAlive("OnReady");
callContext = controller.callContext(callContext);
if(((model.variables.labelIn === ""))) {
// Label
// Label = GetTranslation("create-account-contact-lblmobilenumber", "Mobile Number")
model.variables.labelIn = MultiLingualController.default.getTranslation$Action("create-account-contact-lblmobilenumber", "Mobile Number", callContext).translationOut;
}

};

Controller.prototype.onInitialize$Action = function (callContext) {
var controller = this.controller;
return controller.safeExecuteClientAction(controller._onInitialize$Action, callContext);

};
Controller.prototype.dropdownSearchOnSelect$Action = function (selectedItemIn, callContext) {
var controller = this.controller;
return controller.safeExecuteClientAction(controller._dropdownSearchOnSelect$Action, callContext, selectedItemIn);

};
Controller.prototype.onParametersChanged$Action = function (callContext) {
var controller = this.controller;
return controller.safeExecuteClientAction(controller._onParametersChanged$Action, callContext);

};
Controller.prototype.input_MobilePhoneOnKeyup$Action = function (callContext) {
var controller = this.controller;
return controller.safeExecuteClientAction(controller._input_MobilePhoneOnKeyup$Action, callContext);

};
Controller.prototype.handleOnBlur$Action = function (callContext) {
var controller = this.controller;
return controller.safeExecuteClientAction(controller._handleOnBlur$Action, callContext);

};
Controller.prototype.recacheISD$Action = function (callContext) {
var controller = this.controller;
return controller.safeExecuteClientAction(controller._recacheISD$Action, callContext);

};
Controller.prototype.onRender$Action = function (callContext) {
var controller = this.controller;
return controller.safeExecuteClientAction(controller._onRender$Action, callContext);

};
Controller.prototype.onReady$Action = function (callContext) {
var controller = this.controller;
return controller.safeExecuteClientAction(controller._onReady$Action, callContext);

};
Controller.prototype.mobilePhoneChanged$Action = function () {
return Promise.resolve();
};

// Event Handler Actions
Controller.prototype.onInitializeEventHandler = function (callContext) {
var controller = this.controller;
var model = this.model;
var idService = this.idService;

return controller.onInitialize$Action(callContext);

};
Controller.prototype.onReadyEventHandler = function (callContext) {
var controller = this.controller;
var model = this.model;
var idService = this.idService;

return controller.onReady$Action(callContext);

};
Controller.prototype.onRenderEventHandler = function (callContext) {
var controller = this.controller;
var model = this.model;
var idService = this.idService;

return controller.onRender$Action(callContext);

};
Controller.prototype.onDestroyEventHandler = null;
Controller.prototype.onParametersChangedEventHandler = function (callContext) {
var controller = this.controller;
var model = this.model;
var idService = this.idService;

return controller.onParametersChanged$Action(callContext);

};
Controller.prototype.handleError = function (ex) {
return controller.handleError(ex);
};
Controller.checkPermissions = function () {
};
Controller.prototype.getDefaultTimeout = function () {
return PortalController.default.defaultTimeout;
};
return Controller;
})(OS.Controller.BaseViewController);
return new OS.Controller.ControllerFactory(Controller, PortalLanguageResources);
});